0

我想通过代码发布所选采购订单(PO)行的发票。在代码中需要帮助。任何人都可以帮我编码吗?

4

1 回答 1

0

FormLetter 框架具有chooseLinesQuery接受要更新的行查询的方法。

看到这个博客

销售订单代码(您可以或多或少地用 'purch' 替换 'sales'):

SalesTable salesTable = SalesTable::find('your-order');
SalesFormLetter salesFormLetter = SalesFormLetter::construct(DocumentStatus::Invoice);
Query query = new Query(QueryStr(SalesUpdatePackingSlip));
QueryBuildDataSource qbds = query.dataSourceTable(tableNum(SalesLine));
// Build query range to find those lines which needs to be posted.
qbds.addRange(fieldNum(SalesLine, SalesStatus)).value(queryValue(SalesStatus::Backorder));
salesFormLetter.chooseLinesQuery(new queryRun(query));
salesFormLetter.update(salesTable);
于 2014-12-05T13:22:44.350 回答