phpBMS

Ticket #362 (assigned defect)

Opened 2 years ago

Last modified 15 months ago

credit doesnt deduct from client view page

Reported by: irefuse Owned by: brieb
Priority: major Milestone: 1.0
Component: phpbms Version: 0.98
Keywords: fixed Cc:

Description

hello,

when you go to view a client and click the credit tab, it does not show the open AR items and deduct the amount from the available credit. Although when you go to create a new invoice under the client's credit, it shows the proper available credit.

Attachments

problem1.jpg Download (189.2 KB) - added by irefuse 2 years ago.
arlist
problem2.jpg Download (155.9 KB) - added by irefuse 2 years ago.
client credit tab
clients_credit.php.patch Download (181 bytes) - added by irefuse 2 years ago.
patch file for modules/bms/clients_credit.php
iclients_credit.php.patch Download (280 bytes) - added by irefuse 2 years ago.
patch file for modules/bms/include/clients_credit.php
iclients_credit.php.2.patch Download (0.6 KB) - added by irefuse 2 years ago.
*new* fix. this one corrects an issue with displaying all user's credit usage in the "Open Items" area

Change History

Changed 2 years ago by irefuse

arlist

Changed 2 years ago by irefuse

client credit tab

Changed 2 years ago by irefuse

i know what the problem is and im going to look for a logical way to fix it. if someone else has an update before i find out let me know. it has to do with the showHistory() function. when executed in the modules/bms/clients_credit.php file it pulls the old "id" but the function compares that to the "clientid" of aritems table which is using the new uuid system

Changed 2 years ago by irefuse

*update* although i still do not know what is causing the issue with the credit remaining section to not be updated...

Changed 2 years ago by irefuse

patch file for modules/bms/clients_credit.php

Changed 2 years ago by irefuse

patch file for modules/bms/include/clients_credit.php

Changed 2 years ago by irefuse

i have found a solution that makes my bms work. the mods may want to take a look at it and verify it and make changes of their own. but this solution does work for me.

Changed 2 years ago by irefuse

*note* these patches also fix the issue of the remaining credit not updating.

Changed 2 years ago by irefuse

*new* fix. this one corrects an issue with displaying all user's credit usage in the "Open Items" area

Changed 2 years ago by brieb

  • status changed from new to assigned
  • milestone changed from unknown to 1.0

Changed 2 years ago by brieb

  • keywords needsReview added

Changed 2 years ago by rthconsultants@…

  • version changed from trunk to 0.98

As well, the 'credit left' field doesn't refelect proper calculation of open AR items. I have started to debug this issue.

In /modules/bms/clients_credit.php "$therecordcreditlimit?-$therecordoutstanding?" (LN:79) should correctly calculate the credit available (less the open AR items). After viewing the $therecord stack, it doesn't contain an element called, 'outstanding'. Therefore the calculation is always "creditlimit-0".

The $therecord array is populated by this class/method: $clientCredit->get()

I haven't located that class method yet to continue reverse engineering the issue. Hope this helps!

Changed 15 months ago by dsterry/weex

  • keywords fixed added; needsReview removed

I ran across this problem without knowing there was a bug report here and code to boot. I fixed it with  https://github.com/weex/phpBMS/commit/8012f5f92e2aaa108cfce8c72afb09be28b2eeef

Note: See TracTickets for help on using tickets.
Scanned by Orvant Copyright © 2010 Kreotek, LLC. All Rights reserved.