08-12-2013, 01:04 PM,
|
|
avocado
Member
|
Posts: 38
Threads: 17
Joined: Jan 2012
|
|
Payments and chequeno
Hi,
When adding a new bank payment split on multiple GL Accounts, for example:
Bank Account 1121 -3000
GL Account 6100 2000
GL Account 6101 500
GL Account 6102 500
Two things happen:
1. BankTrans table will receive 3 transactions (2000,500,500) with account code changed to 1121.
2. ChequeNo in GL : Bank Account 1121 will always have 0 chequeno, although I've entered a cheque number! instead the cheque number will be associated with the 3 GL Accounts!
My view is that point no 1 : BankTrans should have a single entry of 3000 representing the total cheque value.
Point 2 : Cheque number should be associated with the BankAccount (1121 in this case) and not the other transaction.
Am I correct in my understanding? I'm willing to look at this and fix Payments.php, but I want confirmation that my understanding is correct first.
Thanks.
|
|
08-13-2013, 10:47 PM,
|
|
avocado
Member
|
Posts: 38
Threads: 17
Joined: Jan 2012
|
|
RE: Payments and chequeno
(08-13-2013, 06:31 AM)phil Wrote: Yes - you are understanding correctly - it sounds as though this is not working correctly.
PHP Code: foreach ($_SESSION['PaymentDetail' . $identifier]->GLItems as $PaymentItem) {
$SQL="INSERT INTO banktrans (transno,
type,
bankact,
ref,
exrate,
functionalexrate,
transdate,
banktranstype,
amount,
currcode)
VALUES ('" . $TransNo . "',
'" . $TransType . "',
'" . $_SESSION['PaymentDetail' . $identifier]->Account . "',
'" . $_SESSION['PaymentDetail' . $identifier]->Narrative . "',
'" . $_SESSION['PaymentDetail' . $identifier]->ExRate . "',
'" . $_SESSION['PaymentDetail' . $identifier]->FunctionalExRate . "',
'" . FormatDateForSQL($_SESSION['PaymentDetail' . $identifier]->DatePaid) . "',
'" . $_SESSION['PaymentDetail' . $identifier]->Paymenttype . "',
'" . -$PaymentItem->Amount . "',
'" . $_SESSION['PaymentDetail' . $identifier]->Currency . "' )";
$ErrMsg = _('Cannot insert a bank transaction because');
$DbgMsg = _('Cannot insert a bank transaction using the SQL');
$result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true);
}
Hello Phil,
This is the code that I believe is responsible for inserting multiple GLTrans into BankTrans table.
This is executed if the $TransType <> 22, Do you have a problem with me changing it to this :
PHP Code: $SQL="INSERT INTO banktrans (transno,
type,
bankact,
ref,
exrate,
functionalexrate,
transdate,
banktranstype,
amount,
currcode)
VALUES ('" . $TransNo . "',
'" . $TransType . "',
'" . $_SESSION['PaymentDetail' . $identifier]->Account . "',
'" . $_SESSION['PaymentDetail' . $identifier]->Narrative . "',
'" . $_SESSION['PaymentDetail' . $identifier]->ExRate . "',
'" . $_SESSION['PaymentDetail' . $identifier]->FunctionalExRate . "',
'" . FormatDateForSQL($_SESSION['PaymentDetail' . $identifier]->DatePaid) . "',
'" . $_SESSION['PaymentDetail' . $identifier]->Paymenttype . "',
'" . -$_SESSION['PaymentDetail' . $identifier]->Amount . "',
'" . $_SESSION['PaymentDetail' . $identifier]->Currency . "'
)";
$ErrMsg = _('Cannot insert a bank transaction because');
$DbgMsg = _('Cannot insert a bank transaction using the SQL');
$result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true);
|
|
08-25-2013, 10:05 PM,
|
|
avocado
Member
|
Posts: 38
Threads: 17
Joined: Jan 2012
|
|
RE: Payments and chequeno
Hello Phil,
Any comment? I would appreciate your feedback in order to make sure all is good!
|
|
10-06-2013, 07:02 PM,
|
|
avocado
Member
|
Posts: 38
Threads: 17
Joined: Jan 2012
|
|
RE: Payments and chequeno
Phil? any comment?
|
|
|