Description
Detail method for AccUnmarkedTransacations
Parameters
dcrAccUnmarkedTransactions | output | dataset | Dataset of AccUnmarkedTransactions. |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program7/bclosingpostingsreport.p)
empty temp-table tqAccUnmarkedTransactions.
/* ========================================================= */
/* Assign the filter-data-items based on the tFilter records */
/* ========================================================= */
<M-19 run SetDataItemsBasedOnFilterTTDet (output viFcReturnSuper (oiReturnStatus)) in BClosingPostingsReport>
/* Company iteration */
do viCPCompanyIterator = 1 to viCompanyEntries:
/* Assign company ID based on code */
if vcCPCompanyCodeFilter = ?
then do:
assign viCPCurrentCompany_ID = viCompanyId.
<Q-59 run CompanyPrim (first) (Read) (NoCache)
(input viCompanyId, (LookupCompanyId)
input ?, (CompanyCode)
output dataset tqCompanyPrim) in BCompany>
find first tqCompanyPrim no-error.
if available tqCompanyPrim
then assign vcCPCurrentCompany = tqCompanyPrim.tcCompanyCode.
end.
else do:
assign vcCPCurrentCompany = entry(viCPCompanyIterator ,vcCPCompanyCodeFilter,",":U).
<Q-83 run CompanyPrim (first) (Read) (NoCache)
(input ?, (LookupCompanyId)
input vcCPCurrentCompany, (CompanyCode)
output dataset tqCompanyPrim) in BCompany>
find first tqCompanyPrim no-error.
if available tqCompanyPrim
then assign viCPCurrentCompany_ID = tqCompanyPrim.tiCompany_ID.
end.
/* ============================*/
/* Call query using parameters */
/* ============================*/
for each Posting where
(Posting.Company_ID = viCPCurrentCompany_ID and Posting.PeriodMarK_ID = 0) or
(Posting.Company_ID = viCPCurrentCompany_ID and Posting.PeriodMark_ID = ?)
no-lock :
find Journal of Posting no-lock no-error.
find Period of Posting no-lock no-error.
if available Period
then find PeriodMark of Period no-lock no-error.
create tqAccUnmarkedTransactions.
assign tqAccUnmarkedTransactions.tcJournalCode = if available Journal then Journal.JournalCode else ''
tqAccUnmarkedTransactions.tcPostingParentText = Posting.PostingParentText
tqAccUnmarkedTransactions.tiPostingVoucher = Posting.PostingVoucher
tqAccUnmarkedTransactions.ttAccountingDate = Posting.PostingDate
tqAccUnmarkedTransactions.tcPeriodMark = if available Period and available PeriodMark
then PeriodMark.PeriodMarkCode
else ''
tqAccUnmarkedTransactions.tcSortBy = vcSortFilter.
end. /* for each Posting */
end. /* do */
find first tqAccUnmarkedTransactions no-error.
if not available tqAccUnmarkedTransactions
then do:
/*create tqAccPeriodMarkCheck.*/
create tqAccUnmarkedTransactions.
assign tqAccUnmarkedTransactions.tiExceptionNbr = -1
tqAccUnmarkedTransactions.tcExceptionMsg = #T-41'No unmarked transactions were found for the selected GL period.':255(57356)T-41#.
end.