project QadFinancials > class BDInvoice > method DefaultValuesTaxEnv

Description

default the tax environment


Parameters


icShipToTaxZoneinputcharacterTax Zone of the Ship To Address
icShipFromTaxZoneinputcharacterTax Zone of the Ship From Address
icTaxClassinputcharacterTax Class
ocTaxEnvoutputcharacterTax Environment
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


unused


program code (program3/bdinvoice.p)

/* replace unknown values */
    if icShipFromTaxZone = ? then assign icShipFromTaxZone = "":U.
    if icShipToTaxZone = ? then assign icShipToTaxZone = "":U.
    if icTaxClass = ? then assign icTaxClass = "":U.
    
    /* get the tax environment */
    assign vhFcComponent = ?.
    <M-1 run GetTaxEnvironment
       (input  true (ilStartAndOpenPGTM), 
        input  icShipFromTaxZone (icShipFromTaxZone), 
        input  icShipToTaxZone (icShipToTaxZone), 
        input  icTaxClass (icTxclTaxCls), 
        output ocTaxEnv (ocTxenvTaxEnv), 
        output viFcReturnSuper (oiReturnStatus)) in BVAT>
    if viFcReturnSuper < 0 or (viFcReturnSuper > 0 and oiReturnStatus = 0)
    then assign oiReturnStatus = viFcReturnSuper.