Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Supplier Total Spend
04-15-2015, 02:24 AM (This post was last modified: 04-15-2015 04:41 AM by agaluski.)
Post: #1
Supplier Total Spend
Noticed in SelectSupplier.php the following line:
PHP Code:
$SQL "SELECT SUM(-ovamount) AS total FROM supptrans WHERE supplierno = '" $_SESSION['SupplierID'] . "' and type != '20'"
Consider the following:
Entered invoice (incorrectly) (Type 20)
Entered Debit Note to cancel invoice and allocated (Type 21)
Entered Correct invoice (Type 20)
Paid with Check. (Type 22)

System shows incorrect total spend, essentially double.

Fix is to make code:
PHP Code:
$SQL "SELECT SUM(-ovamount) AS total FROM supptrans WHERE supplierno = '" $_SESSION['SupplierID'] . "' and type = '22'"

Make sense? If so I can commit to trunk
Find all posts by this user
Quote this message in a reply
04-15-2015, 03:07 AM
Post: #2
RE: Supplier Total Spend
Hi Andrew, the problem with doing it by payment is that the supplier could be on 60 or even 90 day terms so the spend could be wrongly calculated. Would it make more sense to net off the invoice and credit notes?

Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
04-15-2015, 04:44 AM
Post: #3
RE: Supplier Total Spend
Tim,
I agree netting them out might be an option however invoices may or may not have been paid yet, debit notes don't count as spend. To me the only thing that counts as 'spend' is a check (or wire or cash). A true payment.
Regardless of terms the total we have 'spent' is the total we sent to the supplier. Not what we may or may not owe.

This assumes your definition of "spend' matches mine! Smile. Some people may consider money we owe as counting toward 'spend'
Find all posts by this user
Quote this message in a reply
04-15-2015, 05:23 AM
Post: #4
RE: Supplier Total Spend
Hi Andrew,, as an accountant I would define total supplier spend the total amount that has been purchased from that supplier during the period. A quick look at my old JD Edwards and Sage manuals they appear to agree that their total supplier spend report is the amount purchased, not the amount paid. However others may have different views on this.

Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
04-15-2015, 06:19 AM
Post: #5
RE: Supplier Total Spend
I am going to just keep my modifications local for now.
Find all posts by this user
Quote this message in a reply
04-19-2015, 03:32 PM
Post: #6
RE: Supplier Total Spend
Thanks guys, made modification to the trunk

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
Post Reply 


Forum Jump:


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