PurchUpdate recommendedSpecQty(DocumentStatus _documentStatus)Form PurchEditLines
{
PurchUpdate specQty;
switch (_documentStatus)
{
case DocumentStatus::Invoice :
specQty = PurchUpdate::PackingSlip;
break;
case DocumentStatus::PackingSlip :
specQty = PurchUpdate::ReceiveNow;
break;
default:
specQty = PurchUpdate::All;
break;
}
return specQty;
}
if(PurchParameters::find().PromptQty)
{
recommendedQty = purchFormLetter.recommendedSpecQty();
if(recommendedQty != specQty.selection())
{
boxFormOnceIsActive = true;
if(documentStatus != DocumentStatus::PackingSlip)
{
box = BoxFormOnce::construct();
box.parmDialogBoxType(DialogBoxType::YesNoBox);
box.parmDialogButton(DialogButton::Yes);
box.parmTitle("@SYS59372");
box.parmText(strFmt("@SYS102340", salesUpdateEnum.index2Name(specQty.selection()), salesUpdateEnum.index2Name(recommendedQty)));
box.parmOwner(new SysDictClass(classIdGet(purchEditLinesForm)).name());
if(box.prompt() == DialogButton::Yes)
{
specQty.selection(recommendedQty);
specQty.selectionChange();
}
}
else
{
specQty.selection(recommendedQty);
specQty.selectionChange();
}
boxFormOnceIsActive = false;
}
}