partial void OnVendorPaymentJournalHeaderRelatedRoleChanging(global::Microsoft.Dynamics.DataEntities.VendorPaymentJournalHeader 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);
        }