Thread Rating:
  • 0 Vote(s) - 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.)
#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
Reply
04-15-2015, 03:07 AM,
#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
Reply
04-15-2015, 04:44 AM,
#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'
Reply
04-15-2015, 05:23 AM,
#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
Reply
04-15-2015, 06:19 AM,
#5
RE: Supplier Total Spend
I am going to just keep my modifications local for now.
Reply
04-19-2015, 03:32 PM,
#6
RE: Supplier Total Spend
Thanks guys, made modification to the trunk
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)