Unlock discount percentage on snap>1  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Unlock discount percentage on snap>1

Postby DannyC » Mon Aug 17, 2020 2:34 pm

When a new snapshot is created, I want to allow the user to enter a discount percentage snapshots > 1, all the columns are locked.
I have
Code: Select all
public void Setup(JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm JiwaForm, JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
{
   if (JiwaForm is JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.SalesOrderEntryForm)
   {
      JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.SalesOrderEntryForm salesOrderForm = (JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.SalesOrderEntryForm)JiwaForm;
      _soForm = salesOrderForm;
      salesOrderForm.SalesOrder.SalesOrderHistorys.Added += SalesOrderNewSnap;
      
   }   
}

private void SalesOrderNewSnap(JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrderHistory historyObj)
{
   _soForm.grdLines.LockColumn(false,"DiscountPercentage",-1);
}


But I never expected it to be that easy.
Whats the trick?
User avatar
DannyC
Senpai
Senpai
 
Posts: 718
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 31

Re: Unlock discount percentage on snap>1

Postby Mike.Sheen » Mon Aug 17, 2020 2:57 pm

DannyC wrote:But I never expected it to be that easy.
Whats the trick?


Many things will not use discount % or prices on snaps > 1. Assumptions are made that the prices and discounts and so on are the same on all snapshots.
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: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Unlock discount percentage on snap>1

Postby DannyC » Mon Aug 17, 2020 3:17 pm

OK. That throws a spanner in the works for this particular client.

Sometimes there can be quite some time between snap 1 and the next snapshots, such that the inventory pricing has changed and the customer will be needing a different price on snaos > 1. As an example,lets say the items have arrived on a shipment and the landed cost was different than last time, so that means the profit margin is now different. That means they need to charge the debtor a different price to achieve a similar margin.

On subsequent snaps, they need to be able at at least adjust the discount percentage to tweak in line with what the customer will now be charged for that item. It's an essential part of their business practise else I'd tell them to move lines to a new sales order, but that's not an option in this case.
User avatar
DannyC
Senpai
Senpai
 
Posts: 718
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 31

Re: Unlock discount percentage on snap>1  Topic is solved

Postby Mike.Sheen » Mon Aug 17, 2020 4:06 pm

DannyC wrote:As an example,lets say the items have arrived on a shipment and the landed cost was different than last time, so that means the profit margin is now different. That means they need to charge the debtor a different price to achieve a similar margin.


No.

You cannot change the price. If you want to do that, it's a different order / invoice - the contract of sale cannot be changed like that on the same order.
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: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Unlock discount percentage on snap>1

Postby DannyC » Mon Aug 17, 2020 11:11 pm

the contract of sale cannot be changed like that on the same order.

So is it a technical limitation or a legal one?
User avatar
DannyC
Senpai
Senpai
 
Posts: 718
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 31

Re: Unlock discount percentage on snap>1

Postby Mike.Sheen » Mon Aug 17, 2020 11:16 pm

DannyC wrote:So is it a technical limitation or a legal one?


Both.

The technical limit is there because of the accounting and business principle that you don't change prices on an invoice. You credit the invoice and create a new one if it was wrong, which leaves an audit of the change.
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: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 2 guests