Description
This method is used to provide initial data for the User Interface
Parameters
ocInvoiceGroupingEnabled | output | character | Comma separated list of groupings which can enabled on the UI (Grouping by Receiver, Grouping by Legal Document) |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program1/bersprocessor.p)
/* ====================================================================================== *
* Method : UIInit *
* Description : Provide initial values for User Interface *
* -------------------------------------------------------------------------------------- *
* Parameters : *
* ====================================================================================== */
assign oiReturnStatus = -98
viLocalReturn = 0.
MAIN_BLOCK:
do on error undo, return:
/* Default output parameters */
assign ocInvoiceGroupingEnabled = {&ERSPROCESSORINVGROUP-RECEIVER}.
/* ============================================================================= */
/* Check the version of the Mfg/Pro whether Italian Fiscal document is supported */
/* If the MfgPro version is eB3.SP6 or lower, Italian Fiscal docuemnt was not */
/* implemented yet */
/* ============================================================================= */
<M-30 run StartCacher
(output vhFcComponent (ohCacher),
output viFcReturnSuper (oiReturnStatus)) in BERSProcessor>
if viFcReturnSuper <> 0
then oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.
<M-55 run GetIntegerValueFromSession
(input viSessionID (iiSessionId),
input 'MfgProMajorVersion' (icDataItemName),
output viMfgProMajorVersion (oiValue),
output viFcReturnSuper (oiReturnStatus)) in Cacher>
if viFcReturnSuper <> 0
then oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.
<M-52 run GetIntegerValueFromSession
(input viSessionID (iiSessionId),
input 'MfgProMinorVersion' (icDataItemName),
output viMfgProMinorVersion (oiValue),
output viFcReturnSuper (oiReturnStatus)) in Cacher>
if viFcReturnSuper <> 0
then oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.
if viMfgProMajorVersion > 3 /* Meaning eB3 */ or
(viMfgProMajorVersion = 3 /* Meaning eB3 */and
viMfgProMinorVersion >= 7 /* Meaning SP7 */)
then do:
/* Check if the Fiscal confirmation is required */
/* value is stored in PurchaseControl file (poc_ctrl) */
<Q-46 run POAccountingControlByDomainV01 (all) (Read) (NoCache)
(input vcDomainCode, (Domain)
output dataset tqPOAccountingControlByDomainV01) in BMfgPOAccountingControl>
find first tqPOAccountingControlByDomainV01 where
tqPOAccountingControlByDomainV01.tcpoc_domain = vcDomainCode
no-lock no-error.
if available tqPOAccountingControlByDomainV01 and
tqPOAccountingControlByDomainV01.tlpoc_fiscal_confirm = TRUE
then assign ocInvoiceGroupingEnabled = {&ERSPROCESSORINVGROUP-LEGALDOC}.
end.
end. /* MAIN_BLOCK */
assign oiReturnStatus = viLocalReturn.