0

我正在使用 SAGE 50 会计 SDK C#,我需要使用项目创建销售报价。我已经实现了创建销售报价记录并且只有 1 个项目,但是如果我想添加超过 1 个项目,似乎 SAGE 正在创建一个只有一个项目的销售报价记录。这是我正在使用的代码:

        TOSalesInvoiceCollection salesinvoiceCollection = new TOSalesInvoiceCollection();
        TOSalesInvoiceRowCollection items = new TOSalesInvoiceRowCollection();

        TOSalesInvoice salesinvoice = new TOSalesInvoice();
        salesinvoice.CustomerID = "4444";
        salesinvoice.Date = System.DateTime.Now.ToShortDateString();
        salesinvoice.IsQuote = true;
        salesinvoice.ARAccount = "11010";
        salesinvoice.NumberOfDistributions = 1;
        salesinvoice.Note = "Sales Quote created for Group: " + 1;
        salesinvoice.InternalNote = "NOTE YUCEL";

        TOSalesInvoiceRow line = new TOSalesInvoiceRow();
        line.GLAccount = "10090";
        line.ItemID = "WLL";
        line.Quantity = 1;
        decimal unitprice = 3433.20m;
        line.UnitPrice = unitprice;
        line.Amount = unitprice;
        line.JobID = "1";
        line.Description = "Line  ; AE01.22; Architectural and Engineering Drawing*";
        line.OrderDistributionNumber = 1;
        items.Add(line);

        TOSalesInvoiceRow line2 = new TOSalesInvoiceRow();
        line2.GLAccount = "10090";
        line2.ItemID = "0002";
        line2.Quantity = 1;
        decimal unitprice2 = 3433.20m;
        line2.UnitPrice = unitprice2;
        line2.Amount = unitprice2;
        line2.JobID = "1";
        line2.Description = "1-A FAA & FCC Required Coordinates Form";
        line2.OrderDistributionNumber =2;

        items.Add(line2);

        salesinvoice.RowCollection = items;

        salesinvoiceCollection.Add(salesinvoice);
        TOSalesInvoice.SaveAll(_boSalesInvoiceSettings, null, salesinvoiceCollection);

代码中是否有任何内容需要我将这两个项目都放入仅 1 个销售报价单中?

SAGE 中的结果如下所示:

在此处输入图像描述

4

1 回答 1

0

我发现,在这种情况下,TOSalesInvoice NumberOfDistributions应该设置为我们想要设置的行项目数,并且在销售报价行OrderDistributionNumber就像“项目行号”。

于 2018-01-18T18:55:30.713 回答