Muhasebe için:
FiscalCalendars::checkModuleIsOpen(SysModule::Ledger, myTable.TransDate,FiscalCalendars::findPeriodByPeriodCodeDate(Ledger::fiscalCalendar(CompanyInfo::find().RecId),myTable.ETGTransDate),false)
veya
select firstOnly period
where transDate >= period.StartDate && transDate <= period.EndDate
exists join ledgerPeriod
where ledgerPeriod.FiscalCalendarPeriod == period.RecId &&
ledgerPeriod.Status != FiscalPeriodStatus::Open;
if (period.RecId != 0)
throw error("Yeni tarih için ilgili mali dönem kapalı!..");
Satış için:
FiscalCalendars::checkModuleIsOpen(SysModule::Sales, CustInvoiceJour.InvoiceDate,FiscalCalendars::findPeriodByPeriodCodeDate(Ledger::fiscalCalendar(CompanyInfo::find().RecId),CustInvoiceJour.InvoiceDate),false)
Stok kapanışı için:
InventClosing::findClosingDate(endmth(InventJournalTrans.TransDate))
Axapta - Usable functions for queries
5 yıl önce
Hiç yorum yok:
Yorum Gönder