108: Wizard - increase customer price list
Colin Horne, 03/02/2004
For instructions on how to use the wizards contained in the technical news, please read the technical news article called How to use technical news wizards.
This Wizard increases the selling price for items sold to the specifed customer by the percentage given
{{{ TEMPLATE: CustCatIncrease,CustCatIncrease,Increase customer cat. prices,csh
{{{ DESCRIPTION:
This Wizard increases the CUSTOMER SPECIFIC prices by the percentage given.
.
.
.
Do you wish to continue?
}}}
SETPAD:,Void
EXP:,MonitorStart('Customer Catalogue Price Increase')
{{{ SECTION:Define variables
SETPAD:Ref:Yes ,Flag ,Yes
SETPAD:Ref:No ,Flag ,No
SETPAD:MCHNumberTotal ,Int
SETFLD:MCK:Customer ,mck ,mckLoop ,Customer
SETFLD:MCK:Price ,mck ,mckLoop ,Price
}}}
!stop monitor before input required
EVAL:,=MonitorStop()
{{{ PAGE:Get customer & increase
ASKFLD:Specify the customer ,mck ,MCKRec ,Customer
TIP: ,Specify the customer for price increase
ASKPAD:Specify the percentage increase required ,Real
TIP: ,Define the percentage increase to be applied to the customer catalogue items
}}}
{{{ IF:PercentNotZero ,Specify the percentage increase required
EVAL:,=MonitorStart('Customer Catalogue Price Increase')
{{{ SECTION:Prepare list of customer items
EVAL:,=MonitorStep('Prepare list of items for increase')
SETPAD:CustItems ,RecNoQ ,=Find(Specify the customer,Specify the customer)
EVAL:,=MonitorStep('Filter all items without a price')
EVAL:,=Filter(CustItems,Selected(CustItems)[Price])
}}}
{{{ IF:ItemsToAdjust ,Items(CustItems)
SETPAD:MultiplyFactor ,Real ,=(100 + Specify the percentage increase required)/100
EVAL:,=MonitorStep('Apply the modification')
{{{ SECTION:Apply the percentage
EVAL:,=MonitorStart()
{{{ SECTION:Setup transaction
EVAL:,=TransPrepare('Prepare transaction')
EVAL:,=TransInclude('enh')
EVAL:,=TransInclude('enq')
EVAL:,=TransInclude('frf')
EVAL:,=TransInclude('gxl')
EVAL:,=TransInclude('jst')
EVAL:,=TransInclude('mch')
EVAL:,=TransInclude('mcb')
EVAL:,=TransInclude('mck')
EVAL:,=TransInclude('mcm')
EVAL:,=TransInclude('mcs')
EVAL:,=TransInclude('msc')
EVAL:,=TransInclude('msi')
EVAL:,=TransInclude('msj')
EVAL:,=TransInclude('pod')
EVAL:,=TransInclude('pog')
EVAL:,=TransInclude('poh')
EVAL:,=TransInclude('poi')
EVAL:,=TransInclude('pol')
EVAL:,=TransInclude('rsc')
EVAL:,=TransInclude('rsu')
EVAL:,=TransInclude('sda')
EVAL:,=TransInclude('sdi')
EVAL:,=TransInclude('sol')
EVAL:,=TransInclude('sop')
EVAL:,=TransInclude('woa')
EVAL:,=TransInclude('wod')
EVAL:,=TransInclude('woh')
EVAL:,=TransInclude('wor')
EVAL:,=TransBegin()
}}}
EVAL:
EXP: ,Iterate(Load(Item(Iteration(),CustItems) ,MCK:Customer);
EXP: , MCHNumberTotal + 1 @ MCHNumberTotal; MonitorStop(); MonitorStart(MCHNumberTotal & '...' & MCK:Customer);
EXP: , MCK:Price * MultiplyFactor @ MCK:Price ;Update(MCK:Customer),
EXP: ,Iteration() = Items(CustItems))
EVAL:,=TransEnd()
EVAL:,=MonitorStop()
}}}
EXIT: ,=MCK:Customer
}}}
EVAL:,=MonitorStop()
EXIT: ,=Void()
TIP: ,No customer items to adjust
}}}
EXIT: ,=Void()
TIP: ,Zero increase specified
}}}
Back to latest news |