Beispiel #1
0
        private void createDetailHeader(InvoiceDS.ClientInvoiceTableRow invoice)
        {
            //Set named range summary values
            Detail detail = global::Argix.Finance.Globals.Detail;

            //Remit To
            detail.ClientNumberDiv.Value     = (invoice.IsClientNumberNull()?"":invoice.ClientNumber.Trim()) + ' ' + (invoice.IsClientDivisionNull()?"":invoice.ClientDivision.Trim());
            detail.RemitToName.Value         = invoice.RemitToName.Trim();
            detail.RemitToAddressLine1.Value = invoice.RemitToAddressLine1.Trim();
            //detail.RemitToAddressLine2.Value = invoice.IsRemitToAddressLine2Null() ? "" : invoice.RemitToAddressLine2.Trim();
            detail.RemitToCityStateZip.Value = invoice.RemitToCity.Trim() + ", " + invoice.RemitToState.Trim() + " " + invoice.RemitToZip.Trim();
            detail.Telephone.Value           = (invoice.IsTelephoneNull() ? "" : invoice.Telephone.ToString());

            //Bill To
            detail.BillToName.Value         = invoice.BillToName.Trim();
            detail.BillToAddressLine1.Value = invoice.BillToAddressline1.Trim();
            detail.BillToAddressLine2.Value = invoice.IsBillToAddressline2Null() ? "" : invoice.BillToAddressline2.Trim();
            detail.BillToCityStateZip.Value = invoice.BillToCity.Trim() + ", " + invoice.BillToState.Trim() + " " + invoice.BillToZip.Trim() + "-" + invoice.BillToZIP4.Trim();

            //Account
            detail.InvoiceNumber.Value = invoice.InvoiceNumber.Trim();
            detail.InvoiceDate.Value   = invoice.InvoiceDate;
        }
Beispiel #2
0
        private void createDetailHeader(InvoiceDS.ClientInvoiceTableRow invoice)
        {
            //Create header of detail worksheet
            Detail detail = global::Argix.Finance.Globals.Detail;

            //Remit To
            detail.RemitToName.Value         = invoice.RemitToName.Trim();
            detail.RemitToAddressLine1.Value = invoice.RemitToAddressLine1.Trim();
            //detail.RemitToAddressLine2.Value = invoice.IsRemitToAddressLine2Null() ? "" : invoice.RemitToAddressLine2.Trim();
            detail.RemitToCityStateZip.Value = invoice.RemitToCity.Trim() + ", " + invoice.RemitToState.Trim() + " " + invoice.RemitToZip.Trim();
            detail.Telephone.Value           = "Tel# " + (invoice.IsTelephoneNull() ? "" : invoice.Telephone.ToString());

            //Bill To
            detail.BillToName.Value         = invoice.BillToName.Trim();
            detail.BillToAddressLine1.Value = invoice.BillToAddressline1.Trim();
            detail.BillToAddressLine2.Value = invoice.IsBillToAddressline2Null() ? "" : invoice.BillToAddressline2.Trim();
            detail.BillToCityStateZip.Value = invoice.BillToCity.Trim() + ", " + invoice.BillToState.Trim() + " " + invoice.BillToZip.Trim() + "-" + invoice.BillToZIP4.Trim();

            //Account
            detail.InvoiceNumber.Value = "";    // invoice.InvoiceNumber.Trim();
            detail.InvoiceDate.Value   = invoice.InvoiceDate;
            detail.ShippedDate.Value   = invoice.ReleaseDate;
            detail.FuelSurcharge.Value = "Charges Include a Fuel Surcharge of " + invoice.FuelRate.ToString("#0.00");
        }
Beispiel #3
0
 public Invoice(InvoiceDS.ClientInvoiceTableRow invoice)
 {
     //Constructor
     try {
         if (invoice != null)
         {
             if (!invoice.IsInvoiceNumberNull())
             {
                 this.mInvoiceNumber = invoice.InvoiceNumber;
             }
             if (!invoice.IsInvoiceDateNull())
             {
                 this.mInvoiceDate = invoice.InvoiceDate;
             }
             if (!invoice.IsPostToARDateNull())
             {
                 this.mPostToARDate = invoice.PostToARDate;
             }
             if (!invoice.IsCartonsNull())
             {
                 this.mCartons = invoice.Cartons;
             }
             if (!invoice.IsPalletsNull())
             {
                 this.mPallets = invoice.Pallets;
             }
             if (!invoice.IsWeightNull())
             {
                 this.mWeight = invoice.Weight;
             }
             if (!invoice.IsAmountNull())
             {
                 this.mAmount = invoice.Amount;
             }
             if (!invoice.IsDescriptionNull())
             {
                 this.mDescription = invoice.Description;
             }
             if (!invoice.IsReleaseDateNull())
             {
                 this.mReleaseDate = invoice.ReleaseDate;
             }
             if (!invoice.IsInvoiceTypeCodeNull())
             {
                 this.mInvoiceTypeCode = invoice.InvoiceTypeCode;
             }
             if (!invoice.IsInvoiceTypeDescriptionNull())
             {
                 this.mInvoiceTypeDescription = invoice.InvoiceTypeDescription;
             }
             if (!invoice.IsInvoiceTypeTargetNull())
             {
                 this.mInvoiceTypeTarget = invoice.InvoiceTypeTarget;
             }
             if (!invoice.IsBillToNull())
             {
                 this.mBillTo = invoice.BillTo;
             }
         }
     }
     catch (Exception ex) { throw new ApplicationException("Unexpected error while creating new Client instance", ex); }
 }