Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Payments and chequeno
08-12-2013, 01:04 PM
Post: #1
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.
Find all posts by this user
Quote this message in a reply
08-13-2013, 06:31 AM
Post: #2
RE: Payments and chequeno
Yes - you are understanding correctly - it sounds as though this is not working correctly.

Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Visit this user's website Find all posts by this user
Quote this message in a reply
08-13-2013, 10:47 PM
Post: #3
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); 
Find all posts by this user
Quote this message in a reply
08-25-2013, 10:05 PM
Post: #4
RE: Payments and chequeno
Hello Phil,

Any comment? I would appreciate your feedback in order to make sure all is good!
Find all posts by this user
Quote this message in a reply
10-06-2013, 07:02 PM
Post: #5
RE: Payments and chequeno
Phil? any comment?
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)