Add php files
This commit is contained in:
35
modules/EcmStockDocOuts/PDFTemplate/helper.php
Executable file
35
modules/EcmStockDocOuts/PDFTemplate/helper.php
Executable file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
function formatPDFPositions22($positions, $focus) {
|
||||
$result = array();
|
||||
foreach ($positions as $pos) {
|
||||
|
||||
$pos['position'] = intval($pos['position'])+1;
|
||||
|
||||
$pos['quantity'] = $pos['quantity'];
|
||||
$pos['price']=format_number($pos['price']);
|
||||
$pos['total']=format_number($pos['total']);
|
||||
|
||||
$pos['price_netto']=format_number($pos['price_netto']);
|
||||
$pos['total_netto']=format_number($pos['total_netto']);
|
||||
$pos['total_vat']=format_number($pos['total_vat']);
|
||||
$pos['total_brutto']=format_number($pos['total_brutto']);
|
||||
|
||||
$result[] = $pos;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
function getQuantity22($positions, $focus) {
|
||||
$result=0;
|
||||
foreach ($positions as $pos) {
|
||||
|
||||
|
||||
|
||||
$result+=$pos['quantity'];
|
||||
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user