Показать сообщение отдельно
Старый 15.12.2021, 11:04   #431  
dech is offline
dech
Участник
Аватар для dech
Самостоятельные клиенты AX
 
642 / 347 (13) ++++++
Регистрация: 25.06.2009
Адрес: Омск
Записей в блоге: 3
Как бы и ошибок нет, Но индусы снова поражают своей логикой!
В классе 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>
__________________
// no comments