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 | ||||
|     private void initComponents() { | ||||
|         setModal(true); | ||||
| 
 | ||||
|         java.awt.GridBagConstraints gridBagConstraints; | ||||
| 
 | ||||
|         jPanel_information = new javax.swing.JPanel(); | ||||
|  | @ -137,16 +139,15 @@ public class OnPayment extends javax.swing.JDialog { | |||
|      | ||||
|     public static Boolean display() { | ||||
| 		/* Display the transaction. */ | ||||
| 		dialog_payment.setModal(true); | ||||
|                 dialog_payment.addWindowListener(new java.awt.event.WindowAdapter() { | ||||
|                     @Override | ||||
|                     public void windowClosing(java.awt.event.WindowEvent e) { | ||||
|                         // Reflect a cancelled payment.  | ||||
| 			payment.state = false; | ||||
|                         e.getWindow().dispose(); | ||||
|                     } | ||||
|                 }); | ||||
|                 getCompletable(); | ||||
| 		dialog_payment.addWindowListener(new java.awt.event.WindowAdapter() { | ||||
|             @Override | ||||
|             public void windowClosing(java.awt.event.WindowEvent e) { | ||||
|                 // Reflect a cancelled payment.  | ||||
|                 payment.state = false; | ||||
|                 e.getWindow().dispose(); | ||||
|             } | ||||
|         }); | ||||
|         getCompletable(); | ||||
| 		dialog_payment.setVisible(true); | ||||
| 		return(payment.state); | ||||
| 	}; | ||||
|  | @ -190,6 +191,9 @@ public class OnPayment extends javax.swing.JDialog { | |||
| 			payment.OK = true; | ||||
| 			payment.state = true; | ||||
| 			dispose(); | ||||
|              | ||||
|             // Finish the payment.  | ||||
|             payment.finish(); | ||||
| 		}; | ||||
| 	}; | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,10 +1,5 @@ | |||
| package tech.iBeans.POSware.Lite; | ||||
| 
 | ||||
| import tech.iBeans.POSware.Lite.receipt.*; | ||||
| 
 | ||||
| // Import module | ||||
| import java.util.*; | ||||
| 
 | ||||
| public class payment{ | ||||
| 	public static Float total = null; | ||||
| 	public static Float change = null; | ||||
|  | @ -53,11 +48,10 @@ public class payment{ | |||
| 		return(calculate()); | ||||
| 	}; | ||||
| 
 | ||||
| 	public static void log() { | ||||
| 		/* Log the payment. | ||||
| 		*/ | ||||
| 
 | ||||
| 		// TODO add payment processing here.  | ||||
| 	public static void finish() { | ||||
| 		/* Finalize the payment.  */ | ||||
| 		payment.state = true; | ||||
| 		transact.finalise(); | ||||
| 	}; | ||||
| 
 | ||||
| }; | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue