private void AddInvoiceTotalType(int Qty, decimal unitPrice, UPSRateService.ShipmentType shipment) { var invoiceType = new UPSRateService.InvoiceLineTotalType(); invoiceType.CurrencyCode = "USD"; int total = (int)(Qty * unitPrice); if (total % 100 > 0) { total = total + (100 - total % 100); } invoiceType.MonetaryValue = total.ToString(); shipment.InvoiceLineTotal = invoiceType; }
private void AddInvoiceTotalType(int Qty, decimal unitPrice, UPSRateService.ShipmentType shipment) { var invoiceType = new UPSRateService.InvoiceLineTotalType(); invoiceType.CurrencyCode = "USD"; int total = (int)(Qty * unitPrice); if (total % 100 > 0) total = total + (100 - total % 100); invoiceType.MonetaryValue = total.ToString(); shipment.InvoiceLineTotal = invoiceType; }