how to exclude shipping cost on customer invoice
# ask-stanley-ai
s
how to exclude shipping cost on customer invoice
c
AI generated answer (using internal Slack threads):
To exclude shipping cost on a customer invoice, you can use a SuiteScript. You can create a User Event script that triggers on the creation of an invoice. In this script, you can set the shipping cost to zero. Here is a sample code snippet:
Copy code
javascript
function beforeSubmit(type){
    if(type == 'create'){
        var record = nlapiGetNewRecord();
        var shippingCost = record.getFieldValue('shippingcost');
        if(shippingCost != 0){
            record.setFieldValue('shippingcost', 0);
        }
    }
}
This script checks if the shipping cost is not zero when an invoice is created. If it's not zero, it sets the shipping cost to zero. Alternatively, if you want to stop the shipping calculation for a small segment of your customers, you can use the 'shippingcostoverridden' field. If this field is set to true, NetSuite will not calculate the shipping cost. You can set this field to true in your script for the specific customers. Please note that these solutions require scripting knowledge and should be implemented by someone familiar with SuiteScript and NetSuite's scripting API. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.836789072
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.830066204
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.828123629
Please provide your feedback on this answer.