Procedura-POSCountPaymentsForValidate
- Popis:
- Počet plateb
Parametry:
Návratové hodnoty:
| Název | Popis | Datový typ |
|---|
| acount | | Integer |
Tělo:
begin
select count(pd3.id)
from posdocuments3 pd3
where
pd3.parent_ID = :aDocument_ID and
pd3.paymenttype_id = :aPaymentType_ID and
pd3.Currency_id = :aCurrency_ID and
pd3.payment=:aPayment
into
mpayment;
select count(pd3.id) as plus
from posdocuments3 pd3
where
pd3.parent_ID = :aDocument_ID and
pd3.paymenttype_id = :aPaymentType_ID and
pd3.Currency_id = :aCurrency_ID and
pd3.refund = :aPayment
into
mrefund;
acount = mpayment - mrefund;
suspend;
end
Generated by ABRA Software a.s. 27.10.2021 16:34:31