Changing an SO comment line doesn't make SO 'Dirty'  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Changing an SO comment line doesn't make SO 'Dirty'

Postby pricerc » Mon Oct 19, 2020 8:31 pm

I have a JiwaSales.SalesOrder loaded from the database, and it has a comment line. If I change the comment, it seems that it doesn't set SalesOrder's ChangeFlag.

It seems to be the same if I just change the quantity on a stocked line.

Have I missed something, or do I need to separately check the lines separately in my 'need to save' check ?


(I feel like I must have asked this before, but I efforts to find it have been fruitless so far)
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20

Re: Changing an SO comment line doesn't make SO 'Dirty'

Postby Mike.Sheen » Mon Oct 19, 2020 9:49 pm

pricerc wrote:Have I missed something, or do I need to separately check the lines separately in my 'need to save' check ?


No, you've not missed anything.

If anything changes, the ChangeFlag property of the sales order will be set to true - even if a comment line.

I'm going to need some steps and maybe some code to repro what you're describing.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755

Re: Changing an SO comment line doesn't make SO 'Dirty'  Topic is solved

Postby pricerc » Wed Oct 21, 2020 7:16 am

I think I found my problem.

Originally, the project was a POS that was even simpler than the standard Plug-In example one. So, create an order, take a payment, process and close. So instead of just using the Jiwa business objects, I rolled my own, much simpler ones to use within the simplified UI, generating the Jiwa objects just before posting them.

However, the requirements have changed along the way, and I ended up having to reload the order and allow modifications. It also means that I save the order much more frequently than I was expecting.

And of course, after each 'Save', you have to 'Read' the SO again to refresh it with any changes made by the database. I was doing this, but then I forgot to also refresh the lines in my simplified sales order lines wrapper (I keep a reference to the relevant JiwaSales.SalesOrderLine within in my wrapper), which I think was leaving them in a 'funny' state.

In any case, it's working now, so I'm not going to pursue it further.
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 2 guests

cron