TaxGroupData

static TaxGroupData findTaxGroupData(    TaxGroup        _taxGroup,
                                            TaxItemGroup    _taxItemGroup,
                                            boolean         _update = false)
{
    TaxOnItem       taxOnItem;
    TaxGroupData    taxGroupData;
    ;
    taxGroupData.selectForUpdate(_update);
 
    while select taxCode
        from taxOnItem
        where taxOnItem.TaxItemGroup    == _taxItemGroup
    {
        select firstOnly taxGroupData
            where   taxGroupData.TaxGroup    == _taxGroup &&
                    taxGroupData.TaxCode           == taxOnItem.TaxCode;
 
        if(taxGroupData)
        {
            return taxGroupData;
        }
 
    }
    return taxGroupData;
}

One thought on “TaxGroupData

  1. I used this:

    TaxValue purchlineTaxRate(purchline _purchline)
    {
    TaxValue taxValue;
    TaxOnItem taxOnItem;
    TaxGroupData taxGroupData;
    ;
    //On détmerine le taxCode
    select firstonly TaxCode
    from taxOnItem
    where taxOnItem.TaxItemGroup == _purchline.TaxItemGroup
    join TaxGroupData
    where TaxGroupData.TaxGroup == _purchline.TaxGroup
    && TaxGroupData.TaxCode == taxOnItem.TaxCode;

    taxValue = TaxData::percent(taxOnItem.TaxCode, systemdateget(), 0); //aujourd’hui car pas encore facturé

    taxValue = taxValue/100;

    taxValue++;

    return taxValue;

    }

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s