Cambio de nombre de diferencia a deposito en el calculo del fondo.
This commit is contained in:
@@ -155,7 +155,7 @@ public class CalcularFondoController {
|
||||
int fondo = this.view.getFondoField().getValue();
|
||||
int suma = this.calculoFondoDAO.getTotalCalculoFondo(this.caja);
|
||||
this.view.getSumaField().setValue(suma);
|
||||
this.view.getDiferenciaField().setValue(suma - fondo);
|
||||
this.view.getDepositoField().setValue(suma - fondo);
|
||||
}
|
||||
|
||||
private void cleanInput() {
|
||||
|
||||
@@ -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"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Diferencia"/>
|
||||
<text value="Deposito"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="a2a23" class="danielcortes.xyz.views.components.NumberFormatedTextField" binding="sumaField">
|
||||
@@ -71,7 +71,7 @@
|
||||
<editable value="false"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="2745a" class="danielcortes.xyz.views.components.NumberFormatedTextField" binding="diferenciaField">
|
||||
<component id="2745a" class="danielcortes.xyz.views.components.NumberFormatedTextField" binding="depositoField">
|
||||
<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">
|
||||
<preferred-size width="150" height="-1"/>
|
||||
|
||||
@@ -43,7 +43,7 @@ public class CalcularFondoView {
|
||||
private JTextField descripcionField;
|
||||
private NumberFormatedTextField fondoField;
|
||||
private NumberFormatedTextField sumaField;
|
||||
private NumberFormatedTextField diferenciaField;
|
||||
private NumberFormatedTextField depositoField;
|
||||
private NumberFormatedTextField valorField;
|
||||
|
||||
private FondoTableModel tableModel;
|
||||
@@ -86,8 +86,8 @@ public class CalcularFondoView {
|
||||
return sumaField;
|
||||
}
|
||||
|
||||
public NumberFormatedTextField getDiferenciaField() {
|
||||
return diferenciaField;
|
||||
public NumberFormatedTextField getDepositoField() {
|
||||
return depositoField;
|
||||
}
|
||||
|
||||
public NumberFormatedTextField getValorField() {
|
||||
@@ -124,14 +124,14 @@ public class CalcularFondoView {
|
||||
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));
|
||||
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));
|
||||
sumaField = new NumberFormatedTextField();
|
||||
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));
|
||||
diferenciaField = new NumberFormatedTextField();
|
||||
diferenciaField.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));
|
||||
depositoField = new NumberFormatedTextField();
|
||||
depositoField.setEditable(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();
|
||||
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));
|
||||
@@ -181,9 +181,9 @@ public class CalcularFondoView {
|
||||
|
||||
private void fillDefaultsValues() {
|
||||
this.valorField.setValue(0);
|
||||
this.diferenciaField.setValue(0);
|
||||
this.depositoField.setValue(0);
|
||||
this.fondoField.setValue(0);
|
||||
this.sumaField.setValue(0);
|
||||
this.diferenciaField.setValue(0);
|
||||
this.depositoField.setValue(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
package danielcortes.xyz.views.components;
|
||||
|
||||
import danielcortes.xyz.models.calculo_fondo.CalculoFondo;
|
||||
import danielcortes.xyz.models.egreso.Egreso;
|
||||
|
||||
import javax.swing.table.AbstractTableModel;
|
||||
import java.text.NumberFormat;
|
||||
@@ -89,7 +88,7 @@ public class FondoTableModel extends AbstractTableModel {
|
||||
public Object getValueAt(int row, int col) {
|
||||
switch (col){
|
||||
case 0:
|
||||
return rows.get(row).getValor();
|
||||
return nf.format(rows.get(row).getValor());
|
||||
case 1:
|
||||
return rows.get(row).getDescripcion();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user