enable finishing payment
This commit is contained in:
parent
8444de9ad2
commit
0860bcecf5
2 changed files with 18 additions and 20 deletions
|
@ -34,6 +34,8 @@ public class OnPayment extends javax.swing.JDialog {
|
||||||
|
|
||||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||||
private void initComponents() {
|
private void initComponents() {
|
||||||
|
setModal(true);
|
||||||
|
|
||||||
java.awt.GridBagConstraints gridBagConstraints;
|
java.awt.GridBagConstraints gridBagConstraints;
|
||||||
|
|
||||||
jPanel_information = new javax.swing.JPanel();
|
jPanel_information = new javax.swing.JPanel();
|
||||||
|
@ -137,16 +139,15 @@ public class OnPayment extends javax.swing.JDialog {
|
||||||
|
|
||||||
public static Boolean display() {
|
public static Boolean display() {
|
||||||
/* Display the transaction. */
|
/* Display the transaction. */
|
||||||
dialog_payment.setModal(true);
|
dialog_payment.addWindowListener(new java.awt.event.WindowAdapter() {
|
||||||
dialog_payment.addWindowListener(new java.awt.event.WindowAdapter() {
|
@Override
|
||||||
@Override
|
public void windowClosing(java.awt.event.WindowEvent e) {
|
||||||
public void windowClosing(java.awt.event.WindowEvent e) {
|
// Reflect a cancelled payment.
|
||||||
// Reflect a cancelled payment.
|
payment.state = false;
|
||||||
payment.state = false;
|
e.getWindow().dispose();
|
||||||
e.getWindow().dispose();
|
}
|
||||||
}
|
});
|
||||||
});
|
getCompletable();
|
||||||
getCompletable();
|
|
||||||
dialog_payment.setVisible(true);
|
dialog_payment.setVisible(true);
|
||||||
return(payment.state);
|
return(payment.state);
|
||||||
};
|
};
|
||||||
|
@ -190,6 +191,9 @@ public class OnPayment extends javax.swing.JDialog {
|
||||||
payment.OK = true;
|
payment.OK = true;
|
||||||
payment.state = true;
|
payment.state = true;
|
||||||
dispose();
|
dispose();
|
||||||
|
|
||||||
|
// Finish the payment.
|
||||||
|
payment.finish();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
package tech.iBeans.POSware.Lite;
|
package tech.iBeans.POSware.Lite;
|
||||||
|
|
||||||
import tech.iBeans.POSware.Lite.receipt.*;
|
|
||||||
|
|
||||||
// Import module
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
public class payment{
|
public class payment{
|
||||||
public static Float total = null;
|
public static Float total = null;
|
||||||
public static Float change = null;
|
public static Float change = null;
|
||||||
|
@ -53,11 +48,10 @@ public class payment{
|
||||||
return(calculate());
|
return(calculate());
|
||||||
};
|
};
|
||||||
|
|
||||||
public static void log() {
|
public static void finish() {
|
||||||
/* Log the payment.
|
/* Finalize the payment. */
|
||||||
*/
|
payment.state = true;
|
||||||
|
transact.finalise();
|
||||||
// TODO add payment processing here.
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
Loading…
Add table
Add a link
Reference in a new issue