BKTL - Bracket Levels

APIs For This Group

ADDBKTL - Add Bracket Level

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDBUYR         'ID buyer'                    5A 
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A
BOTH    IDBKTLVL       'Discount bracket level'     1  0
BOTH    DIS1TYP        'Discount 1st type'          1  0
BOTH    DIS2TYP        'Discount 2nd type'          1  0
BOTH    DIS1VAL        'Discount 1st value'         7  0
BOTH    DIS2VAL        'Discount 2nd value'         7  0
BOTH    DIS1UNT        'Discount 1st unit'          1  0
BOTH    DIS2UNT        'Discount 2nd unit'          1  0
BOTH    DISRATE        'Discount rate %'            3  1
BOTH    DISSAVG        'Discount savings'           5  0

CHKBKTL - Validate that Order meets Discount Bracket Level

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDBUYR         'ID buyer'                    5A 
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A
BOTH    IDSOQSEQN      'Sequence'                    5 0
BOTH    RVMEETBKL      'Meet Bracket Level'          1 0

CPYBKTL - Copy Bracket Level To All Locations

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDBUYR         'ID buyer'                    5A 
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A
BOTH    SBBRACKET      'Bracket to be copied '       1 0

DELBKTL - Copy Bracket Level To All Locations

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDBUYR         'ID buyer'                    5A 
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A
BOTH    IDBKTLVL      'Discount bracket level'     1  0

DFTBKTL - This will return the next bracket level that can be added

BOTH            K3SOBJ            'K3S Object library'            10A
BOTH            COMP              'Company'                        1A
BOTH            COMPCOD           'Company code'                   3A
BOTH            USER              'User calling the program'      10A
BOTH            ERRORS            'Error indicator'                1A
BOTH            ERRMSG            'Error message'                100A
BOTH            ERRFIELD          'Field in error'                20A
BOTH            IDLOCN            'ID location'                    5A
BOTH            IDBUYR            'ID buyer'                       5A 
BOTH            IDSUPL            'ID supplier'                   10A
BOTH            IDSUPLSUB         'ID sub supplier'               10A
BOTH            RVNXTBKTL         'Next bracket level number'      1  0

SELBKTL - Select a Bracket Level to be active

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDBUYR         'ID buyer'                    5A
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A
BOTH    IDBKTLVL       'Discount bracket level'     1  0

UPDBKTL - Update A Bracket Level

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDBUYR         'ID buyer'                    5A
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A
BOTH    IDBKTLVL       'Discount bracket level'      1  0
BOTH    SBDIS1TYP      'Discount 1st type'           1  0
BOTH    SBDIS2TYP      'Discount 2nd type'           1  0
BOTH    SBDIS1VAL      'Discount 1st value'          7  0
BOTH    SBDIS2VAL      'Discount 2nd value'          7  0
BOTH    SBDIS1UNT      'Discount 1st unit'           1  0
BOTH    SBDIS2UNT      'Discount 2nd unit'           1  0
BOTH    SBDISRATE      'Discount rate %'             3  1
BOTH    SBDISSAVG      'Discount savings'            5  0

PADBKTL - Add a Product bracket level

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDBUYR         'ID buyer'                    5A 
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A
BOTH    IDPROD         'Product ID'                 25A
BOTH    SBBRKTLVL      'Bracket Level'               1A  
BOTH    SBCSTLEVL      'Bracket Cost Level'         11 4

PUDBKTL - Update a Product bracket level

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDBUYR         'ID buyer'                    5A 
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A
BOTH    IDPROD         'Product ID'                 25A
BOTH    SBBRKLEVL      'Bracket Level'               1A  
BOTH    SBCSTLEVL      'Bracket Cost Level'         11 4

PDLBKTL - Delete a Product bracket level

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDBUYR         'ID buyer'                    5A 
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A
BOTH    IDPROD         'Product ID'                 25A

PGDBKTL - Generate product bracket levels for all products of a supplier

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDBUYR         'ID buyer'                    5A 
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A 
BOTH    SBBRKLEVL      'Bracket Level'               1A  
BOTH    SBCSTPRCT      'Bracket Level Percent'       5 2

PRMBKTL - Remove all product bracket levels of a certain level for a Supplier

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDBUYR         'ID buyer'                    5A 
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A 
BOTH    SBBRKLEVL      'Bracket Level '              1A  

USLBKTL - Unselet Bracket Level for a Supplier

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A