Как бы и ошибок нет, Но индусы снова поражают своей логикой!
В классе
PurchTableType:
X++:
/// <summary>
/// Checks if the invoice can be updated.
/// </summary>
/// <returns>
/// Returns true if the invoice can be updated.
/// </returns>
// <GIN>
public boolean canInvoiceBeUpdated_IN()
{
boolean ok = true;
ok = this.mayInvoiceBeUpdated();
if (ok && !VendTable::canVendorBeUpdated(purchTable.OrderAccount, purchTable.InvoiceAccount, DocumentStatus::Invoice))
{
ok = false;
}
if (ok)
{
if (purchTable.InterCompanyOrder
&& purchTable.InterCompanyOriginalSalesId
&& purchTable.InterCompanyDirectDelivery)
{
ok = (!purchTable.interCompanyEndpointActionPolicy().PostPurchInvoice
&& purchTable.interCompanySalesTable().SalesStatus == SalesStatus::Invoiced);
}
ok = ok && true; // Что это за дикость?
}
if (ok)
{
ok = this.checkPurchQty(DocumentStatus::Invoice);
}
return ok;
}
// </GIN>