Ejemplo n.º 1
0
 public string SendInvoice(Invoice invoice)
 {
     object[] results = this.Invoke("SendInvoice", new object[] {
                 invoice});
     return ((string)(results[0]));
 }
Ejemplo n.º 2
0
 private Invoice CreateInvoice()
 {
     Invoice invoice = new Invoice();
     invoice.invoiceID = this.invoiceID;
     if (this.paymentMethod != null)
     {
         invoice.paymentMethodID = this.paymentMethod.paymentMethodID;
     }
     else
     {
         invoice.paymentMethodID = PaymentMethods[0].paymentMethodID;
     }
     if (this.selectedBill != null)
     {
         invoice.orderBillID = this.selectedBill.OrderBillID;
     }
     else
     {
         invoice.orderBillID = this.orderBillID;
     }
     invoice.point = this.pointAmount;
     invoice.totalPrice = this.amountDue;
     invoice.tax1 = this.tax1;
     invoice.tax2 = this.tax2;
     invoice.totalDiscount = this.totalDiscount;
     invoice.totalReceive = this.totalReceive;
     invoice.employeeID = this.employeeID;
     invoice.refInvoice = 0;
     invoice.invoiceNote = this.invoiceNote;
     invoice.discounts = null;
     if (this.useDiscount.Count > 0)
     {
         invoice.discounts = new InvoiceDiscount[this.useDiscount.Count];
         for (int i = 0; i < this.useDiscount.Count; i++)
         {
             invoice.discounts[i] = new InvoiceDiscount();
             invoice.discounts[i].promotionID = ((Discount) this.useDiscount[i]).promotionID;
         }
     }
     invoice.payments = null;
     if (this.paymentMethodList.Count > 0)
     {
         invoice.payments = new InvoicePayment[this.paymentMethodList.Count];
         for (int j = 0; j < this.paymentMethodList.Count; j++)
         {
             invoice.payments[j] = new InvoicePayment();
             invoice.payments[j].paymentMethodID = ((PaymentMethod) this.paymentMethodList[j]).paymentMethodID;
             invoice.payments[j].receive = (double) this.payValueList[j];
         }
     }
     return invoice;
 }
Ejemplo n.º 3
0
 /// <remarks/>
 public System.IAsyncResult BeginSendInvoice(Invoice invoice, System.AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("SendInvoice", new object[] {
                 invoice}, callback, asyncState);
 }