Procedura-AssetExpensesCurr
- Popis:
- Procedura vrátí kód měny dokladu, který je uložen do agendy Související výdaje
Parametry:
Návratové hodnoty:
Tělo:
BEGIN
/* Faktury přijaté */
if (ADoc_Type = '04') then begin
select A.Code from Currencies A
where A.ID in
(select Currency_ID from ReceivedInvoices B
where :AnID=B.ID)
into :ACurrency;
suspend;
exit;
end
/* Pokladna výdej */
if (ADoc_Type = '06') then begin
select A.Code from Currencies A
where A.ID in
(select Currency_ID from CashPaid B
where :AnID=B.ID)
into :ACurrency;
suspend;
exit;
end
/* Ostatní doklady výdej */
if (ADoc_Type = '02') then begin
select A.Code from Currencies A
where A.ID in
(select Currency_ID from OtherExpenses B
where :AnID=B.ID)
into :ACurrency;
suspend;
exit;
end
/* JCD */
if (ADoc_Type = '12') then begin
select A.Code from Currencies A
where A.ID in
(select Currency_ID from CustomsDeclarations B
where :AnID=B.ID)
into :ACurrency;
suspend;
exit;
end
/* DZP */
if (ADoc_Type = '64') then begin
select A.Code from Currencies A
where A.ID in
(select Currency_ID from VATReceivedDInvoices B
where :AnID=B.ID)
into :ACurrency;
suspend;
exit;
end
END;
Generated by ABRA Software a.s. 27.10.2021 16:34:24