Can a credit note be set to Reserve Order?

Discussions relating to plugin development, and the Jiwa API.

Can a credit note be set to Reserve Order?

Postby DannyC » Wed Feb 09, 2022 2:20 pm

I want to set a credit note to a reserve order but despite the following code, it's staying as Invoice Order and the field is locked. Have tried both the CreateStart and CreateEnd event.
Is it possible?

Code: Select all
if (salesOrder.CreditNote)
{
   salesOrder.OrderType = JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder.SalesOrderOrderTypes.e_SalesOrderOrderTypeReserveOrder;
}
User avatar
DannyC
Senpai
Senpai
 
Posts: 638
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 30

Re: Can a credit note be set to Reserve Order?

Postby SBarnes » Wed Feb 09, 2022 3:06 pm

Given the user interface won't let you do it I'd say you can't but given a reserved order is designed to reserve/hold stock what is the use case where you would want to do it as a credit note?
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1620
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Can a credit note be set to Reserve Order?

Postby Mike.Sheen » Wed Feb 09, 2022 3:07 pm

Works for me using the CreateEnd event.

Sample plugin demonstrating this attached.

CRNote_Reserve_After_Create.png


If you have other plugins enabled, they may be impacting the behaviour. I'm in the habit of disabling all other plugins when trying to troubleshoot with a SQL Query.
Attachments
Plugin Credit Note Set To Reserve on Create - 7.2.1.0.xml
(24.12 KiB) Downloaded 50 times
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: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757

Re: Can a credit note be set to Reserve Order?

Postby Mike.Sheen » Wed Feb 09, 2022 3:09 pm

SBarnes wrote:Given the user interface won't let you do it I'd say you can't but given a reserved order is designed to reserve/hold stock what is the use case where you would want to do it as a credit note?


And this also - The OrderType Reserve has no relevance in the context of a credit note.
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: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757

Re: Can a credit note be set to Reserve Order?

Postby DannyC » Wed Feb 09, 2022 3:59 pm

The OrderType Reserve has no relevance in the context of a credit note.

LOL. I was waiting for that question!

For the client's scenario, they currently use Reserve Order on credit notes (in v 6.5.13) when a credit note has been raised, particularly when Credit Goods Into Stock is ticked. Then when the stock actually arrives, then they can flick it to Invoice Order and process. It's just a manual check to enforce when credited goods have really been received.
User avatar
DannyC
Senpai
Senpai
 
Posts: 638
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 30

Re: Can a credit note be set to Reserve Order?

Postby SBarnes » Wed Feb 09, 2022 4:03 pm

Why not just raise the credit in a reserved warehouse and do a warehouse transfer when the goods come in?

It would also give them better reporting on what is outstanding.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1620
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Can a credit note be set to Reserve Order?

Postby DannyC » Wed Feb 09, 2022 5:57 pm

Why not just raise the credit in a reserved warehouse and do a warehouse transfer when the goods come in?


Already doing that also.


Mike, I can't get your plugin to work. All other plugins disabled. There no system setting I need?
Thinking a bit more about this, seeing as that dropdown is locked from editing even it was set to Reserve Order, the user couldn't change it to Invoice Order anyway.
Methinks the client will need to revisit their workflows. Might be a case for a custom field - just that the Order Type is right there on the header so no further clicking to other tabs needed.
User avatar
DannyC
Senpai
Senpai
 
Posts: 638
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 30

Re: Can a credit note be set to Reserve Order?

Postby Mike.Sheen » Wed Feb 09, 2022 7:11 pm

DannyC wrote:[
Mike, I can't get your plugin to work. All other plugins disabled. There no system setting I need?


I've setup a new clean VM and tested - the only thing I found is the plugin I provided contained an unused reference to a component not installed (a newer version of the Actipro Syntax editor) - so when I imported the plugin it gave an error about that unresolved reference.

I removed that reference, saved and tested on a brand new demo database (with every other plugin disabled) and it worked fine. Did you get an error importing the plugin? You should have - how did you handle that?

I was testing on 07.02.01 SR9 - what version were you testing on?

Attached is the revised plugin with that reference removed (versioned 7.2.1.1).
Attachments
Plugin Credit Note Set To Reserve on Create - 7.2.1.1.xml
(22.84 KiB) Downloaded 52 times
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: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 13 guests

cron