it's not client script - it's standard NS behaviou...
# suitescript
m
it's not client script - it's standard NS behaviour. It's doing what it's meant to - Ie. not let customer purchase more as they have breached their credit limit or have outstanding debt.
b
suitescript doesnt bypass the credit hold unless its setup to warn only
make sure the accounting preferences are setup to enforce holds
and that the sales order being created falls under that credit hold
m
Our accounting preferences is set to Auto - so we let NS deal with it. Creating an order via the UI kicks in the rules, but when creating orders via a SuiteLet for the same customer the order still gets created
b
Auto is not an option
m
sorry, you are right. It's set to Enforce Holds
"*Enforce Holds* – Select this method to block the entry of a sales order or invoice that puts the customer at or above their credit limit. This method also blocks the addition of items to existing orders for customers at or above their credit limit."
If NS will not allow me to create an order via the UI then surely it should not via SUITELET. Btw - we actually want this behaviour, but my fear is that it might be a bug which is later fixed
b
are the terms set on the sales order you are creating
m
I think I now see the issue - now that I think about the terms. In the UI - it auto picks the term from the customer record so rules get triggered. When orders come in from Shopify the terms are not set, but since we need these as term orders a workflow unsets the payment method and sets the terms. I am guessing the WF gets triggered once the SO is created (without the terms) then my WF sets the term.
do you think that might be the reason for the orders to push through?
and even if the hold is set to 'ON' but without a term - orders can still enter? That's what I just tested in UI, without a term it went through
b
credit limits are related to terms
👌 1
payment method implies there is no credit
👌 1
m
Do you know if NetSuite takes the line amount or the total (inc tax) from the order when working out if order breaches credit limits?
It would make sense it takes the order total, but double-checking. I guess I can just create few test orders
Takes the total