Esempio n. 1
0
/// <summary>
///     Returns true if self and the provided entity have the same Id values
///     and the Ids are not of the default Id value
/// </summary>
        protected bool HasSameNonDefaultIdAs(TransactionStatus compareTo)
        {
            return(!this.IsTransient() && !compareTo.IsTransient() && this.Id.Equals(compareTo.Id));
        }
Esempio n. 2
0
/// <summary>
/// Copies the current object to a new instance
/// </summary>
/// <param name="deep">Copy members that refer to objects external to this class (not dependent)</param>
/// <param name="copiedObjects">Objects that should be reused</param>
/// <param name="asNew">Copy the current object as a new one, ready to be persisted, along all its members.</param>
/// <param name="reuseNestedObjects">If asNew is true, this flag if set, forces the reuse of all external objects.</param>
/// <param name="copy">Optional - An existing [TransactionStatus] instance to use as the destination.</param>
/// <returns>A copy of the object</returns>
        public virtual TransactionStatus Copy(bool deep = false, Hashtable copiedObjects = null, bool asNew = false, bool reuseNestedObjects = false, TransactionStatus copy = null)
        {
            if (copiedObjects == null)
            {
                copiedObjects = new Hashtable();
            }
            if (copy == null && copiedObjects.Contains(this))
            {
                return((TransactionStatus)copiedObjects[this]);
            }
            copy = copy ?? new TransactionStatus();
            if (!asNew)
            {
                copy.TransientId = this.TransientId;
                copy.Id          = this.Id;
            }
            copy.TransactionDateOccured = this.TransactionDateOccured;
            copy.Status              = this.Status;
            copy.Shipped             = this.Shipped;
            copy.Invoiced            = this.Invoiced;
            copy.ShippedDateOccured  = this.ShippedDateOccured;
            copy.InvoicedDateOccured = this.InvoicedDateOccured;
            copy.Cancelled           = this.Cancelled;
            copy.InTransit           = this.InTransit;
            copy.Picked              = this.Picked;
            copy.PaymentStatus       = this.PaymentStatus;
            copy.InitialOrderDate    = this.InitialOrderDate;
            copy.FinalOrderDate      = this.FinalOrderDate;
            copy.Delivered           = this.Delivered;
            copy.Ordered             = this.Ordered;
            if (!copiedObjects.Contains(this))
            {
                copiedObjects.Add(this, copy);
            }
            return(copy);
        }
        /*<ControllerActionImplementation:Pay:1/>*/
        public ActionResult ExecutePay()
        {
            ActionResult _result = null;
            int?         i       = 0;

            while (@model.PaymentAmount > 0)
            {
                DSS5_SupplyChainFinancialsOptimisation.BO.Transaction tr = zAppDev.DotNet.Framework.Utilities.Common.GetItemFromList(@model.Transactions, i.GetValueOrDefault(0));
                zAppDev.DotNet.Framework.Utilities.DebugHelper.Log(zAppDev.DotNet.Framework.Utilities.DebugMessageType.Warning, "BuyerPaymentForm", DSS5_SupplyChainFinancialsOptimisation.Hubs.EventsHub.RaiseDebugMessage, "i= " + (i?.ToString() ?? "") + "! Model Transaction " + (tr?.Id?.ToString() ?? "") + "Value " + (tr?.TransactionValue?.ToString() ?? ""), true);
                if ((tr?.ToBePaidAmount != null && tr?.ToBePaidAmount != 0))
                {
                    if ((@model.PaymentAmount >= (tr?.ToBePaidAmount ?? 0)))
                    {
                        @model.PaymentAmount = @model.PaymentAmount.GetValueOrDefault(0) - (tr?.ToBePaidAmount ?? 0);
                        tr.ToBePaidAmount    = 0;
                        tr.PaymentStatus     = "Paid by Buyer";
                        tr.PaidByBuyer       = true;
                    }
                    else
                    {
                        tr.ToBePaidAmount    = (tr?.ToBePaidAmount ?? 0) - @model.PaymentAmount.GetValueOrDefault(0);
                        @model.PaymentAmount = 0;
                    }
                }
                else
                {
                    if ((@model.PaymentAmount >= (tr?.TransactionValue ?? 0)))
                    {
                        @model.PaymentAmount = @model.PaymentAmount.GetValueOrDefault(0) - (tr?.TransactionValue ?? 0);
                        tr.PaymentStatus     = "Paid by Buyer";
                        tr.PaidByBuyer       = true;
                        if ((tr?.TransactionStatus == null))
                        {
                            DSS5_SupplyChainFinancialsOptimisation.BO.TransactionStatus trSt = new DSS5_SupplyChainFinancialsOptimisation.BO.TransactionStatus();
                            trSt.PaymentStatus   = true;
                            tr.TransactionStatus = trSt;
                        }
                        else
                        {
                            tr.TransactionStatus.PaymentStatus = true;
                        }
                    }
                    else
                    {
                        zAppDev.DotNet.Framework.Utilities.DebugHelper.Log(zAppDev.DotNet.Framework.Utilities.DebugMessageType.Warning, "BuyerPaymentForm", DSS5_SupplyChainFinancialsOptimisation.Hubs.EventsHub.RaiseDebugMessage, "---  Else -----Transaction value: " + (tr?.TransactionValue?.ToString() ?? ""));
                        tr.ToBePaidAmount    = (tr?.TransactionValue ?? 0) - @model.PaymentAmount.GetValueOrDefault(0);
                        @model.PaymentAmount = 0;
                        tr.PaymentStatus     = "Partially Paid by Buyer";
                    }
                }
                tr.PaymentDate = @model.PaymentDate;
                new DSS5_SupplyChainFinancialsOptimisation.DAL.Repository().Save <DSS5_SupplyChainFinancialsOptimisation.BO.Transaction>(tr);
                i = i.GetValueOrDefault(0) + 1;
                if ((i == @model.Transactions?.Count()))
                {
                    break;
                }
            }
            DSS5_SupplyChainFinancialsOptimisation.BO.TransactionPayment payment = new DSS5_SupplyChainFinancialsOptimisation.BO.TransactionPayment();
            payment.PaymentAmount = @model.PaymentAmount;
            payment.PaymentDate   = @model.PaymentDate;
            payment.Agreement     = @model.Agreement;
            payment?.AddTransactions(@model.Transactions?.Where((t) => t.PaymentStatus == "Paid by Buyer").ToList());
            foreach (var tr in @model.Transactions?.Where((t) => t.PaymentStatus == "Paid by Buyer").ToList() ?? Enumerable.Empty <DSS5_SupplyChainFinancialsOptimisation.BO.Transaction>())
            {
                @model.Transactions?.Remove(tr);
            }
            return(_result);
        }
        /*<ControllerActionImplementation:Pay:1/>*/
        public ActionResult ExecutePay()
        {
            ActionResult _result = null;
            int?         i       = 0;

            while (@model.PaymentAmount > 0)
            {
                DSS5_SupplyChainFinancialsOptimisation.BO.Transaction tr = zAppDev.DotNet.Framework.Utilities.Common.GetItemFromList(@model.Transactions, i.GetValueOrDefault(0));
                if ((tr?.ToBePaidAmount != null && tr?.ToBePaidAmount != 0))
                {
                    if ((@model.PaymentAmount >= (tr?.ToBePaidAmount ?? 0)))
                    {
                        @model.PaymentAmount = @model.PaymentAmount.GetValueOrDefault(0) - (tr?.ToBePaidAmount ?? 0);
                        tr.ToBePaidAmount    = 0;
                        tr.PaymentStatus     = "Funded Paid";
                        try
                        {
                            tr.RestPaymentAmount = (((tr?.FundedAmount ?? 0) * 0.05m) / (365 * 61));
                        }
                        catch (System.Exception x)
                        {
                            zAppDev.DotNet.Framework.Utilities.DebugHelper.Log(zAppDev.DotNet.Framework.Utilities.DebugMessageType.Error, "TransactionPaymentsForm", DSS5_SupplyChainFinancialsOptimisation.Hubs.EventsHub.RaiseDebugMessage, x);
                        }
                    }
                    else
                    {
                        tr.ToBePaidAmount    = (tr?.ToBePaidAmount ?? 0) - @model.PaymentAmount.GetValueOrDefault(0);
                        @model.PaymentAmount = 0;
                    }
                }
                else
                {
                    if ((@model.PaymentAmount >= (tr?.FundedAmount ?? 0)))
                    {
                        @model.PaymentAmount = @model.PaymentAmount.GetValueOrDefault(0) - (tr?.FundedAmount ?? 0);
                        tr.PaymentStatus     = "Funded Paid";
                        if ((tr?.TransactionStatus == null))
                        {
                            DSS5_SupplyChainFinancialsOptimisation.BO.TransactionStatus trSt = new DSS5_SupplyChainFinancialsOptimisation.BO.TransactionStatus();
                            trSt.PaymentStatus   = true;
                            tr.TransactionStatus = trSt;
                        }
                        else
                        {
                            tr.TransactionStatus.PaymentStatus = true;
                        }
                        try
                        {
                            tr.RestPaymentAmount = ((tr?.FundedAmount ?? 0) * 0.05m) / (365 * 61);
                        }
                        catch (System.Exception x)
                        {
                            zAppDev.DotNet.Framework.Utilities.DebugHelper.Log(zAppDev.DotNet.Framework.Utilities.DebugMessageType.Error, "TransactionPaymentsForm", DSS5_SupplyChainFinancialsOptimisation.Hubs.EventsHub.RaiseDebugMessage, x);
                        }
                    }
                    else
                    {
                        tr.ToBePaidAmount    = (tr?.FundedAmount ?? 0) - @model.PaymentAmount.GetValueOrDefault(0);
                        @model.PaymentAmount = 0;
                        tr.PaymentStatus     = "Partially Paid";
                    }
                }
                tr.PaymentDate = @model.PaymentDate;
                new DSS5_SupplyChainFinancialsOptimisation.DAL.Repository().Save <DSS5_SupplyChainFinancialsOptimisation.BO.Transaction>(tr);
                i = i.GetValueOrDefault(0) + 1;
                if ((i == @model.Transactions?.Count()))
                {
                    break;
                }
            }
            DSS5_SupplyChainFinancialsOptimisation.BO.TransactionPayment payment = new DSS5_SupplyChainFinancialsOptimisation.BO.TransactionPayment();
            payment.PaymentAmount = @model.PaymentAmount;
            payment.PaymentDate   = @model.PaymentDate;
            payment.Agreement     = @model.Agreement;
            payment?.AddTransactions(@model.Transactions?.Where((t) => t.PaymentStatus == "Funded Paid").ToList());
            @model.FundedPaidTransactions?.AddRange(@model.Transactions?.Where((t) => t.PaymentStatus == "Funded Paid").ToList());
            foreach (var tr in @model.Transactions?.Where((t) => t.PaymentStatus == "Funded Paid").ToList() ?? Enumerable.Empty <DSS5_SupplyChainFinancialsOptimisation.BO.Transaction>())
            {
                @model.Transactions?.Remove(tr);
            }
            return(_result);
        }
        public void Transaction_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _agreement_commercialagreement_transactions = new DSS5_SupplyChainFinancialsOptimisation.BO.CommercialAgreement
            {
                ProductCategory = "CommercialAgreement_ProductCategory",
                PaymentTerms    = "CommercialAgreement_PaymentTerms",
            };
            var _transaction_orders_transaction = new DSS5_SupplyChainFinancialsOptimisation.BO.Order
            {
                OrderNumber             = "Order_OrderNumber",
                EstimatedDateOfDelivery = now,
                PaymentTerms            = "Order_PaymentTerms",
                IntermediateParty       = true,
                IsCancelled             = true,
                DateOfOrder             = now,
                OrderAmount             = 2222222222.22222M,
                TotalPrice      = 2222222222.22222M,
                From            = "Order_From",
                DeliveryTo      = "Order_DeliveryTo",
                OrderAttachment = "Order_OrderAttachment",
            };
            var _transaction_orders_transaction2 = new DSS5_SupplyChainFinancialsOptimisation.BO.Order
            {
                OrderNumber             = "Order_OrderNumber",
                EstimatedDateOfDelivery = now,
                PaymentTerms            = "Order_PaymentTerms",
                IntermediateParty       = true,
                IsCancelled             = true,
                DateOfOrder             = now,
                OrderAmount             = 2222222222.22222M,
                TotalPrice      = 2222222222.22222M,
                From            = "Order_From",
                DeliveryTo      = "Order_DeliveryTo",
                OrderAttachment = "Order_OrderAttachment",
            };
            var _transaction_creditnotes_transaction = new DSS5_SupplyChainFinancialsOptimisation.BO.CreditNote
            {
                CreditNoteNumber   = "CreditNote_CreditNoteNumber",
                Description        = "CreditNote_Description",
                DateIssued         = now,
                Amount             = 2222222222.22222M,
                TotalPrice         = 2222222222.22222M,
                CreditNoteDocument = "CreditNote_CreditNoteDocument",
                CNoteAttachment    = "CreditNote_CNoteAttachment",
            };
            var _transaction_creditnotes_transaction2 = new DSS5_SupplyChainFinancialsOptimisation.BO.CreditNote
            {
                CreditNoteNumber   = "CreditNote_CreditNoteNumber",
                Description        = "CreditNote_Description",
                DateIssued         = now,
                Amount             = 2222222222.22222M,
                TotalPrice         = 2222222222.22222M,
                CreditNoteDocument = "CreditNote_CreditNoteDocument",
                CNoteAttachment    = "CreditNote_CNoteAttachment",
            };
            var _transaction_deliverynotes_transaction = new DSS5_SupplyChainFinancialsOptimisation.BO.DeliveryNote
            {
                DeliveryNoteNumber = "DeliveryNote_DeliveryNoteNumber",
                Description        = "DeliveryNote_Description",
                DateIssued         = now,
                Amount             = 2222222222222.22M,
                TotalPrice         = 222222.22M,
                DNoteAttachment    = "DeliveryNote_DNoteAttachment",
            };
            var _transaction_deliverynotes_transaction2 = new DSS5_SupplyChainFinancialsOptimisation.BO.DeliveryNote
            {
                DeliveryNoteNumber = "DeliveryNote_DeliveryNoteNumber",
                Description        = "DeliveryNote_Description",
                DateIssued         = now,
                Amount             = 2222222222222.22M,
                TotalPrice         = 222222.22M,
                DNoteAttachment    = "DeliveryNote_DNoteAttachment",
            };
            var _transaction_invoices_transaction = new DSS5_SupplyChainFinancialsOptimisation.BO.Invoice
            {
                InvoiceNumber     = "Invoice_InvoiceNumber",
                Description       = "Invoice_Description",
                DateIssued        = now,
                Amount            = 2222222222222.22M,
                CustomerType      = "Invoice_CustomerType",
                CumulativeBalance = 222222.22M,
                TotalPrice        = 222222.22M,
                DescriptionTwo    = "Invoice_DescriptionTwo",
                Attribute         = "Invoice_Attribute",
                InvoiceAttachment = "Invoice_InvoiceAttachment",
            };
            var _transaction_invoices_transaction2 = new DSS5_SupplyChainFinancialsOptimisation.BO.Invoice
            {
                InvoiceNumber     = "Invoice_InvoiceNumber",
                Description       = "Invoice_Description",
                DateIssued        = now,
                Amount            = 2222222222222.22M,
                CustomerType      = "Invoice_CustomerType",
                CumulativeBalance = 222222.22M,
                TotalPrice        = 222222.22M,
                DescriptionTwo    = "Invoice_DescriptionTwo",
                Attribute         = "Invoice_Attribute",
                InvoiceAttachment = "Invoice_InvoiceAttachment",
            };
            var _transaction_proofofdeliveries_transaction = new DSS5_SupplyChainFinancialsOptimisation.BO.ProofOfDelivery
            {
                PODNumber      = "ProofOfDelivery_PODNumber",
                DateIssued     = now,
                QualityStatus  = "ProofOfDelivery_QualityStatus",
                QuantityStatus = "ProofOfDelivery_QuantityStatus",
                DeliveryStatus = "ProofOfDelivery_DeliveryStatus",
                PODAttachment  = "ProofOfDelivery_PODAttachment",
                Comments       = "ProofOfDelivery_Comments",
            };
            var _transaction_proofofdeliveries_transaction2 = new DSS5_SupplyChainFinancialsOptimisation.BO.ProofOfDelivery
            {
                PODNumber      = "ProofOfDelivery_PODNumber",
                DateIssued     = now,
                QualityStatus  = "ProofOfDelivery_QualityStatus",
                QuantityStatus = "ProofOfDelivery_QuantityStatus",
                DeliveryStatus = "ProofOfDelivery_DeliveryStatus",
                PODAttachment  = "ProofOfDelivery_PODAttachment",
                Comments       = "ProofOfDelivery_Comments",
            };
            var _transaction_transactionstatus_transaction = new DSS5_SupplyChainFinancialsOptimisation.BO.TransactionStatus
            {
                TransactionDateOccured = now,
                Status              = "TransactionStatus_Status",
                Shipped             = true,
                Invoiced            = true,
                ShippedDateOccured  = now,
                InvoicedDateOccured = now,
                Cancelled           = true,
                InTransit           = true,
                Picked              = true,
                PaymentStatus       = true,
                InitialOrderDate    = now,
                FinalOrderDate      = now,
                Delivered           = true,
                Ordered             = true,
            };
            var _transaction_supplier_transactions = new DSS5_SupplyChainFinancialsOptimisation.BO.Supplier
            {
                SupplierId              = 5635,
                Company                 = "Supplier_Company",
                CompanyLogo             = "Supplier_CompanyLogo",
                Business                = "Supplier_Business",
                CurrentAmount           = "Supplier_CurrentAmount",
                AverageAmount           = "Supplier_AverageAmount",
                PercentageOfCreditNotes = "Supplier_PercentageOfCreditNotes",
                PrimaryPhone            = "Supplier_PrimaryPhone",
                SecondaryPhone          = "Supplier_SecondaryPhone",
                Fax                     = "Supplier_Fax",
                WebSite                 = "Supplier_WebSite",
                AcceptedPolicyTerms     = true,
                SupplierStatus          = "Supplier_SupplierStatus",
                DomainFocus             = "Supplier_DomainFocus",
                EvaluationResult        = "Supplier_EvaluationResult",
                EvaluationCountResult   = 7465,
                AnnualTurnover          = true,
                BEnvironment            = true,
                PTerms                  = true,
                Average                 = true,
                InvoiceValue            = true,
                EqRatio                 = true,
                Prefix                  = "Supplier_Prefix",
                VATNumber               = "Supplier_VATNumber",
                MarketSegment           = "Supplier_MarketSegment",
                AdditionalComments      = "Supplier_AdditionalComments",
                AdditionalCommentsStep2 = "Supplier_AdditionalCommentsStep2",
                AdditionalCommentsStep3 = "Supplier_AdditionalCommentsStep3",
                UserName                = "******",
                PasswordHash            = "Supplier_PasswordHash",
                SecurityStamp           = "Supplier_SecurityStamp",
                EmailConfirmed          = true,
                LockoutEnabled          = true,
                PhoneNumberConfirmed    = true,
                TwoFactorEnabled        = true,
                AccessFailedCount       = 2744,
                Name                    = "Supplier_Name",
                Email                   = "Supplier_Email",
                PhoneNumber             = "Supplier_PhoneNumber",
                LockoutEndDate          = now,
            };
            var _transaction_importedbuyer_transactions = new DSS5_SupplyChainFinancialsOptimisation.BO.ImportedBuyer
            {
                Code       = "ImportedBuyer_Code",
                VATNumber  = "ImportedBuyer_VATNumber",
                Company    = "ImportedBuyer_Company",
                AddressOne = "ImportedBuyer_AddressOne",
                AddressTwo = "ImportedBuyer_AddressTwo",
                Phone      = "ImportedBuyer_Phone",
            };
            var _transaction_letterofcredits_transaction = new DSS5_SupplyChainFinancialsOptimisation.BO.LetterOfCredit
            {
                ValueOfLoC     = 222222.22M,
                IssuingBank    = "LetterOfCredit_IssuingBank",
                Detail         = "LetterOfCredit_Detail",
                UploadOfScan   = "LetterOfCredit_UploadOfScan",
                Calculated     = 222222.22M,
                DateOfValidity = now,
                DateOfExpiry   = now,
            };
            var _transaction_letterofcredits_transaction2 = new DSS5_SupplyChainFinancialsOptimisation.BO.LetterOfCredit
            {
                ValueOfLoC     = 222222.22M,
                IssuingBank    = "LetterOfCredit_IssuingBank",
                Detail         = "LetterOfCredit_Detail",
                UploadOfScan   = "LetterOfCredit_UploadOfScan",
                Calculated     = 222222.22M,
                DateOfValidity = now,
                DateOfExpiry   = now,
            };
            var _transaction_intermediaries_transactions = new DSS5_SupplyChainFinancialsOptimisation.BO.Intermediary
            {
                OtherDescription = "Intermediary_OtherDescription",
                Company          = "Intermediary_Company",
                EMail            = "Intermediary_EMail",
                GUID             = "Intermediary_GUID",
            };
            var _transaction_intermediaries_transactions2 = new DSS5_SupplyChainFinancialsOptimisation.BO.Intermediary
            {
                OtherDescription = "Intermediary_OtherDescription",
                Company          = "Intermediary_Company",
                EMail            = "Intermediary_EMail",
                GUID             = "Intermediary_GUID",
            };
            var _transaction_partialproofofdeliveries_transaction = new DSS5_SupplyChainFinancialsOptimisation.BO.PartialProofOfDelivery
            {
                PODNumber      = "PartialProofOfDelivery_PODNumber",
                DateIssued     = now,
                QualityStatus  = "PartialProofOfDelivery_QualityStatus",
                QuantityStatus = "PartialProofOfDelivery_QuantityStatus",
                DeliveryStatus = "PartialProofOfDelivery_DeliveryStatus",
                PODAttachment  = "PartialProofOfDelivery_PODAttachment",
                Comments       = "PartialProofOfDelivery_Comments",
            };
            var _transaction_partialproofofdeliveries_transaction2 = new DSS5_SupplyChainFinancialsOptimisation.BO.PartialProofOfDelivery
            {
                PODNumber      = "PartialProofOfDelivery_PODNumber",
                DateIssued     = now,
                QualityStatus  = "PartialProofOfDelivery_QualityStatus",
                QuantityStatus = "PartialProofOfDelivery_QuantityStatus",
                DeliveryStatus = "PartialProofOfDelivery_DeliveryStatus",
                PODAttachment  = "PartialProofOfDelivery_PODAttachment",
                Comments       = "PartialProofOfDelivery_Comments",
            };
            var _transaction_customsclearingdocumentations_transaction = new DSS5_SupplyChainFinancialsOptimisation.BO.CustomsClearingDocumentation
            {
                CustomsClearingDate = now,
                ExportingCountry    = "CustomsClearingDocumentation_ExportingCountry",
                ImportingCountry    = "CustomsClearingDocumentation_ImportingCountry",
                BuyerName           = "CustomsClearingDocumentation_BuyerName",
            };
            var _transaction_customsclearingdocumentations_transaction2 = new DSS5_SupplyChainFinancialsOptimisation.BO.CustomsClearingDocumentation
            {
                CustomsClearingDate = now,
                ExportingCountry    = "CustomsClearingDocumentation_ExportingCountry",
                ImportingCountry    = "CustomsClearingDocumentation_ImportingCountry",
                BuyerName           = "CustomsClearingDocumentation_BuyerName",
            };
            var _transaction_billoflandings_transaction = new DSS5_SupplyChainFinancialsOptimisation.BO.BillOfLanding
            {
                LandingPlace     = "BillOfLanding_LandingPlace",
                LandingDate      = now,
                DeliveryPlace    = "BillOfLanding_DeliveryPlace",
                DeliveryDate     = now,
                DOCNumber        = 5377,
                ReceivingPartyId = 8383,
                IsBuyerReceiving = true,
            };
            var _transaction_billoflandings_transaction2 = new DSS5_SupplyChainFinancialsOptimisation.BO.BillOfLanding
            {
                LandingPlace     = "BillOfLanding_LandingPlace",
                LandingDate      = now,
                DeliveryPlace    = "BillOfLanding_DeliveryPlace",
                DeliveryDate     = now,
                DOCNumber        = 1637,
                ReceivingPartyId = 8022,
                IsBuyerReceiving = true,
            };
            var _transaction_transactionoverview_transaction = new DSS5_SupplyChainFinancialsOptimisation.BO.TransactionOverview
            {
                DeliveryDate     = now,
                OrderQuantity    = 2222222222.22222M,
                OrderDate        = now,
                InvoiceId        = 7059,
                InvoiceDate      = now,
                FundedRate       = 2222222222.22222M,
                InterestRate     = 2222222222.22222M,
                TotalValue       = 2222222222.22222M,
                FundingValue     = 2222222222.22222M,
                PaymentId        = 4011,
                PayementDate     = now,
                CreditNoteNumber = "TransactionOverview_CreditNoteNumber",
            };

            new PersistenceSpecification <DSS5_SupplyChainFinancialsOptimisation.BO.Transaction>(Session)
            .CheckProperty(p => p.TransactionDateOccured, now)
            .CheckProperty(p => p.ToBePaidAmount, 2222222222.22222M)
            .CheckProperty(p => p.InvoicedDate, now)
            .CheckProperty(p => p.PaymentStatus, "Transaction_PaymentStatus")
            .CheckProperty(p => p.PaymentDate, now)
            .CheckProperty(p => p.RestPaymentAmount, 2222222222.22222M)
            .CheckProperty(p => p.PaidByBuyer, true)
            .CheckReference(p => p.CommercialAgreement, _agreement_commercialagreement_transactions)
            .CheckBag(p => p.Orders, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.Order>
            {
                _transaction_orders_transaction,
                _transaction_orders_transaction2
            }))
            .CheckBag(p => p.CreditNotes, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.CreditNote>
            {
                _transaction_creditnotes_transaction,
                _transaction_creditnotes_transaction2
            }))
            .CheckBag(p => p.DeliveryNotes, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.DeliveryNote>
            {
                _transaction_deliverynotes_transaction,
                _transaction_deliverynotes_transaction2
            }))
            .CheckBag(p => p.Invoices, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.Invoice>
            {
                _transaction_invoices_transaction,
                _transaction_invoices_transaction2
            }))
            .CheckBag(p => p.ProofOfDeliveries, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.ProofOfDelivery>
            {
                _transaction_proofofdeliveries_transaction,
                _transaction_proofofdeliveries_transaction2
            }))
            .CheckReference(p => p.TransactionStatus, _transaction_transactionstatus_transaction)
            .CheckReference(p => p.Supplier, _transaction_supplier_transactions)
            .CheckReference(p => p.ImportedBuyer, _transaction_importedbuyer_transactions)
            .CheckBag(p => p.LetterOfCredits, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.LetterOfCredit>
            {
                _transaction_letterofcredits_transaction,
                _transaction_letterofcredits_transaction2
            }))
            .CheckBag(p => p.Intermediaries, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.Intermediary>
            {
                _transaction_intermediaries_transactions,
                _transaction_intermediaries_transactions2
            }))
            .CheckBag(p => p.PartialProofOfDeliveries, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.PartialProofOfDelivery>
            {
                _transaction_partialproofofdeliveries_transaction,
                _transaction_partialproofofdeliveries_transaction2
            }))
            .CheckBag(p => p.CustomsClearingDocumentations, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.CustomsClearingDocumentation>
            {
                _transaction_customsclearingdocumentations_transaction,
                _transaction_customsclearingdocumentations_transaction2
            }))
            .CheckBag(p => p.BillOfLandings, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.BillOfLanding>
            {
                _transaction_billoflandings_transaction,
                _transaction_billoflandings_transaction2
            }))
            .CheckReference(p => p.TransactionOverview, _transaction_transactionoverview_transaction)
            .VerifyTheMappings();
        }