Cambio de nombre de diferencia a deposito en el calculo del fondo.

This commit is contained in:
Daniel Cortes
2019-01-19 17:02:43 -03:00
parent 0d41e533c0
commit 9ed451ab4f
5 changed files with 13 additions and 14 deletions

BIN
dist/caja.jar vendored

Binary file not shown.

View File

@@ -155,7 +155,7 @@ public class CalcularFondoController {
int fondo = this.view.getFondoField().getValue(); int fondo = this.view.getFondoField().getValue();
int suma = this.calculoFondoDAO.getTotalCalculoFondo(this.caja); int suma = this.calculoFondoDAO.getTotalCalculoFondo(this.caja);
this.view.getSumaField().setValue(suma); this.view.getSumaField().setValue(suma);
this.view.getDiferenciaField().setValue(suma - fondo); this.view.getDepositoField().setValue(suma - fondo);
} }
private void cleanInput() { private void cleanInput() {

View File

@@ -58,7 +58,7 @@
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints> </constraints>
<properties> <properties>
<text value="Diferencia"/> <text value="Deposito"/>
</properties> </properties>
</component> </component>
<component id="a2a23" class="danielcortes.xyz.views.components.NumberFormatedTextField" binding="sumaField"> <component id="a2a23" class="danielcortes.xyz.views.components.NumberFormatedTextField" binding="sumaField">
@@ -71,7 +71,7 @@
<editable value="false"/> <editable value="false"/>
</properties> </properties>
</component> </component>
<component id="2745a" class="danielcortes.xyz.views.components.NumberFormatedTextField" binding="diferenciaField"> <component id="2745a" class="danielcortes.xyz.views.components.NumberFormatedTextField" binding="depositoField">
<constraints> <constraints>
<grid row="1" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"> <grid row="1" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/> <preferred-size width="150" height="-1"/>

View File

@@ -43,7 +43,7 @@ public class CalcularFondoView {
private JTextField descripcionField; private JTextField descripcionField;
private NumberFormatedTextField fondoField; private NumberFormatedTextField fondoField;
private NumberFormatedTextField sumaField; private NumberFormatedTextField sumaField;
private NumberFormatedTextField diferenciaField; private NumberFormatedTextField depositoField;
private NumberFormatedTextField valorField; private NumberFormatedTextField valorField;
private FondoTableModel tableModel; private FondoTableModel tableModel;
@@ -86,8 +86,8 @@ public class CalcularFondoView {
return sumaField; return sumaField;
} }
public NumberFormatedTextField getDiferenciaField() { public NumberFormatedTextField getDepositoField() {
return diferenciaField; return depositoField;
} }
public NumberFormatedTextField getValorField() { public NumberFormatedTextField getValorField() {
@@ -124,14 +124,14 @@ public class CalcularFondoView {
label2.setText("Suma de dinero"); label2.setText("Suma de dinero");
panel1.add(label2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); panel1.add(label2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label3 = new JLabel(); final JLabel label3 = new JLabel();
label3.setText("Diferencia"); label3.setText("Deposito");
panel1.add(label3, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); panel1.add(label3, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
sumaField = new NumberFormatedTextField(); sumaField = new NumberFormatedTextField();
sumaField.setEditable(false); sumaField.setEditable(false);
panel1.add(sumaField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); panel1.add(sumaField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
diferenciaField = new NumberFormatedTextField(); depositoField = new NumberFormatedTextField();
diferenciaField.setEditable(false); depositoField.setEditable(false);
panel1.add(diferenciaField, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); panel1.add(depositoField, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
final JPanel panel2 = new JPanel(); final JPanel panel2 = new JPanel();
panel2.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1)); panel2.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));
contentPanel.add(panel2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); contentPanel.add(panel2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
@@ -181,9 +181,9 @@ public class CalcularFondoView {
private void fillDefaultsValues() { private void fillDefaultsValues() {
this.valorField.setValue(0); this.valorField.setValue(0);
this.diferenciaField.setValue(0); this.depositoField.setValue(0);
this.fondoField.setValue(0); this.fondoField.setValue(0);
this.sumaField.setValue(0); this.sumaField.setValue(0);
this.diferenciaField.setValue(0); this.depositoField.setValue(0);
} }
} }

View File

@@ -25,7 +25,6 @@
package danielcortes.xyz.views.components; package danielcortes.xyz.views.components;
import danielcortes.xyz.models.calculo_fondo.CalculoFondo; import danielcortes.xyz.models.calculo_fondo.CalculoFondo;
import danielcortes.xyz.models.egreso.Egreso;
import javax.swing.table.AbstractTableModel; import javax.swing.table.AbstractTableModel;
import java.text.NumberFormat; import java.text.NumberFormat;
@@ -89,7 +88,7 @@ public class FondoTableModel extends AbstractTableModel {
public Object getValueAt(int row, int col) { public Object getValueAt(int row, int col) {
switch (col){ switch (col){
case 0: case 0:
return rows.get(row).getValor(); return nf.format(rows.get(row).getValor());
case 1: case 1:
return rows.get(row).getDescripcion(); return rows.get(row).getDescripcion();
} }