Esempio n. 1
0
        public static VendorPaymentJournalFee CreateVendorPaymentJournalFee(string dataAreaId,
                                                                            string sourceJournalBatchNumber,
                                                                            decimal sourceJournalLineNumber,
                                                                            string paymentFeeId,
                                                                            decimal amount,
                                                                            global::Microsoft.Dynamics.DataEntities.Currency currency,
                                                                            global::Microsoft.Dynamics.DataEntities.VendorPaymentJournalLine vendorPaymentJournalLine,
                                                                            global::Microsoft.Dynamics.DataEntities.VendorPaymentFee vendorPaymentFee)
        {
            VendorPaymentJournalFee vendorPaymentJournalFee = new VendorPaymentJournalFee();

            vendorPaymentJournalFee.dataAreaId = dataAreaId;
            vendorPaymentJournalFee.SourceJournalBatchNumber = sourceJournalBatchNumber;
            vendorPaymentJournalFee.SourceJournalLineNumber  = sourceJournalLineNumber;
            vendorPaymentJournalFee.PaymentFeeId             = paymentFeeId;
            vendorPaymentJournalFee.Amount = amount;
            if ((currency == null))
            {
                throw new global::System.ArgumentNullException("currency");
            }
            vendorPaymentJournalFee.Currency = currency;
            if ((vendorPaymentJournalLine == null))
            {
                throw new global::System.ArgumentNullException("vendorPaymentJournalLine");
            }
            vendorPaymentJournalFee.VendorPaymentJournalLine = vendorPaymentJournalLine;
            if ((vendorPaymentFee == null))
            {
                throw new global::System.ArgumentNullException("vendorPaymentFee");
            }
            vendorPaymentJournalFee.VendorPaymentFee = vendorPaymentFee;
            return(vendorPaymentJournalFee);
        }
Esempio n. 2
0
 partial void OnVendorPaymentJournalLineChanging(global::Microsoft.Dynamics.DataEntities.VendorPaymentJournalLine value);
        public static VendorPaymentJournalLineSettledInvoice CreateVendorPaymentJournalLineSettledInvoice(string journalLineCompany,
                                                                                                          string journalBatchNumber,
                                                                                                          decimal journalLineNumber,
                                                                                                          string invoiceNumber,
                                                                                                          string invoiceCompany,
                                                                                                          global::System.DateTimeOffset invoiceDueDate,
                                                                                                          decimal invoiceToPaymentCrossRate,
                                                                                                          decimal cashDiscountToTakeInInvoiceCurrency,
                                                                                                          decimal settlementAmountInInvoiceCurrency,
                                                                                                          global::Microsoft.Dynamics.DataEntities.VendorPaymentJournalLine vendorPaymentJournalLineEntityRelatedRole,
                                                                                                          global::Microsoft.Dynamics.DataEntities.VendorPaymentJournalHeader vendorPaymentJournalHeaderRelatedRole)
        {
            VendorPaymentJournalLineSettledInvoice vendorPaymentJournalLineSettledInvoice = new VendorPaymentJournalLineSettledInvoice();

            vendorPaymentJournalLineSettledInvoice.JournalLineCompany                  = journalLineCompany;
            vendorPaymentJournalLineSettledInvoice.JournalBatchNumber                  = journalBatchNumber;
            vendorPaymentJournalLineSettledInvoice.JournalLineNumber                   = journalLineNumber;
            vendorPaymentJournalLineSettledInvoice.InvoiceNumber                       = invoiceNumber;
            vendorPaymentJournalLineSettledInvoice.InvoiceCompany                      = invoiceCompany;
            vendorPaymentJournalLineSettledInvoice.InvoiceDueDate                      = invoiceDueDate;
            vendorPaymentJournalLineSettledInvoice.InvoiceToPaymentCrossRate           = invoiceToPaymentCrossRate;
            vendorPaymentJournalLineSettledInvoice.CashDiscountToTakeInInvoiceCurrency = cashDiscountToTakeInInvoiceCurrency;
            vendorPaymentJournalLineSettledInvoice.SettlementAmountInInvoiceCurrency   = settlementAmountInInvoiceCurrency;
            if ((vendorPaymentJournalLineEntityRelatedRole == null))
            {
                throw new global::System.ArgumentNullException("vendorPaymentJournalLineEntityRelatedRole");
            }
            vendorPaymentJournalLineSettledInvoice.VendorPaymentJournalLineEntityRelatedRole = vendorPaymentJournalLineEntityRelatedRole;
            if ((vendorPaymentJournalHeaderRelatedRole == null))
            {
                throw new global::System.ArgumentNullException("vendorPaymentJournalHeaderRelatedRole");
            }
            vendorPaymentJournalLineSettledInvoice.VendorPaymentJournalHeaderRelatedRole = vendorPaymentJournalHeaderRelatedRole;
            return(vendorPaymentJournalLineSettledInvoice);
        }