示例#1
0
        public void PartialProofOfDelivery_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _transaction_transaction_partialproofofdeliveries = new DSS5_SupplyChainFinancialsOptimisation.BO.Transaction
            {
                TransactionDateOccured = now,
                TransactionValue       = 2222222222.22222M,
                FundedAmount           = 2222222222.22222M,
                ToBePaidAmount         = 2222222222.22222M,
                InvoicedDate           = now,
                PaymentStatus          = "Transaction_PaymentStatus",
                PaymentDate            = now,
                RestPaymentAmount      = 2222222222.22222M,
                PaidByBuyer            = true,
            };

            new PersistenceSpecification <DSS5_SupplyChainFinancialsOptimisation.BO.PartialProofOfDelivery>(Session)
            .CheckProperty(p => p.PODNumber, "PartialProofOfDelivery_PODNumber")
            .CheckProperty(p => p.DateIssued, now)
            .CheckProperty(p => p.QualityStatus, "PartialProofOfDelivery_QualityStatus")
            .CheckProperty(p => p.QuantityStatus, "PartialProofOfDelivery_QuantityStatus")
            .CheckProperty(p => p.DeliveryStatus, "PartialProofOfDelivery_DeliveryStatus")
            .CheckProperty(p => p.PODAttachment, "PartialProofOfDelivery_PODAttachment")
            .CheckProperty(p => p.Comments, "PartialProofOfDelivery_Comments")
            .CheckReference(p => p.Transaction, _transaction_transaction_partialproofofdeliveries)
            .VerifyTheMappings();
        }
        public void ImportedBuyer_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _agreement_commercialagreement_importedbuyer = new DSS5_SupplyChainFinancialsOptimisation.BO.CommercialAgreement
            {
                ProductCategory = "CommercialAgreement_ProductCategory",
                PaymentTerms    = "CommercialAgreement_PaymentTerms",
            };
            var _agreement_commercialagreement_importedbuyer2 = new DSS5_SupplyChainFinancialsOptimisation.BO.CommercialAgreement
            {
                ProductCategory = "CommercialAgreement_ProductCategory",
                PaymentTerms    = "CommercialAgreement_PaymentTerms",
            };
            var _transaction_transactions_importedbuyer = new DSS5_SupplyChainFinancialsOptimisation.BO.Transaction
            {
                TransactionDateOccured = now,
                TransactionValue       = 2222222222.22222M,
                FundedAmount           = 2222222222.22222M,
                ToBePaidAmount         = 2222222222.22222M,
                InvoicedDate           = now,
                PaymentStatus          = "Transaction_PaymentStatus",
                PaymentDate            = now,
                RestPaymentAmount      = 2222222222.22222M,
                PaidByBuyer            = true,
            };
            var _transaction_transactions_importedbuyer2 = new DSS5_SupplyChainFinancialsOptimisation.BO.Transaction
            {
                TransactionDateOccured = now,
                TransactionValue       = 2222222222.22222M,
                FundedAmount           = 2222222222.22222M,
                ToBePaidAmount         = 2222222222.22222M,
                InvoicedDate           = now,
                PaymentStatus          = "Transaction_PaymentStatus",
                PaymentDate            = now,
                RestPaymentAmount      = 2222222222.22222M,
                PaidByBuyer            = true,
            };

            new PersistenceSpecification <DSS5_SupplyChainFinancialsOptimisation.BO.ImportedBuyer>(Session)
            .CheckProperty(p => p.Code, "ImportedBuyer_Code")
            .CheckProperty(p => p.VATNumber, "ImportedBuyer_VATNumber")
            .CheckProperty(p => p.Company, "ImportedBuyer_Company")
            .CheckProperty(p => p.AddressOne, "ImportedBuyer_AddressOne")
            .CheckProperty(p => p.AddressTwo, "ImportedBuyer_AddressTwo")
            .CheckProperty(p => p.Phone, "ImportedBuyer_Phone")
            .CheckBag(p => p.CommercialAgreement, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.CommercialAgreement>
            {
                _agreement_commercialagreement_importedbuyer,
                _agreement_commercialagreement_importedbuyer2
            }))
            .CheckBag(p => p.Transactions, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.Transaction>
            {
                _transaction_transactions_importedbuyer,
                _transaction_transactions_importedbuyer2
            }))
            .VerifyTheMappings();
        }
        public void CustomsClearingDocumentation_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _transaction_transaction_customsclearingdocumentations = new DSS5_SupplyChainFinancialsOptimisation.BO.Transaction
            {
                TransactionDateOccured = now,
                TransactionValue       = 2222222222.22222M,
                FundedAmount           = 2222222222.22222M,
                ToBePaidAmount         = 2222222222.22222M,
                InvoicedDate           = now,
                PaymentStatus          = "Transaction_PaymentStatus",
                PaymentDate            = now,
                RestPaymentAmount      = 2222222222.22222M,
                PaidByBuyer            = true,
            };

            new PersistenceSpecification <DSS5_SupplyChainFinancialsOptimisation.BO.CustomsClearingDocumentation>(Session)
            .CheckProperty(p => p.CustomsClearingDate, now)
            .CheckProperty(p => p.ExportingCountry, "CustomsClearingDocumentation_ExportingCountry")
            .CheckProperty(p => p.ImportingCountry, "CustomsClearingDocumentation_ImportingCountry")
            .CheckProperty(p => p.BuyerName, "CustomsClearingDocumentation_BuyerName")
            .CheckReference(p => p.Transaction, _transaction_transaction_customsclearingdocumentations)
            .VerifyTheMappings();
        }
        public void TransactionPayment_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _transactionpayment_transactions_transactionpayment = new DSS5_SupplyChainFinancialsOptimisation.BO.Transaction
            {
                TransactionDateOccured = now,
                TransactionValue       = 2222222222.22222M,
                FundedAmount           = 2222222222.22222M,
                ToBePaidAmount         = 2222222222.22222M,
                InvoicedDate           = now,
                PaymentStatus          = "Transaction_PaymentStatus",
                PaymentDate            = now,
                RestPaymentAmount      = 2222222222.22222M,
                PaidByBuyer            = true,
            };
            var _transactionpayment_transactions_transactionpayment2 = new DSS5_SupplyChainFinancialsOptimisation.BO.Transaction
            {
                TransactionDateOccured = now,
                TransactionValue       = 2222222222.22222M,
                FundedAmount           = 2222222222.22222M,
                ToBePaidAmount         = 2222222222.22222M,
                InvoicedDate           = now,
                PaymentStatus          = "Transaction_PaymentStatus",
                PaymentDate            = now,
                RestPaymentAmount      = 2222222222.22222M,
                PaidByBuyer            = true,
            };
            var _transactionpayment_agreement_transactionpayment = new DSS5_SupplyChainFinancialsOptimisation.BO.Agreement
            {
                StartDate              = now,
                EndDate                = now,
                FundedRate             = 222222.22M,
                FundedAmount           = 222222.22M,
                CurrentAgreementStatus = "Agreement_CurrentAgreementStatus",
                InterestRate           = 222222.22M,
            };

            new PersistenceSpecification <DSS5_SupplyChainFinancialsOptimisation.BO.TransactionPayment>(Session)
            .CheckProperty(p => p.PaymentAmount, 222222.22M)
            .CheckProperty(p => p.Receipt, "TransactionPayment_Receipt")
            .CheckProperty(p => p.PaymentDate, now)
            .CheckBag(p => p.Transactions, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.Transaction>
            {
                _transactionpayment_transactions_transactionpayment,
                _transactionpayment_transactions_transactionpayment2
            }))
            .CheckReference(p => p.Agreement, _transactionpayment_agreement_transactionpayment)
            .VerifyTheMappings();
        }
        /*<ControllerActionImplementation:PayRestAmount:1/>*/
        public ActionResult ExecutePayRestAmount()
        {
            ActionResult _result = null;
            int?         i       = 0;

            while (@model.PaymentAmount > 0)
            {
                DSS5_SupplyChainFinancialsOptimisation.BO.Transaction tr = zAppDev.DotNet.Framework.Utilities.Common.GetItemFromList(@model.FundedPaidTransactions, i.GetValueOrDefault(0));
                if ((@model.PaymentAmount >= (tr?.RestPaymentAmount ?? 0) && (tr?.PaidByBuyer ?? false)))
                {
                    @model.PaymentAmount = @model.PaymentAmount.GetValueOrDefault(0) - (tr?.RestPaymentAmount ?? 0);
                    tr.RestPaymentAmount = 0;
                    tr.PaymentStatus     = "Fully Paid";
                }
                else
                {
                    if (((tr?.PaidByBuyer ?? false)))
                    {
                        tr.RestPaymentAmount = (tr?.RestPaymentAmount ?? 0) - @model.PaymentAmount.GetValueOrDefault(0);
                        @model.PaymentAmount = 0;
                        tr.PaymentStatus     = "Partially Funded Paid";
                    }
                }
                tr.PaymentDate = @model.PaymentDate;
                i = i.GetValueOrDefault(0) + 1;
                if ((i == @model.FundedPaidTransactions?.Count()))
                {
                    break;
                }
            }
            System.Collections.Generic.List <DSS5_SupplyChainFinancialsOptimisation.BO.Transaction> copyFundedPaidTransactions = new System.Collections.Generic.List <DSS5_SupplyChainFinancialsOptimisation.BO.Transaction>();
            foreach (var tr in @model.FundedPaidTransactions ?? Enumerable.Empty <DSS5_SupplyChainFinancialsOptimisation.BO.Transaction>())
            {
                copyFundedPaidTransactions?.Add(tr);
            }
            foreach (var tr in copyFundedPaidTransactions?.Where((t) => t.PaymentStatus == "Fully Paid").ToList() ?? Enumerable.Empty <DSS5_SupplyChainFinancialsOptimisation.BO.Transaction>())
            {
                @model.FundedPaidTransactions?.Remove(tr);
            }
            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.FundedPaidTransactions?.Where((t) => t.PaymentStatus == "Fully Paid").ToList());
            new DSS5_SupplyChainFinancialsOptimisation.DAL.Repository().Save <DSS5_SupplyChainFinancialsOptimisation.BO.TransactionPayment>(payment);
            return(_result);
        }
示例#6
0
        public void ProofOfDelivery_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _order_orders_proofofdeliveries = 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 _order_orders_proofofdeliveries2 = 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_transaction_proofofdeliveries = new DSS5_SupplyChainFinancialsOptimisation.BO.Transaction
            {
                TransactionDateOccured = now,
                TransactionValue       = 2222222222.22222M,
                FundedAmount           = 2222222222.22222M,
                ToBePaidAmount         = 2222222222.22222M,
                InvoicedDate           = now,
                PaymentStatus          = "Transaction_PaymentStatus",
                PaymentDate            = now,
                RestPaymentAmount      = 2222222222.22222M,
                PaidByBuyer            = true,
            };

            new PersistenceSpecification <DSS5_SupplyChainFinancialsOptimisation.BO.ProofOfDelivery>(Session)
            .CheckProperty(p => p.PODNumber, "ProofOfDelivery_PODNumber")
            .CheckProperty(p => p.DateIssued, now)
            .CheckProperty(p => p.QualityStatus, "ProofOfDelivery_QualityStatus")
            .CheckProperty(p => p.QuantityStatus, "ProofOfDelivery_QuantityStatus")
            .CheckProperty(p => p.DeliveryStatus, "ProofOfDelivery_DeliveryStatus")
            .CheckProperty(p => p.PODAttachment, "ProofOfDelivery_PODAttachment")
            .CheckProperty(p => p.Comments, "ProofOfDelivery_Comments")
            .CheckBag(p => p.Orders, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.Order>
            {
                _order_orders_proofofdeliveries,
                _order_orders_proofofdeliveries2
            }))
            .CheckReference(p => p.Transaction, _transaction_transaction_proofofdeliveries)
            .VerifyTheMappings();
        }
示例#7
0
        public void LetterOfCredit_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _order_orders_letterofcredits = 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 _order_orders_letterofcredits2 = 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_transaction_letterofcredits = new DSS5_SupplyChainFinancialsOptimisation.BO.Transaction
            {
                TransactionDateOccured = now,
                TransactionValue       = 2222222222.22222M,
                FundedAmount           = 2222222222.22222M,
                ToBePaidAmount         = 2222222222.22222M,
                InvoicedDate           = now,
                PaymentStatus          = "Transaction_PaymentStatus",
                PaymentDate            = now,
                RestPaymentAmount      = 2222222222.22222M,
                PaidByBuyer            = true,
            };

            new PersistenceSpecification <DSS5_SupplyChainFinancialsOptimisation.BO.LetterOfCredit>(Session)
            .CheckProperty(p => p.ValueOfLoC, 222222.22M)
            .CheckProperty(p => p.IssuingBank, "LetterOfCredit_IssuingBank")
            .CheckProperty(p => p.Detail, "LetterOfCredit_Detail")
            .CheckProperty(p => p.UploadOfScan, "LetterOfCredit_UploadOfScan")
            .CheckProperty(p => p.Calculated, 222222.22M)
            .CheckProperty(p => p.DateOfValidity, now)
            .CheckProperty(p => p.DateOfExpiry, now)
            .CheckBag(p => p.Orders, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.Order>
            {
                _order_orders_letterofcredits,
                _order_orders_letterofcredits2
            }))
            .CheckReference(p => p.Transaction, _transaction_transaction_letterofcredits)
            .VerifyTheMappings();
        }
        /*<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 DeliveryNote_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _deliverynote_products_deliverynote = new DSS5_SupplyChainFinancialsOptimisation.BO.OrderProduct
            {
                Code            = "OrderProduct_Code",
                Quantity        = 222222.22M,
                Description     = "OrderProduct_Description",
                UnitValue       = "OrderProduct_UnitValue",
                MeasurementUnit = "OrderProduct_MeasurementUnit",
                Price           = 222222.22M,
                LineTotalPrice  = 222222.22M,
            };
            var _deliverynote_products_deliverynote2 = new DSS5_SupplyChainFinancialsOptimisation.BO.OrderProduct
            {
                Code            = "OrderProduct_Code",
                Quantity        = 222222.22M,
                Description     = "OrderProduct_Description",
                UnitValue       = "OrderProduct_UnitValue",
                MeasurementUnit = "OrderProduct_MeasurementUnit",
                Price           = 222222.22M,
                LineTotalPrice  = 222222.22M,
            };
            var _deliverynote_deliverynoteproducts_deliverynote = new DSS5_SupplyChainFinancialsOptimisation.BO.DeliveryNoteProduct
            {
                Code            = "DeliveryNoteProduct_Code",
                Quantity        = 222222.22M,
                Description     = "DeliveryNoteProduct_Description",
                UnitValue       = "DeliveryNoteProduct_UnitValue",
                MeasurementUnit = "DeliveryNoteProduct_MeasurementUnit",
                Price           = 222222.22M,
                LineTotalPrice  = 222222.22M,
            };
            var _deliverynote_deliverynoteproducts_deliverynote2 = new DSS5_SupplyChainFinancialsOptimisation.BO.DeliveryNoteProduct
            {
                Code            = "DeliveryNoteProduct_Code",
                Quantity        = 222222.22M,
                Description     = "DeliveryNoteProduct_Description",
                UnitValue       = "DeliveryNoteProduct_UnitValue",
                MeasurementUnit = "DeliveryNoteProduct_MeasurementUnit",
                Price           = 222222.22M,
                LineTotalPrice  = 222222.22M,
            };
            var _order_orders_deliverynotes = 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 _order_orders_deliverynotes2 = 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_transaction_deliverynotes = new DSS5_SupplyChainFinancialsOptimisation.BO.Transaction
            {
                TransactionDateOccured = now,
                TransactionValue       = 2222222222.22222M,
                FundedAmount           = 2222222222.22222M,
                ToBePaidAmount         = 2222222222.22222M,
                InvoicedDate           = now,
                PaymentStatus          = "Transaction_PaymentStatus",
                PaymentDate            = now,
                RestPaymentAmount      = 2222222222.22222M,
                PaidByBuyer            = true,
            };

            new PersistenceSpecification <DSS5_SupplyChainFinancialsOptimisation.BO.DeliveryNote>(Session)
            .CheckProperty(p => p.DeliveryNoteNumber, "DeliveryNote_DeliveryNoteNumber")
            .CheckProperty(p => p.Description, "DeliveryNote_Description")
            .CheckProperty(p => p.DateIssued, now)
            .CheckProperty(p => p.Amount, 2222222222222.22M)
            .CheckProperty(p => p.TotalPrice, 222222.22M)
            .CheckProperty(p => p.DNoteAttachment, "DeliveryNote_DNoteAttachment")
            .CheckBag(p => p.Products, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.OrderProduct>
            {
                _deliverynote_products_deliverynote,
                _deliverynote_products_deliverynote2
            }))
            .CheckBag(p => p.DeliveryNoteProducts, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.DeliveryNoteProduct>
            {
                _deliverynote_deliverynoteproducts_deliverynote,
                _deliverynote_deliverynoteproducts_deliverynote2
            }))
            .CheckBag(p => p.Orders, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.Order>
            {
                _order_orders_deliverynotes,
                _order_orders_deliverynotes2
            }))
            .CheckReference(p => p.Transaction, _transaction_transaction_deliverynotes)
            .VerifyTheMappings();
        }
        public void Intermediary_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _order_orders_intermediaries = 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 _order_orders_intermediaries2 = 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_transactions_intermediaries = new DSS5_SupplyChainFinancialsOptimisation.BO.Transaction
            {
                TransactionDateOccured = now,
                TransactionValue       = 2222222222.22222M,
                FundedAmount           = 2222222222.22222M,
                ToBePaidAmount         = 2222222222.22222M,
                InvoicedDate           = now,
                PaymentStatus          = "Transaction_PaymentStatus",
                PaymentDate            = now,
                RestPaymentAmount      = 2222222222.22222M,
                PaidByBuyer            = true,
            };
            var _transaction_transactions_intermediaries2 = new DSS5_SupplyChainFinancialsOptimisation.BO.Transaction
            {
                TransactionDateOccured = now,
                TransactionValue       = 2222222222.22222M,
                FundedAmount           = 2222222222.22222M,
                ToBePaidAmount         = 2222222222.22222M,
                InvoicedDate           = now,
                PaymentStatus          = "Transaction_PaymentStatus",
                PaymentDate            = now,
                RestPaymentAmount      = 2222222222.22222M,
                PaidByBuyer            = true,
            };

            new PersistenceSpecification <DSS5_SupplyChainFinancialsOptimisation.BO.Intermediary>(Session)
            .CheckProperty(p => p.OtherDescription, "Intermediary_OtherDescription")
            .CheckProperty(p => p.Company, "Intermediary_Company")
            .CheckProperty(p => p.EMail, "Intermediary_EMail")
            .CheckProperty(p => p.GUID, "Intermediary_GUID")
            .CheckBag(p => p.Orders, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.Order>
            {
                _order_orders_intermediaries,
                _order_orders_intermediaries2
            }))
            .CheckBag(p => p.Transactions, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.Transaction>
            {
                _transaction_transactions_intermediaries,
                _transaction_transactions_intermediaries2
            }))
            .VerifyTheMappings();
        }
示例#11
0
        public void CommercialAgreement_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _agreement_supplier_commercialagreements = new DSS5_SupplyChainFinancialsOptimisation.BO.Supplier
            {
                SupplierId              = 6701,
                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   = 4053,
                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       = 3664,
                Name                    = "Supplier_Name",
                Email                   = "Supplier_Email",
                PhoneNumber             = "Supplier_PhoneNumber",
                LockoutEndDate          = now,
            };
            var _agreement_buyer_commercialagreements = new DSS5_SupplyChainFinancialsOptimisation.BO.Buyer
            {
                BuyerId              = 4912,
                PrimaryPhone         = "Buyer_PrimaryPhone",
                SecondaryPhone       = "Buyer_SecondaryPhone",
                Fax                  = "Buyer_Fax",
                WebSite              = "Buyer_WebSite",
                Company              = "Buyer_Company",
                AnnualTurnOver       = 2222222222.22222M,
                LegalRepresentative  = "Buyer_LegalRepresentative",
                Rating               = "Buyer_Rating",
                CreditInsurance      = true,
                Logo                 = "Buyer_Logo",
                AddressOne           = "Buyer_AddressOne",
                AddressTwo           = "Buyer_AddressTwo",
                VatNumber            = "Buyer_VatNumber",
                ContactPerson        = "Buyer_ContactPerson",
                Prefix               = "Buyer_Prefix",
                Temp                 = "Buyer_Temp",
                UserName             = "******",
                PasswordHash         = "Buyer_PasswordHash",
                SecurityStamp        = "Buyer_SecurityStamp",
                EmailConfirmed       = true,
                LockoutEnabled       = true,
                PhoneNumberConfirmed = true,
                TwoFactorEnabled     = true,
                AccessFailedCount    = 4366,
                Name                 = "Buyer_Name",
                Email                = "Buyer_Email",
                PhoneNumber          = "Buyer_PhoneNumber",
                LockoutEndDate       = now,
            };
            var _agreement_orders_commercialagreement = 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 _agreement_orders_commercialagreement2 = 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 _agreement_importedbuyer_commercialagreement = new DSS5_SupplyChainFinancialsOptimisation.BO.ImportedBuyer
            {
                Code       = "ImportedBuyer_Code",
                VATNumber  = "ImportedBuyer_VATNumber",
                Company    = "ImportedBuyer_Company",
                AddressOne = "ImportedBuyer_AddressOne",
                AddressTwo = "ImportedBuyer_AddressTwo",
                Phone      = "ImportedBuyer_Phone",
            };
            var _agreement_transactions_commercialagreement = new DSS5_SupplyChainFinancialsOptimisation.BO.Transaction
            {
                TransactionDateOccured = now,
                TransactionValue       = 2222222222.22222M,
                FundedAmount           = 2222222222.22222M,
                ToBePaidAmount         = 2222222222.22222M,
                InvoicedDate           = now,
                PaymentStatus          = "Transaction_PaymentStatus",
                PaymentDate            = now,
                RestPaymentAmount      = 2222222222.22222M,
                PaidByBuyer            = true,
            };
            var _agreement_transactions_commercialagreement2 = new DSS5_SupplyChainFinancialsOptimisation.BO.Transaction
            {
                TransactionDateOccured = now,
                TransactionValue       = 2222222222.22222M,
                FundedAmount           = 2222222222.22222M,
                ToBePaidAmount         = 2222222222.22222M,
                InvoicedDate           = now,
                PaymentStatus          = "Transaction_PaymentStatus",
                PaymentDate            = now,
                RestPaymentAmount      = 2222222222.22222M,
                PaidByBuyer            = true,
            };
            var _agreement_agreement_commercialagreements = new DSS5_SupplyChainFinancialsOptimisation.BO.Agreement
            {
                StartDate              = now,
                EndDate                = now,
                FundedRate             = 222222.22M,
                FundedAmount           = 222222.22M,
                CurrentAgreementStatus = "Agreement_CurrentAgreementStatus",
                InterestRate           = 222222.22M,
            };

            new PersistenceSpecification <DSS5_SupplyChainFinancialsOptimisation.BO.CommercialAgreement>(Session)
            .CheckProperty(p => p.ProductCategory, "CommercialAgreement_ProductCategory")
            .CheckProperty(p => p.PaymentTerms, "CommercialAgreement_PaymentTerms")
            .CheckReference(p => p.Supplier, _agreement_supplier_commercialagreements)
            .CheckReference(p => p.Buyer, _agreement_buyer_commercialagreements)
            .CheckBag(p => p.Orders, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.Order>
            {
                _agreement_orders_commercialagreement,
                _agreement_orders_commercialagreement2
            }))
            .CheckReference(p => p.ImportedBuyer, _agreement_importedbuyer_commercialagreement)
            .CheckBag(p => p.Transactions, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.Transaction>
            {
                _agreement_transactions_commercialagreement,
                _agreement_transactions_commercialagreement2
            }))
            .CheckReference(p => p.Agreement, _agreement_agreement_commercialagreements)
            .VerifyTheMappings();
        }
        public void Order_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _agreement_commercialagreement_orders = new DSS5_SupplyChainFinancialsOptimisation.BO.CommercialAgreement
            {
                ProductCategory = "CommercialAgreement_ProductCategory",
                PaymentTerms    = "CommercialAgreement_PaymentTerms",
            };
            var _order_orderproducts_order = new DSS5_SupplyChainFinancialsOptimisation.BO.OrderProduct
            {
                Code            = "OrderProduct_Code",
                Quantity        = 222222.22M,
                Description     = "OrderProduct_Description",
                UnitValue       = "OrderProduct_UnitValue",
                MeasurementUnit = "OrderProduct_MeasurementUnit",
                Price           = 222222.22M,
                LineTotalPrice  = 222222.22M,
            };
            var _order_orderproducts_order2 = new DSS5_SupplyChainFinancialsOptimisation.BO.OrderProduct
            {
                Code            = "OrderProduct_Code",
                Quantity        = 222222.22M,
                Description     = "OrderProduct_Description",
                UnitValue       = "OrderProduct_UnitValue",
                MeasurementUnit = "OrderProduct_MeasurementUnit",
                Price           = 222222.22M,
                LineTotalPrice  = 222222.22M,
            };
            var _order_proofofdeliveries_orders = 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 _order_proofofdeliveries_orders2 = 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 _order_invoices_orders = 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 _order_invoices_orders2 = 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 _order_deliverynotes_orders = new DSS5_SupplyChainFinancialsOptimisation.BO.DeliveryNote
            {
                DeliveryNoteNumber = "DeliveryNote_DeliveryNoteNumber",
                Description        = "DeliveryNote_Description",
                DateIssued         = now,
                Amount             = 2222222222222.22M,
                TotalPrice         = 222222.22M,
                DNoteAttachment    = "DeliveryNote_DNoteAttachment",
            };
            var _order_deliverynotes_orders2 = new DSS5_SupplyChainFinancialsOptimisation.BO.DeliveryNote
            {
                DeliveryNoteNumber = "DeliveryNote_DeliveryNoteNumber",
                Description        = "DeliveryNote_Description",
                DateIssued         = now,
                Amount             = 2222222222222.22M,
                TotalPrice         = 222222.22M,
                DNoteAttachment    = "DeliveryNote_DNoteAttachment",
            };
            var _order_orderstatus_order = new DSS5_SupplyChainFinancialsOptimisation.BO.OrderStatus
            {
                OrderdDateOccured = now,
                Status            = "OrderStatus_Status",
                PaymentStatus     = true,
                InitialOrdered    = true,
                FinalOrdered      = true,
            };
            var _order_finalacceptancecertificate_order = new DSS5_SupplyChainFinancialsOptimisation.BO.FinalAcceptanceCertificate
            {
                Certificate = "FinalAcceptanceCertificate_Certificate",
            };
            var _order_creditnotes_orders = 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 _order_creditnotes_orders2 = 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 _order_orderpayment_order = new DSS5_SupplyChainFinancialsOptimisation.BO.OrderPayment
            {
                PaymentAmount = 2222222222.22222M,
                DateIssued    = now,
            };
            var _order_orderpayment_order2 = new DSS5_SupplyChainFinancialsOptimisation.BO.OrderPayment
            {
                PaymentAmount = 2222222222.22222M,
                DateIssued    = now,
            };
            var _order_letterofcredits_orders = 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 _order_letterofcredits_orders2 = 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 _order_billoflandings_orders = new DSS5_SupplyChainFinancialsOptimisation.BO.BillOfLanding
            {
                LandingPlace     = "BillOfLanding_LandingPlace",
                LandingDate      = now,
                DeliveryPlace    = "BillOfLanding_DeliveryPlace",
                DeliveryDate     = now,
                DOCNumber        = 5961,
                ReceivingPartyId = 7650,
                IsBuyerReceiving = true,
            };
            var _order_billoflandings_orders2 = new DSS5_SupplyChainFinancialsOptimisation.BO.BillOfLanding
            {
                LandingPlace     = "BillOfLanding_LandingPlace",
                LandingDate      = now,
                DeliveryPlace    = "BillOfLanding_DeliveryPlace",
                DeliveryDate     = now,
                DOCNumber        = 8301,
                ReceivingPartyId = 2374,
                IsBuyerReceiving = true,
            };
            var _order_intermediaries_orders = new DSS5_SupplyChainFinancialsOptimisation.BO.Intermediary
            {
                OtherDescription = "Intermediary_OtherDescription",
                Company          = "Intermediary_Company",
                EMail            = "Intermediary_EMail",
                GUID             = "Intermediary_GUID",
            };
            var _order_intermediaries_orders2 = new DSS5_SupplyChainFinancialsOptimisation.BO.Intermediary
            {
                OtherDescription = "Intermediary_OtherDescription",
                Company          = "Intermediary_Company",
                EMail            = "Intermediary_EMail",
                GUID             = "Intermediary_GUID",
            };
            var _transaction_transaction_orders = new DSS5_SupplyChainFinancialsOptimisation.BO.Transaction
            {
                TransactionDateOccured = now,
                TransactionValue       = 2222222222.22222M,
                FundedAmount           = 2222222222.22222M,
                ToBePaidAmount         = 2222222222.22222M,
                InvoicedDate           = now,
                PaymentStatus          = "Transaction_PaymentStatus",
                PaymentDate            = now,
                RestPaymentAmount      = 2222222222.22222M,
                PaidByBuyer            = true,
            };

            new PersistenceSpecification <DSS5_SupplyChainFinancialsOptimisation.BO.Order>(Session)
            .CheckProperty(p => p.OrderNumber, "Order_OrderNumber")
            .CheckProperty(p => p.EstimatedDateOfDelivery, now)
            .CheckProperty(p => p.PaymentTerms, "Order_PaymentTerms")
            .CheckProperty(p => p.IntermediateParty, true)
            .CheckProperty(p => p.IsCancelled, true)
            .CheckProperty(p => p.DateOfOrder, now)
            .CheckProperty(p => p.OrderAmount, 2222222222.22222M)
            .CheckProperty(p => p.TotalPrice, 2222222222.22222M)
            .CheckProperty(p => p.From, "Order_From")
            .CheckProperty(p => p.DeliveryTo, "Order_DeliveryTo")
            .CheckProperty(p => p.OrderAttachment, "Order_OrderAttachment")
            .CheckReference(p => p.CommercialAgreement, _agreement_commercialagreement_orders)
            .CheckBag(p => p.OrderProducts, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.OrderProduct>
            {
                _order_orderproducts_order,
                _order_orderproducts_order2
            }))
            .CheckBag(p => p.ProofOfDeliveries, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.ProofOfDelivery>
            {
                _order_proofofdeliveries_orders,
                _order_proofofdeliveries_orders2
            }))
            .CheckBag(p => p.Invoices, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.Invoice>
            {
                _order_invoices_orders,
                _order_invoices_orders2
            }))
            .CheckBag(p => p.DeliveryNotes, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.DeliveryNote>
            {
                _order_deliverynotes_orders,
                _order_deliverynotes_orders2
            }))
            .CheckReference(p => p.OrderStatus, _order_orderstatus_order)
            .CheckReference(p => p.FinalAcceptanceCertificate, _order_finalacceptancecertificate_order)
            .CheckBag(p => p.CreditNotes, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.CreditNote>
            {
                _order_creditnotes_orders,
                _order_creditnotes_orders2
            }))
            .CheckBag(p => p.OrderPayment, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.OrderPayment>
            {
                _order_orderpayment_order,
                _order_orderpayment_order2
            }))
            .CheckBag(p => p.LetterOfCredits, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.LetterOfCredit>
            {
                _order_letterofcredits_orders,
                _order_letterofcredits_orders2
            }))
            .CheckBag(p => p.BillOfLandings, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.BillOfLanding>
            {
                _order_billoflandings_orders,
                _order_billoflandings_orders2
            }))
            .CheckBag(p => p.Intermediaries, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.Intermediary>
            {
                _order_intermediaries_orders,
                _order_intermediaries_orders2
            }))
            .CheckReference(p => p.Transaction, _transaction_transaction_orders)
            .VerifyTheMappings();
        }
        /*<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);
        }
示例#14
0
        public void BillOfLanding_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _billoflanding_meanoftransport_billoflading = new DSS5_SupplyChainFinancialsOptimisation.BO.MeanOfTransport
            {
                LicensePlate = "MeanOfTransport_LicensePlate",
                ContainerId  = "MeanOfTransport_ContainerId",
                ShipId       = "MeanOfTransport_ShipId",
                TrainId      = "MeanOfTransport_TrainId",
            };
            var _order_orders_billoflandings = 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 _order_orders_billoflandings2 = 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_transaction_billoflandings = new DSS5_SupplyChainFinancialsOptimisation.BO.Transaction
            {
                TransactionDateOccured = now,
                TransactionValue       = 2222222222.22222M,
                FundedAmount           = 2222222222.22222M,
                ToBePaidAmount         = 2222222222.22222M,
                InvoicedDate           = now,
                PaymentStatus          = "Transaction_PaymentStatus",
                PaymentDate            = now,
                RestPaymentAmount      = 2222222222.22222M,
                PaidByBuyer            = true,
            };

            new PersistenceSpecification <DSS5_SupplyChainFinancialsOptimisation.BO.BillOfLanding>(Session)
            .CheckProperty(p => p.LandingPlace, "BillOfLanding_LandingPlace")
            .CheckProperty(p => p.LandingDate, now)
            .CheckProperty(p => p.DeliveryPlace, "BillOfLanding_DeliveryPlace")
            .CheckProperty(p => p.DeliveryDate, now)
            .CheckProperty(p => p.DOCNumber, 9936)
            .CheckProperty(p => p.ReceivingPartyId, 1800)
            .CheckProperty(p => p.IsBuyerReceiving, true)
            .CheckReference(p => p.MeanOfTransport, _billoflanding_meanoftransport_billoflading)
            .CheckBag(p => p.Orders, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.Order>
            {
                _order_orders_billoflandings,
                _order_orders_billoflandings2
            }))
            .CheckReference(p => p.Transaction, _transaction_transaction_billoflandings)
            .VerifyTheMappings();
        }
        public void Supplier_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _agreement_commercialagreements_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.CommercialAgreement
            {
                ProductCategory = "CommercialAgreement_ProductCategory",
                PaymentTerms    = "CommercialAgreement_PaymentTerms",
            };
            var _agreement_commercialagreements_supplier2 = new DSS5_SupplyChainFinancialsOptimisation.BO.CommercialAgreement
            {
                ProductCategory = "CommercialAgreement_ProductCategory",
                PaymentTerms    = "CommercialAgreement_PaymentTerms",
            };
            var _agreement_agreements_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.Agreement
            {
                StartDate              = now,
                EndDate                = now,
                FundedRate             = 222222.22M,
                FundedAmount           = 222222.22M,
                CurrentAgreementStatus = "Agreement_CurrentAgreementStatus",
                InterestRate           = 222222.22M,
            };
            var _agreement_agreements_supplier2 = new DSS5_SupplyChainFinancialsOptimisation.BO.Agreement
            {
                StartDate              = now,
                EndDate                = now,
                FundedRate             = 222222.22M,
                FundedAmount           = 222222.22M,
                CurrentAgreementStatus = "Agreement_CurrentAgreementStatus",
                InterestRate           = 222222.22M,
            };
            var _supplier_supplierbusinessstructuredata_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierBusinessStructureData
            {
                NumOfCustomersD           = 8305,
                NumOfCustomersAbroad      = 2564,
                NumOfCustomersEU          = 7939,
                NumOfCustomers            = 9311,
                ThereofActiveD            = 1730,
                ThereofActiveAbroad       = 3597,
                ThereofActiveEU           = 6691,
                ThereofActive             = 9832,
                NumOfOccasionalCustD      = 5778,
                NumOfOccasionalCustAbroad = 9576,
                NumOfOccasionalCustEU     = 8968,
                NumOfOccasionalCust       = 5981,
                NumOpenBalanceD           = 3463,
                NumOpenBalanceAboad       = 7036,
                NumOpenBalanceEU          = 7273,
                NumOpenBalance            = 4600,
                NumOfInvoicesD            = 9503,
                NumOfInvoicesAbroad       = 5853,
                NumOfInvoicesEU           = 7845,
                NumOfInvoices             = 1007,
                NumOfEmployeesD           = 7719,
                NumOfEmployeesAbroad      = 6432,
                NumTransCustD             = 7582,
                NumTransCustAbroad        = 7573,
                NumTransCustEU            = 2899,
                NumTransCust            = 6393,
                ApplicableCommercialLaw = "SupplierBusinessStructureData_ApplicableCommercialLaw",
                Jurisdiction            = "SupplierBusinessStructureData_Jurisdiction",
            };
            var _supplier_supplierreceivables_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierReceivables
            {
                DomesticCustomersPresent     = 2222222222.22222M,
                DomesticCustomersPrior       = 2222222222.22222M,
                EUCustomersPresent           = 2222222222.22222M,
                EUCustomersPrior             = 2222222222.22222M,
                ThirdCountryCustomersPresent = 2222222222.22222M,
                ThirdCountryCustomersPrior   = 2222222222.22222M,
                WillUploadFiles = true,
                TotalPrior      = 2222222222.22222M,
                TotalPresent    = 2222222222.22222M,
            };
            var _supplier_suppliercontactinformation_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierContactInformation
            {
                ContactPerson    = "SupplierContactInformation_ContactPerson",
                AddressOne       = "SupplierContactInformation_AddressOne",
                AddressTwo       = "SupplierContactInformation_AddressTwo",
                Telephone        = "SupplierContactInformation_Telephone",
                Email            = "SupplierContactInformation_Email",
                ManagingDirector = "SupplierContactInformation_ManagingDirector",
                EstablishedIn    = "SupplierContactInformation_EstablishedIn",
            };
            var _supplier_supplierturnover_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierTurnover
            {
                PlannedCurrentYear       = 2222222222.22222M,
                PlannedCurrentYearD      = 2222222222.22222M,
                PlannedCurrentYearEU     = 2222222222.22222M,
                PlannedCurrentYearAbroad = 2222222222.22222M,
                PlannedNextYear          = 2222222222.22222M,
                PlannedNextYearD         = 2222222222.22222M,
                PlannedNextYearEU        = 2222222222.22222M,
                PlannedNextYearAbroad    = 2222222222.22222M,
                ActualPreviousYear       = 2222222222.22222M,
                ActualPreviousYearAbroad = 2222222222.22222M,
                ActualPreviousYearD      = 2222222222.22222M,
                ActualPreviousYearEU     = 2222222222.22222M,
                PercentageD        = 2222222222.22222M,
                PercentageEU       = 2222222222.22222M,
                PercentageAbroad   = 2222222222.22222M,
                PercentageCND      = 2222222222.22222M,
                PercentageCNEU     = 2222222222.22222M,
                PercentageCNAbroad = 2222222222.22222M,
                PercentageSales    = 2222222222.22222M,
                PercentageCN       = 2222222222.22222M,
            };
            var _supplier_supplierextrainformation_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierExtraInformation
            {
                OccurenceBadDebts      = "SupplierExtraInformation_OccurenceBadDebts",
                ExistenceCounterClaims = "SupplierExtraInformation_ExistenceCounterClaims",
                HasCompanyAssigned     = "SupplierExtraInformation_HasCompanyAssigned",
                AreCompanyReceivables  = "SupplierExtraInformation_AreCompanyReceivables",
            };
            var _supplier_financialstatements_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_financialstatements_supplier2 = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_economicevaluations_supplier2 = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_economicevaluations_supplier22 = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_businessplans_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_businessplans_supplier2 = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_prioroutstandingbalances_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_prioroutstandingbalances_supplier2 = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_outstandingbalances_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_outstandingbalances_supplier2 = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_currentsituations_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_currentsituations_supplier2 = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_currentstatements_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_currentstatements_supplier2 = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_currentcredits_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_currentcredits_supplier2 = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_factoringagreements_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_factoringagreements_supplier2 = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_customeragreements_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_customeragreements_supplier2 = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_generalconstractuals_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_generalconstractuals_supplier2 = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_organizationalcharts_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_organizationalcharts_supplier2 = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_invoicesforms_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_invoicesforms_supplier2 = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_declarations_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_declarations_supplier2 = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads
            {
                Path = "SupplierUploads_Path",
            };
            var _supplier_supplierevaluation_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierEvaluation
            {
                Environment             = "SupplierEvaluation_Environment",
                ContractualPaymentTerms = 2222222222.22222M,
                Average             = 2222222222.22222M,
                AverageInvoiceValue = 2222222222.22222M,
                EquityRatio         = 2222222222.22222M,
            };
            var _supplier_dataquality_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.DataQuality
            {
                Orders                = true,
                DeliveryNotes         = true,
                CustomsDocuments      = true,
                IntermediaryLogistics = true,
                Invoices              = true,
                PoDs        = true,
                PaymentData = true,
            };
            var _supplier_dataavailability_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.DataAvailability
            {
                Orders                = true,
                DeliveryNotes         = true,
                CustomsDocuments      = true,
                IntermediaryLogistics = true,
                Invoices              = true,
                PoDs        = true,
                PaymentData = true,
            };
            var _supplierproduct_supplierproducts_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierProduct
            {
                Code            = "SupplierProduct_Code",
                Description     = "SupplierProduct_Description",
                UnitValue       = "SupplierProduct_UnitValue",
                MeasurementUnit = "SupplierProduct_MeasurementUnit",
                Price           = 222222.22M,
            };
            var _supplierproduct_supplierproducts_supplier2 = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierProduct
            {
                Code            = "SupplierProduct_Code",
                Description     = "SupplierProduct_Description",
                UnitValue       = "SupplierProduct_UnitValue",
                MeasurementUnit = "SupplierProduct_MeasurementUnit",
                Price           = 222222.22M,
            };
            var _transaction_transactions_supplier = new DSS5_SupplyChainFinancialsOptimisation.BO.Transaction
            {
                TransactionDateOccured = now,
                TransactionValue       = 2222222222.22222M,
                FundedAmount           = 2222222222.22222M,
                ToBePaidAmount         = 2222222222.22222M,
                InvoicedDate           = now,
                PaymentStatus          = "Transaction_PaymentStatus",
                PaymentDate            = now,
                RestPaymentAmount      = 2222222222.22222M,
                PaidByBuyer            = true,
            };
            var _transaction_transactions_supplier2 = new DSS5_SupplyChainFinancialsOptimisation.BO.Transaction
            {
                TransactionDateOccured = now,
                TransactionValue       = 2222222222.22222M,
                FundedAmount           = 2222222222.22222M,
                ToBePaidAmount         = 2222222222.22222M,
                InvoicedDate           = now,
                PaymentStatus          = "Transaction_PaymentStatus",
                PaymentDate            = now,
                RestPaymentAmount      = 2222222222.22222M,
                PaidByBuyer            = true,
            };

            new PersistenceSpecification <DSS5_SupplyChainFinancialsOptimisation.BO.Supplier>(Session)
            .CheckProperty(p => p.SupplierId, 7413)
            .CheckProperty(p => p.Company, "Supplier_Company")
            .CheckProperty(p => p.CompanyLogo, "Supplier_CompanyLogo")
            .CheckProperty(p => p.Business, "Supplier_Business")
            .CheckProperty(p => p.CurrentAmount, "Supplier_CurrentAmount")
            .CheckProperty(p => p.AverageAmount, "Supplier_AverageAmount")
            .CheckProperty(p => p.PercentageOfCreditNotes, "Supplier_PercentageOfCreditNotes")
            .CheckProperty(p => p.PrimaryPhone, "Supplier_PrimaryPhone")
            .CheckProperty(p => p.SecondaryPhone, "Supplier_SecondaryPhone")
            .CheckProperty(p => p.Fax, "Supplier_Fax")
            .CheckProperty(p => p.WebSite, "Supplier_WebSite")
            .CheckProperty(p => p.AcceptedPolicyTerms, true)
            .CheckProperty(p => p.SupplierStatus, "Supplier_SupplierStatus")
            .CheckProperty(p => p.DomainFocus, "Supplier_DomainFocus")
            .CheckProperty(p => p.EvaluationResult, "Supplier_EvaluationResult")
            .CheckProperty(p => p.EvaluationCountResult, 5378)
            .CheckProperty(p => p.AnnualTurnover, true)
            .CheckProperty(p => p.BEnvironment, true)
            .CheckProperty(p => p.PTerms, true)
            .CheckProperty(p => p.Average, true)
            .CheckProperty(p => p.InvoiceValue, true)
            .CheckProperty(p => p.EqRatio, true)
            .CheckProperty(p => p.Prefix, "Supplier_Prefix")
            .CheckProperty(p => p.VATNumber, "Supplier_VATNumber")
            .CheckProperty(p => p.MarketSegment, "Supplier_MarketSegment")
            .CheckProperty(p => p.AdditionalComments, "Supplier_AdditionalComments")
            .CheckProperty(p => p.AdditionalCommentsStep2, "Supplier_AdditionalCommentsStep2")
            .CheckProperty(p => p.AdditionalCommentsStep3, "Supplier_AdditionalCommentsStep3")
            .CheckProperty(p => p.UserName, "5751132e-819d-430c-9606-abc087f96970Supplier_UserName")
            .CheckProperty(p => p.PasswordHash, "Supplier_PasswordHash")
            .CheckProperty(p => p.SecurityStamp, "Supplier_SecurityStamp")
            .CheckProperty(p => p.EmailConfirmed, true)
            .CheckProperty(p => p.LockoutEnabled, true)
            .CheckProperty(p => p.PhoneNumberConfirmed, true)
            .CheckProperty(p => p.TwoFactorEnabled, true)
            .CheckProperty(p => p.AccessFailedCount, 7261)
            .CheckProperty(p => p.Name, "Supplier_Name")
            .CheckProperty(p => p.Email, "Supplier_Email")
            .CheckProperty(p => p.PhoneNumber, "Supplier_PhoneNumber")
            .CheckProperty(p => p.LockoutEndDate, now)
            .CheckBag(p => p.CommercialAgreements, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.CommercialAgreement>
            {
                _agreement_commercialagreements_supplier,
                _agreement_commercialagreements_supplier2
            }))
            .CheckBag(p => p.Agreements, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.Agreement>
            {
                _agreement_agreements_supplier,
                _agreement_agreements_supplier2
            }))
            .CheckReference(p => p.SupplierBusinessStructureData, _supplier_supplierbusinessstructuredata_supplier)
            .CheckReference(p => p.SupplierReceivables, _supplier_supplierreceivables_supplier)
            .CheckReference(p => p.SupplierContactInformation, _supplier_suppliercontactinformation_supplier)
            .CheckReference(p => p.SupplierTurnover, _supplier_supplierturnover_supplier)
            .CheckReference(p => p.SupplierExtraInformation, _supplier_supplierextrainformation_supplier)
            .CheckBag(p => p.FinancialStatements, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads>
            {
                _supplier_financialstatements_supplier,
                _supplier_financialstatements_supplier2
            }))
            .CheckBag(p => p.EconomicEvaluations, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads>
            {
                _supplier_economicevaluations_supplier2,
                _supplier_economicevaluations_supplier22
            }))
            .CheckBag(p => p.BusinessPlans, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads>
            {
                _supplier_businessplans_supplier,
                _supplier_businessplans_supplier2
            }))
            .CheckBag(p => p.PriorOutstandingBalances, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads>
            {
                _supplier_prioroutstandingbalances_supplier,
                _supplier_prioroutstandingbalances_supplier2
            }))
            .CheckBag(p => p.OutstandingBalances, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads>
            {
                _supplier_outstandingbalances_supplier,
                _supplier_outstandingbalances_supplier2
            }))
            .CheckBag(p => p.CurrentSituations, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads>
            {
                _supplier_currentsituations_supplier,
                _supplier_currentsituations_supplier2
            }))
            .CheckBag(p => p.CurrentStatements, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads>
            {
                _supplier_currentstatements_supplier,
                _supplier_currentstatements_supplier2
            }))
            .CheckBag(p => p.CurrentCredits, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads>
            {
                _supplier_currentcredits_supplier,
                _supplier_currentcredits_supplier2
            }))
            .CheckBag(p => p.FactoringAgreements, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads>
            {
                _supplier_factoringagreements_supplier,
                _supplier_factoringagreements_supplier2
            }))
            .CheckBag(p => p.CustomerAgreements, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads>
            {
                _supplier_customeragreements_supplier,
                _supplier_customeragreements_supplier2
            }))
            .CheckBag(p => p.GeneralConstractuals, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads>
            {
                _supplier_generalconstractuals_supplier,
                _supplier_generalconstractuals_supplier2
            }))
            .CheckBag(p => p.OrganizationalCharts, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads>
            {
                _supplier_organizationalcharts_supplier,
                _supplier_organizationalcharts_supplier2
            }))
            .CheckBag(p => p.InvoicesForms, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads>
            {
                _supplier_invoicesforms_supplier,
                _supplier_invoicesforms_supplier2
            }))
            .CheckBag(p => p.Declarations, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.SupplierUploads>
            {
                _supplier_declarations_supplier,
                _supplier_declarations_supplier2
            }))
            .CheckReference(p => p.SupplierEvaluation, _supplier_supplierevaluation_supplier)
            .CheckReference(p => p.DataQuality, _supplier_dataquality_supplier)
            .CheckReference(p => p.DataAvailability, _supplier_dataavailability_supplier)
            .CheckBag(p => p.SupplierProducts, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.SupplierProduct>
            {
                _supplierproduct_supplierproducts_supplier,
                _supplierproduct_supplierproducts_supplier2
            }))
            .CheckBag(p => p.Transactions, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.Transaction>
            {
                _transaction_transactions_supplier,
                _transaction_transactions_supplier2
            }))
            .VerifyTheMappings();
        }