Add non-stock item to Snapshot > 1  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Add non-stock item to Snapshot > 1

Postby pricerc » Wed May 11, 2022 11:42 am

My customer wants to add a credit-card surcharge based on the payment for a particular snapshot, which is only for the "this delivery" amount.

So on, say, snapshot 2, there is a second payment for the items that were on backorder in snapshot 1, and so we'd like to add a second surcharge.

I was about to tell them 'no', when I decided I had better check...

On a Bill/Complete or Ship+Bill order, you can't add an item to a processed order using the UI, but I don't see a restriction in the code for AddNonInventoryItem.

So is this something a) possible, and b) reasonable, to do in code?
/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: Add non-stock item to Snapshot > 1  Topic is solved

Postby Mike.Sheen » Wed May 11, 2022 2:38 pm

pricerc wrote:My customer wants to add a credit-card surcharge based on the payment for a particular snapshot, which is only for the "this delivery" amount.

So on, say, snapshot 2, there is a second payment for the items that were on backorder in snapshot 1, and so we'd like to add a second surcharge.

I was about to tell them 'no', when I decided I had better check...

On a Bill/Complete or Ship+Bill order, you can't add an item to a processed order using the UI, but I don't see a restriction in the code for AddNonInventoryItem.

So is this something a) possible, and b) reasonable, to do in code?


We don't support it - if we don't prevent you doing it via the business logic, then that's a bug.

A lot of things have logic when assumes all snapshots have the same lines - and in the same order as well.
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: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Add non-stock item to Snapshot > 1

Postby pricerc » Wed May 11, 2022 6:34 pm

Mike.Sheen wrote:
pricerc wrote:My customer wants to add a credit-card surcharge based on the payment for a particular snapshot, which is only for the "this delivery" amount.

So on, say, snapshot 2, there is a second payment for the items that were on backorder in snapshot 1, and so we'd like to add a second surcharge.

I was about to tell them 'no', when I decided I had better check...

On a Bill/Complete or Ship+Bill order, you can't add an item to a processed order using the UI, but I don't see a restriction in the code for AddNonInventoryItem.

So is this something a) possible, and b) reasonable, to do in code?


We don't support it - if we don't prevent you doing it via the business logic, then that's a bug.

A lot of things have logic when assumes all snapshots have the same lines - and in the same order as well.


Thanks Mike. Makes sense.

I'll leave it to you to figure out if I missed the check - the decompiler sometimes obfuscates things, but I would have expected some kind of exception being thrown, and I didn't see one.
/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: Add non-stock item to Snapshot > 1

Postby SBarnes » Thu May 12, 2022 8:37 am

I do know this slightly different but you can change prices on the sales order object after a D01 and the business logic will accept it, I did this for a client where we unlocked the pricing cells on the form and Jiwa will accept it and save it.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 7 guests