project QadFinancials > class BVAT > method GetTaxEnvironment
Description
Get the tax environment
Parameters
ilStartAndOpenPGTM | input | logical | |
icShipFromTaxZone | input | character | Tax Zone of the Ship From |
icShipToTaxZone | input | character | Tax Zone of the Ship to |
icTxclTaxCls | input | character | Tax Class |
ocTxenvTaxEnv | output | character | Tax Environment |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program7/bvat.p)
assign oiReturnStatus = -98.
/* Replace unknown values */
if icShipFromTaxZone = ?
then assign icShipFromTaxZone = "":U.
if icShipToTaxZone = ?
then assign icShipToTaxZone = "":U.
if icTxclTaxCls = ?
then assign icTxclTaxCls = "":U.
if ilStartAndOpenPGTM
then do:
<I-1 {bFcStartAndOpenInstance
&CLASS = "PGTM"}>
end.
<M-5 run GetTaxEnvironmentByParam
(input icShipFromTaxZone (icFromTaxZoneCode),
input icShipToTaxZone (icToTaxZone),
input icTxclTaxCls (icTaxClassCode),
output ocTxenvTaxEnv (ocTaxEnvCode),
output viFcReturnSuper (oiReturnStatus)) in PGTM>
if viFcReturnSuper < 0 or
oiReturnStatus = -98
then assign oiReturnStatus = viFcReturnSuper.
if ilStartAndOpenPGTM
then do:
<I-6 {bFcCloseAndStopInstance
&CLASS = "PGTM"}>
end.
if oiReturnStatus = -98
then assign oiReturnStatus = 0.