Step 1 :
Create Button
Step 2 :
Write code in button in overwrite click method are below
void clicked()
{
PurchParmTable _ppt;
str inv;
int rec;
dialog dlg;
//dialogGroup dlgGroupLedgerAccount;
//dialogField dlgFieldLedgerAccount;
//dialogField dlgFieldBudgetAccount;
//dialogField dlgFieldBudgetAccounts;
dialogField fldSTInv;
dialogButton db;
;
super();
dlg = new dialog("Update Sale Tax Invoice Number");
fldSTInv = dlg.addField( TypeID(STInvNo), "Update Sales Tax Invoice Number :");
if (dlg.run())
{
db = box::yesNo("Do you really want to update?",DialogButton::No,"Sales Tax Invoice Number is Update");
if (db == DialogButton::Yes)
{
ttsbegin;
vendInvoiceJour.STInvNo = fldSTInv.value();
vendInvoiceJour.update();
select forupdate _ppt where _ppt.ParmId == vendInvoiceJour.ParmId &&
_ppt.PurchId == vendInvoiceJour.PurchId;
if(_ppt.RecId)
{
_ppt.STInvNo = fldSTInv.value();
_ppt.update();
}
ttscommit;
}
info("Sales Tax Invoice Number updated successfully.");
}
}
No comments:
Post a Comment