Payment slip with reference number

In Switzerland, it is common to send a payment slip with the invoice.

How this is done in NetSuite:

With a “Workflow Action Script” the “payment slip” is printed out on the invoice. A separate Advanced HTML template is filled with the data from the invoice and saved with the transaction record. NetSuite also offers the option to send this “payment slip” as a PDF by email together with the invoice.

Alta Via Consulting has developed a bundle for Switzerland that contains this payment slip and other localizations. Contact us for more details.

In order to provide the “Payment slip with reference number” in NetSuite, a check digit must be calculated (among other things). This happens recursively according to “modulo10”:

function mod10(bb) {
var R1 = 0;
var alg = [0, 9, 4, 6, 8, 2, 7, 1, 3, 5];
var be = bb.split(“”);
var bl = bb.length;
var Rbb;
var P1;
for (i = 0; i < bl; i++)
Rbb = parseInt(R1) + parseInt(be[i])
R1 = alg[Rbb % 10]
P1 = (10 – R1) % 10
return P1;