10 Mart 2014 Pazartesi

AXAPTA - Evrak satırlarında KDV oranları ve tutarlarını bulmak


while select InvoiceTrans where
        InvoiceTrans.SalesId == InvoiceJour.SalesId && InvoiceTrans.InvoiceId == InvoiceJour.InvoiceId &&
        InvoiceTrans.InvoiceDate == InvoiceJour.InvoiceDate && InvoiceTrans.numberSequenceGroup == InvoiceJour.numberSequenceGroup
    {
        InvoicePrintTrans.Name  = InvoiceTrans.Name;
        select taxOnItem
                where taxOnItem.TaxItemGroup == InvoiceTrans.TaxItemGroup
            join taxGroupData
                where taxGroupData.TaxCode == taxOnItem.TaxCode &&
                      taxGroupData.TaxGroup == InvoiceTrans.TaxGroup;
        TaxValue  = TaxData::find(TaxOnItem.TaxCode, InvoiceTrans.InvoiceDate, 0).TaxValue;
Tax = Tax::calcTaxAmount(InvoiceTrans.TaxGroup,taxOnItem.TaxItemGroup,InvoiceTrans.InvoiceDate,
                InvoiceTrans.CurrencyCode,InvoiceTrans.LineAmount,TaxModuleType::Sales);

        info(strFmt("KDV oranı %1 KDV tutarı",TaxValue,Tax));
    }

Hiç yorum yok:

Yorum Gönderme