Пример #1
0
 //On MoneyIn completed checks ammount due and acts accordingly
 public void CompleteSale(MoneyIn moneyIn)
 {
     moneyIn.UpdateDue();
     if (moneyIn.currentDue == 0)
     {
         try
         {
             API.SubmitTransaction(CreateTransactionJson());
             moneyIn.Close();
             POS.NewSale();
         }
         catch
         {
             MessageBox.Show("ERROR");
         }
     }
     else if (moneyIn.currentDue < 0)
     {
         try
         {
             MessageBox.Show("Change:" + (moneyIn.currentDue * -1));
             API.SubmitTransaction(CreateTransactionJson());
             moneyIn.Close();
             POS.NewSale();
         }
         catch
         {
             MessageBox.Show("ERROR");
         }
     }
     else if (moneyIn.currentDue > 0)
     {
         MessageBox.Show("This Sale has not be paid fully");
     }
 }
Пример #2
0
 //Updates the amount due on text change
 private void txtBx_payment_method_TextChanged(object sender, EventArgs e)
 {
     parentMoneyIn.UpdateDue();
 }