Sales order branch warning

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

Sales order branch warning

Postby DannyC » Thu Apr 30, 2026 1:35 pm

Client has branches which loosely match warehouses.

That means when a sales order is in say, the VIC warehouse, the branch should also match VIC.
Branch masking is set up in the ledger config. The reason for branch masking and not warehouse masking is because there is often a scenario when sales may need to be done in warehouse NSW because that's where the stock is, but the GL needs to reflect VIC, so branch = VIC.

What I'd like is a visual alert when that scenario happens. I am thinking a little flashing exclamation mark (like when a debtor email address looks dodgy) just left of the combobox.

Although I haven't attempted a plugin yet, I'd like to know a few things:
1. What SalesOrderEntryForm event should I hook into, or how best to display the alert?
2. What is the code that implements the flashing exclamation mark?

I'm OK to do the warehouse/branch comparison.
User avatar
DannyC
Senpai
Senpai
 
Posts: 721
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 32

Re: Sales order branch warning

Postby Mike.Sheen » Thu Apr 30, 2026 1:48 pm

Use the ErrorIcon_Display helper method of the base maintenance class form to display the flashing exclamation - here's how we use it for showing against the debtor lookup on the sales order form:

Code: Select all
If SalesOrder.Debtor.TradingStatus = JiwaSales.SalesOrder.Debtor.DebtorTradingStatuses.e_DebtorTradingStatusInActive Then
    ErrorIcon_Display(ErrorProvider1, DebtorLookup, "This debtor Trading Status is set to Inactive.")
ElseIf SalesOrder.Debtor.OnHold Then
    ErrorIcon_Display(ErrorProvider1, DebtorLookup, "This debtor is set to be On Hold.")
Else
    ErrorIcon_Clear(ErrorProvider1, DebtorLookup)
End If
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: 2585
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 812


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 7 guests