Topic: Small script help please.....
I was trying to include two condition (boolean and Combobox) to perform the action with the below:
procedure frmSalesInv_btnCalc_OnClick (Sender: string; var Cancel: boolean; vrate:integer);
begin
vrate := sqlexecute('select taxrate from taxrates where id = '+frmSalesInv.cbSaleInvTaxRate.sqlvalue);
if frmSalesInv.cBoxSale.checked = True and // if it's a DB line
frmSalesInv.cbSaleInvDBCR.dbItemID = 0 then
begin
...
end;
if frmSalesInv.cBoxSale.checked = True and // if it's a CR line
frmSalesInv.cbSaleInvDBCR.dbItemID = 1 then
begin
...
end;
end;
It didn't work. I couldn't get the right syntax/structure to join both conditions?
I'm trying to convert sale into credit inv (refund) on same inv form.
God... please help me become the person my dog thinks I am.