Commit 42ad8594 authored by Monish Deb's avatar Monish Deb

AGBU-44: support billno in AP entries

parent 12aa8918
......@@ -115,6 +115,7 @@ class CRM_Syncintacct_API {
$billEntry->setDescription($APBatch['DESCRIPTION']);
$billEntry->setLines($APBatch['ENTRIES']);
$billEntry->setDueDate($APBatch['DUE_DATE']);
$billEntry->setBillNumber($APBatch['BILLNO']);
$billEntry->setTransactionCurrency($APBatch['CURRENCY']);
$billEntry->getBaseCurrency('USD');
$billEntry->setAction('Draft');
......
......@@ -70,7 +70,7 @@ class CRM_Syncintacct_Util {
LEFT JOIN civicrm_financial_item fi ON fi.id = efti.entity_id
LEFT JOIN civicrm_financial_account fac ON fac.id = fi.financial_account_id
LEFT JOIN civicrm_financial_account fa ON fa.id = fi.financial_account_id
WHERE eb.batch_id = ( %1 )";
WHERE eb.batch_id = ( %1 ) AND ft.id IS NOT NULL ";
$params = array(1 => array($batchID, 'Integer'));
$dao = CRM_Core_DAO::executeQuery($sql, $params);
......@@ -163,6 +163,7 @@ class CRM_Syncintacct_Util {
'DESCRIPTION' => $dao->item_description,
'TRXN_DATE' => new DateTime($dao->trxn_date),
'DUE_DATE' => new DateTime(date('Ymd')),
'BILLNO' => $batchID,
'ENTRIES' => [],
];
$accountCode = $dao->credit_account ?: $dao->from_credit_account;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment