Topic: Remnant Data Show up in New Sales Direct Sales Invoice

Whenever I enter a new Direct Sales Invoice, I keep seeing remnants of old data from previous transaction.  Is there a way to hide these remnant information as these are confusing?  Please see highlighted remnant data in the link below.

https://1drv.ms/u/s!ArKqNPSh_Uw3hOEb36bIDk3Nc3mqDw?e=7Ah520

Re: Remnant Data Show up in New Sales Direct Sales Invoice

Link not accessible

Re: Remnant Data Show up in New Sales Direct Sales Invoice

Please try this https://ibb.co/09dYtSV

Post's attachments

DirectSalesInv_issue_a.jpg 92.1 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Remnant Data Show up in New Sales Direct Sales Invoice

@joe: Is this a real issue?

Looks like some cache settings in the browser need to be cleared.

Re: Remnant Data Show up in New Sales Direct Sales Invoice

Is this a php 8 issue? There is a bug update in the stable repo for php 8.

Joe

Re: Remnant Data Show up in New Sales Direct Sales Invoice

I am currently using PHP 7.0.33.

I see this issue also happening in the following data entry UI

Sales Quotation Entry
Sales Order Entry
Direct Delivery
Direct Invoice
Bank Payment

Artifacts of previous data entry data show up in my screen (similar to the one in the screen shot that I shared).

Re: Remnant Data Show up in New Sales Direct Sales Invoice

@RoelToledo, i understand your point, actually thats the first item of the drop down, If you check it very closely, the drop down has to select any item by default, it doesn't start with "None", or "Select an item".  It has to start with an item in the list. So after you add an item to the cart, it does require to add the same item again. so it goes to starting first item. you need to select again the next item and input it again. 
If you have any better idea to list out the items by selected default, we can do that.

@apmuthu, its not browser level problem. thats list level he is asking, why we are showing the first item in the list.

Subscription service based on FA
HRM CRM POS batch Themes

Re: Remnant Data Show up in New Sales Direct Sales Invoice

It is not a list but just a single line item being shown coming from previous transaction.

Re: Remnant Data Show up in New Sales Direct Sales Invoice

Yes. It means the data comes because of the selected item in the drop down. We have no default item. So the first item selected. And the details of first item auto populated in rest of the fields.

Subscription service based on FA
HRM CRM POS batch Themes

10 (edited by notrinos 08/21/2021 07:11:41 am)

Re: Remnant Data Show up in New Sales Direct Sales Invoice

@RoelToledo, @kvvaradha

This is not a bug but a feature that was purposefully created since 2018 to initial the item list value according to the last order.
See this commit: https://github.com/FrontAccountingERP/F … 73cd0e0450
@RoelToledo if you dont want this feature can disable it by replace the line 506 in sales_order_ui.inc with this code:

$_POST['stock_id'] = null;
Phuong

Re: Remnant Data Show up in New Sales Direct Sales Invoice

@notrinos,

Thanks for guiding him. This answer will help future users also to understand it.

Subscription service based on FA
HRM CRM POS batch Themes

Re: Remnant Data Show up in New Sales Direct Sales Invoice

Thank you all for the enlightenment.  Thank you @notrinos for the suggested code modification.  It works for me.  The UI is much cleaner without the initial list value.

Re: Remnant Data Show up in New Sales Direct Sales Invoice

Should this need a company level flag in sys_prefs?

Re: Remnant Data Show up in New Sales Direct Sales Invoice

If I am the only one bothered by it, it is fine by me to edit the code as suggested.

For me, if I'm entering 9 line items, the last line item (which is the tenth line item) is shown automatically by the system, populated from a previous transaction. If you add all ten records, they don't add up because only the nine records are part of the current transaction.  The last line item is there for display purposes only.

The code modification suggested by @notrinos is quite easy for me to implement and has solved this issue.