Files
crm.e5.pl/modules/EcmInvoiceOuts/PDFTemplate/helper.php
2024-04-27 09:23:34 +02:00

38 lines
1.0 KiB
PHP

<?php
function formatPDFPositions($positions, $focus) {
$result = array();
foreach ($positions as $pos) {
$pos['quantity'] = intval($pos['quantity']);
$pos['old_quantity'] = intval($pos['old_quantity']);
$pos['position'] = intval($pos['position'])+1;
$pos['price_netto']=format_number($pos['price_netto']);
$pos['total_vat']=format_number($pos['total_vat']);
$pos['ecmvat_value']=format_number($pos['ecmvat_value']);
$pos['total_brutto']=format_number($pos['total_brutto']);
$pos['total_netto']=format_number($pos['total_netto']);
$pos['old_total_netto']=format_number($pos['old_total_netto']);
$pos['old_total_brutto']=format_number($pos['old_total_brutto']);
$pos['old_total_vat']=format_number($pos['old_total_vat']);
$pos['old_price_netto']=format_number($pos['old_price_netto']);
$result[] = $pos;
}
return $result;
}
function mysql_escape_gpc($dirty)
{
if (ini_get('magic_quotes_gpc'))
{
return $dirty;
}
else
{
return mysql_real_escape_string($dirty);
}
}