35 $invoice_number = preg_replace(
'/[^0-9]/',
'', $invoice_number);
38 $invoice_number = substr(
'00000000'.$invoice_number, -8);
41 switch ($invoice_type) {
62 $invoice_number = $invoice_type.$invoice_number;
63 $mod97 = intval($invoice_number) % 97;
64 $controlKey = ($mod97 === 0) ? 97 : $mod97;
67 $invoice_number .= $controlKey;
70 $part1 =
'+++'.substr($invoice_number, 0, 3);
71 $part2 = substr($invoice_number, 3, 4);
72 $part3 = substr($invoice_number, 7, 5).
'+++';
74 $invoice_number = $part1 .
'/' . $part2 .
'/' . $part3;
76 return $invoice_number;