init
This commit is contained in:
331
modules/EcmReturns/PDFTemplate/content.php
Normal file
331
modules/EcmReturns/PDFTemplate/content.php
Normal file
@@ -0,0 +1,331 @@
|
||||
<?php
|
||||
$w = "70"; // first column width
|
||||
$w2 = "15"; // second column width
|
||||
$content = '
|
||||
<table style="width: 100%; font-size: 8pt;">
|
||||
<tr>
|
||||
<td style="width: ' . $w . '%">
|
||||
'.$labels['LBL_PDF_CONTENT_QUOTE_FOR'].'
|
||||
</td>
|
||||
<td style="width: ' . $w2 . '%">
|
||||
'.$labels['LBL_PDF_CONTENT_NUMBER'].'
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
<b>' . $focus->document_no . '</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: ' . $w . '%">
|
||||
<b>' . $focus->parent_name . '</b>
|
||||
</td>
|
||||
<td style="width: ' . $w2 . '%">
|
||||
'.$labels['LBL_PDF_CONTENT_REGISTER_DATE'].'
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
<b>' . $focus->register_date . '</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: ' . $w . '%">
|
||||
<b>' . $focus->parent_address_street . ', ' . $focus->parent_address_postalcode . ' ' . $focus->parent_address_city . '</b>
|
||||
</td>
|
||||
<td style="width: ' . $w2 . '%">
|
||||
'.$labels['LBL_PDF_CONTENT_ISSUED_BY'].'
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
<b>' . $user->full_name . '</b>
|
||||
</td>
|
||||
</tr>
|
||||
</table><br>
|
||||
';
|
||||
if ($focus->name && $focus->name != '') {
|
||||
$content .= '
|
||||
<table style="width: 100%; text-align: center">
|
||||
<tr><td>
|
||||
<b>' . $focus->name . '</b>
|
||||
</td></tr>
|
||||
</table>
|
||||
';
|
||||
}
|
||||
|
||||
$content .= '<br>';
|
||||
|
||||
// start items table
|
||||
$columns = array ();
|
||||
|
||||
$columns ['position'] = array (
|
||||
'field' => array (
|
||||
'position'
|
||||
),
|
||||
'label' => $labels['LBL_PDF_CONTENT_LIST_POSITION'],
|
||||
'align' => 'center'
|
||||
);
|
||||
|
||||
if ($_REQUEST['show_img']=='1') {
|
||||
$columns ['image'] = array (
|
||||
'field' => array (
|
||||
'image'
|
||||
),
|
||||
'label' => $labels['LBL_PDF_CONTENT_LIST_IMAGE'],
|
||||
'align' => 'center'
|
||||
);
|
||||
}
|
||||
|
||||
$columns ['name'] = array (
|
||||
'field' => array (
|
||||
'name',
|
||||
'product_code'
|
||||
),
|
||||
'label' => $labels['LBL_PDF_CONTENT_LIST_NAME'].'<br>'.$labels['LBL_PDF_CONTENT_LIST_CODE'],
|
||||
'align' => 'left'
|
||||
);
|
||||
|
||||
if ($_REQUEST ['show_ean'] == '1' || $_REQUEST ['show_ean2'] == '1' || $_REQUEST ['show_recipient_code'] == '1' || $_REQUEST ['show_remarks'] == '1') {
|
||||
$columns ['codes'] = array (
|
||||
'align' => 'center'
|
||||
);
|
||||
$columns ['codes'] ['label'] = '';
|
||||
if ($_REQUEST ['show_ean']) {
|
||||
$columns ['codes'] ['label'] .= $labels['LBL_PDF_CONTENT_LIST_EAN'].'<br>';
|
||||
$columns ['codes'] ['field'] [] = 'ean';
|
||||
}
|
||||
if ($_REQUEST ['show_ean2']) {
|
||||
$columns ['codes'] ['label'] .= $labels['LBL_PDF_CONTENT_LIST_EAN2'].'<br>';
|
||||
$columns ['codes'] ['field'] [] = 'ean2';
|
||||
}
|
||||
if ($_REQUEST ['show_recipient_code']) {
|
||||
$columns ['codes'] ['label'] .= $labels['LBL_PDF_CONTENT_LIST_RECIPIENT_CODE'];
|
||||
$columns ['codes'] ['field'] [] = 'recipient_code';
|
||||
}
|
||||
|
||||
if ($_REQUEST ['show_remarks']) {
|
||||
$columns ['codes'] ['label'] .= $labels['LBL_PDF_CONTENT_LIST_REMARKS'];
|
||||
$columns ['codes'] ['field'] [] = 'remarks';
|
||||
}
|
||||
|
||||
$codes = true;
|
||||
}
|
||||
$columns ['qty'] = array (
|
||||
'field' => array (
|
||||
'quantity',
|
||||
'unit_name'
|
||||
),
|
||||
'label' => $labels['LBL_PDF_CONTENT_LIST_QTY'].'<br>'.$labels['LBL_PDF_CONTENT_LIST_UNIT'],
|
||||
'align' => 'right'
|
||||
);
|
||||
|
||||
if (showDiscount ( $record ) == true) {
|
||||
$columns ['price_start'] = array (
|
||||
'field' => array (
|
||||
'price_start'
|
||||
),
|
||||
'label' => $labels['LBL_PDF_CONTENT_LIST_PRICE_START'],
|
||||
'align' => 'right'
|
||||
);
|
||||
|
||||
$columns ['discount'] = array (
|
||||
'field' => array (
|
||||
'discount'
|
||||
),
|
||||
'label' => $labels['LBL_PDF_CONTENT_LIST_DISCOUNT'],
|
||||
'align' => 'right'
|
||||
);
|
||||
|
||||
$columns ['price_netto'] = array (
|
||||
'field' => array (
|
||||
'price_netto'
|
||||
),
|
||||
'label' => $labels['LBL_PDF_CONTENT_LIST_PRICE_NETTO'],
|
||||
'align' => 'right'
|
||||
);
|
||||
|
||||
$discounts = true;
|
||||
} else
|
||||
$columns ['price_netto'] = array (
|
||||
'field' => array (
|
||||
'price_netto'
|
||||
),
|
||||
'label' => $labels['LBL_PDF_CONTENT_LIST_PRICE_NETTO'],
|
||||
'align' => 'right'
|
||||
);
|
||||
|
||||
$columns ['total_netto'] = array (
|
||||
'field' => array (
|
||||
'total_netto'
|
||||
),
|
||||
'label' => $labels['LBL_PDF_CONTENT_LIST_TOTAL_NETTO'],
|
||||
'align' => 'right'
|
||||
);
|
||||
|
||||
//set widths
|
||||
$totals = array();
|
||||
//1: no picture, no codes, no discounts
|
||||
if ($_REQUEST['show_img']=='0' && $codes==false && $discounts==false) {
|
||||
$columns['position']['width'] = '5';
|
||||
$columns['name']['width'] = '45';
|
||||
$columns['qty']['width'] = '10';
|
||||
$columns['price_netto']['width'] = '20';
|
||||
$columns['total_netto']['width'] = '20';
|
||||
}
|
||||
//2: no picture, codes, no discounts
|
||||
else if ($_REQUEST['show_img']=='0' && $codes==true && $discounts==false) {
|
||||
$columns['position']['width'] = '5';
|
||||
$columns['name']['width'] = '40';
|
||||
$columns['codes']['width'] = '15';
|
||||
$columns['qty']['width'] = '10';
|
||||
$columns['price_netto']['width'] = '15';
|
||||
$columns['total_netto']['width'] = '15';
|
||||
}
|
||||
//3: no picture, no codes, discounts
|
||||
else if ($_REQUEST['show_img']=='0' && $codes==false && $discounts==true) {
|
||||
$columns['position']['width'] = '5';
|
||||
$columns['name']['width'] = '40';
|
||||
$columns['qty']['width'] = '10';
|
||||
$columns['price_netto']['width'] = '12.5';
|
||||
$columns['price_start']['width'] = '12.5';
|
||||
$columns['discount']['width'] = '12.5';
|
||||
$columns['total_netto']['width'] = '12.5';
|
||||
}
|
||||
//4: no picture, codes, discounts
|
||||
else if ($_REQUEST['show_img']=='0' && $codes==true && $discounts==true) {
|
||||
$columns['position']['width'] = '5';
|
||||
$columns['name']['width'] = '30';
|
||||
$columns['codes']['width'] = '15';
|
||||
$columns['qty']['width'] = '7';
|
||||
$columns['price_netto']['width'] = '8';
|
||||
$columns['price_start']['width'] = '10';
|
||||
$columns['discount']['width'] = '10';
|
||||
$columns['total_netto']['width'] = '10';
|
||||
}
|
||||
//5: picture, no codes, no discounts
|
||||
else if ($_REQUEST['show_img']=='1' && $codes==false && $discounts==false) {
|
||||
$columns['position']['width'] = '5';
|
||||
$columns['name']['width'] = '45';
|
||||
$columns['image']['width'] = '20';
|
||||
$columns['qty']['width'] = '10';
|
||||
$columns['price_netto']['width'] = '10';
|
||||
$columns['total_netto']['width'] = '10';
|
||||
}
|
||||
//6: picture, codes, no discounts
|
||||
else if ($_REQUEST['show_img']=='1' && $codes==true && $discounts==false) {
|
||||
$columns['position']['width'] = '5';
|
||||
$columns['name']['width'] = '35';
|
||||
$columns['codes']['width'] = '15';
|
||||
$columns['image']['width'] = '15';
|
||||
$columns['qty']['width'] = '10';
|
||||
$columns['price_netto']['width'] = '10';
|
||||
$columns['total_netto']['width'] = '10';
|
||||
}
|
||||
//7: pictures, codes, discounts
|
||||
else if ($_REQUEST['show_img']=='1' && $codes==true && $discounts==true) {
|
||||
$columns['position']['width'] = '5';
|
||||
$columns['name']['width'] = '35';
|
||||
$columns['codes']['width'] = '15';
|
||||
$columns['image']['width'] = '15';
|
||||
$columns['qty']['width'] = '10';
|
||||
$columns['price_start']['width'] = '10';
|
||||
$columns['discount']['width'] = '10';
|
||||
$columns['price_netto']['width'] = '10';
|
||||
$columns['total_netto']['width'] = '10';
|
||||
}
|
||||
|
||||
// rysujemy :)
|
||||
$content .= '
|
||||
<table style="width: 100%; font-size: 7pt; border: 0.5 solid black; border-collapse: collapse"><thead>
|
||||
<tr>
|
||||
';
|
||||
|
||||
foreach ( $columns as $col ) {
|
||||
$content .= '
|
||||
<th style="border: 0.5 solid black; background: rgb(233,233,233); width: '.$col['width'].'%;">' . $col ['label'] . '</th>
|
||||
';
|
||||
}
|
||||
$content .= '
|
||||
</tr></thead><tbody>
|
||||
';
|
||||
|
||||
foreach ( $positions as $pos ) {
|
||||
$content .= '<tr>';
|
||||
foreach ( $columns as $col ) {
|
||||
$content .= '<td style="border: 0.5 solid black; text-align: ' . $col ['align'] . ';">';
|
||||
foreach ( $col ['field'] as $f ) {
|
||||
if ($f == 'image') {
|
||||
$content.='<img width="40px" src="modules/EcmProducts/upload/images/'.$pos['image'].'"/>';
|
||||
} else {
|
||||
if (!$pos[$f] || $pos[$f]=='') $pos[$f]='-';
|
||||
$content .= $pos [$f] . '<br>';
|
||||
}
|
||||
}
|
||||
$content .= '</td>';
|
||||
}
|
||||
$content .= '</tr>';
|
||||
}
|
||||
|
||||
$content .= '
|
||||
</tbody></table>
|
||||
';
|
||||
//summary table
|
||||
//get currency symbol
|
||||
$c = new Currency();
|
||||
$c->retrieve($focus->currency_id);
|
||||
$symbol = $c->symbol;
|
||||
unset($c);
|
||||
$content.='
|
||||
<br><br>
|
||||
<table style="font-size: 9pt; border: 0.5 solid black; border-collapse: collapse; width: 215px; margin-left: 70%">
|
||||
';
|
||||
|
||||
$content.='
|
||||
<tr>
|
||||
<td style="background: rgb(233,233,233); border: 0.5 solid black; width: 50%;">
|
||||
'.$labels['LBL_PDF_CONTENT_TOTAL_NETTO'].'
|
||||
</td>
|
||||
<td style="border: 0.5 solid black; text-align: right;">
|
||||
'.format_number($focus->total_netto).' '.$symbol.'
|
||||
</td>
|
||||
</tr>
|
||||
';
|
||||
|
||||
if ($focus->no_tax=='0') {
|
||||
$vats = explode(",", $focus->vats_summary);
|
||||
foreach ($vats as $v) {
|
||||
$vats2 = explode(":", $v);
|
||||
if ($vats2[0]=='') continue;
|
||||
$content.='
|
||||
<tr>
|
||||
<td style="background: rgb(233,233,233); border: 0.5 solid black; width: 50%;">
|
||||
'.$vats2[0].'
|
||||
</td>
|
||||
<td style="border: 0.5 solid black; text-align: right;">
|
||||
'.format_number($vats2[1]).' '.$symbol.'
|
||||
</td>
|
||||
</tr>
|
||||
';
|
||||
}
|
||||
$content.='
|
||||
<tr>
|
||||
<td style="background: rgb(233,233,233); border: 0.5 solid black; width: 50%;">
|
||||
'.$labels['LBL_PDF_CONTENT_TOTAL_BRUTTO'].'
|
||||
</td>
|
||||
<td style="border: 0.5 solid black; text-align: right;">
|
||||
'.format_number($focus->total_brutto).' '.$symbol.'
|
||||
</td>
|
||||
</tr>
|
||||
';
|
||||
}
|
||||
|
||||
$focus->pdf_text = str_replace(PHP_EOL, "<br>", $focus->pdf_text);
|
||||
$content.='
|
||||
</table>
|
||||
<br><br>
|
||||
<p style="font-size: 12;">'.$focus->pdf_text.'</p>
|
||||
';
|
||||
//echo $content; die();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
100
modules/EcmReturns/PDFTemplate/footer-en_us.php
Normal file
100
modules/EcmReturns/PDFTemplate/footer-en_us.php
Normal file
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
$w = "62"; //first column width
|
||||
$w2 = "12"; //second column width
|
||||
$footer = '
|
||||
<hr>
|
||||
<table style="width: 100%; font-size: 7pt;">
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
e5 Polska Sp. z o.o
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_KRS'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
28207
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
ul. Wąwozowa 11
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_NIP'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
PL 525-21-73-990
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
02-796 Warszawa
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_REGON'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
016280234
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
Tel: +48 (22) 228 20 90
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_BANK'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
';
|
||||
if ($bank=='milenium')
|
||||
$footer.='BANK MILLENIUM';
|
||||
if ($bank=='mbank')
|
||||
$footer.='MBANK';
|
||||
$footer.='
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
Fax: +48 (56) 674 60 47
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_BANK_ACCOUNT'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
';
|
||||
if ($bank=='milenium')
|
||||
$footer.='PL36116022020000000064080587';
|
||||
if ($bank=='mbank')
|
||||
$footer.='PL96114010100000548212001002';
|
||||
$footer.='
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
'.$user->email1.'
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_SWIFT'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
';
|
||||
if ($bank=='milenium')
|
||||
$footer.='BIGBPLPW';
|
||||
if ($bank=='mbank')
|
||||
$footer.='BREXPLPW';
|
||||
$footer.='
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<table style="width: 100%; font-size: 7pt;">
|
||||
<tr>
|
||||
<td style="width: 50%;">
|
||||
{PAGENO}/{nb}
|
||||
</td>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<b>'.$focus->document_no.'</b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
';
|
||||
95
modules/EcmReturns/PDFTemplate/footer-pl_pl.php
Normal file
95
modules/EcmReturns/PDFTemplate/footer-pl_pl.php
Normal file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
$w = "62"; //first column width
|
||||
$w2 = "12"; //second column width
|
||||
$footer = '
|
||||
<hr>
|
||||
<table style="width: 100%; font-size: 7pt;">
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
e5 Polska Sp. z o.o
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_KRS'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
28207
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
ul. Wąwozowa 11
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_NIP'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
PL 525-21-73-990
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
02-796 Warszawa
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_REGON'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
016280234
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
Tel: +48 (22) 228 20 90
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_BANK'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
';
|
||||
if ($bank=='milenium')
|
||||
$footer.='BANK MILLENIUM';
|
||||
if ($bank=='mbank')
|
||||
$footer.='MBANK';
|
||||
$footer.='
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
Fax: +48 (56) 674 60 47
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_BANK_ACCOUNT'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
';
|
||||
if ($bank=='milenium')
|
||||
$footer.='35 1160 2202 0000 0000 6408 0411';
|
||||
if ($bank=='mbank')
|
||||
$footer.='26 1140 1010 0000 5482 1200 1001';
|
||||
$footer.='
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
'.$user->email1.'
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_GIOS'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
E0006254W
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<table style="width: 100%; font-size: 7pt;">
|
||||
<tr>
|
||||
<td style="width: 50%;">
|
||||
{PAGENO}/{nb}
|
||||
</td>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<b>'.$focus->document_no.'</b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
';
|
||||
12
modules/EcmReturns/PDFTemplate/header.php
Normal file
12
modules/EcmReturns/PDFTemplate/header.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
$header = '
|
||||
<table style="font-size: 7pt; width: 100%"><tr>
|
||||
<td>
|
||||
<img style="width: 150px;" src="modules/EcmReturns/PDFTemplate/logo.png"/>
|
||||
</td>
|
||||
<td style="text-align: right; vertical-align: bottom; font-size: 12;">
|
||||
www.e5.pl
|
||||
</td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
';
|
||||
55
modules/EcmReturns/PDFTemplate/helper.php
Normal file
55
modules/EcmReturns/PDFTemplate/helper.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
function showDiscount($record) {
|
||||
$db = $GLOBALS['db'];
|
||||
$res = $db->fetchByAssoc($db->query("SELECT count(distinct discount) AS c FROM ecmreturnitems WHERE
|
||||
ecmreturn_id='$record'
|
||||
AND discount!=0"));
|
||||
|
||||
if (isset($res['c']) && $res['c']>0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function formatPDFPositions($positions, $focus) {
|
||||
$result = array();
|
||||
foreach ($positions as $pos) {
|
||||
|
||||
$pos['position'] = intval($pos['position'])+1;
|
||||
$p = new EcmProduct();
|
||||
$p -> retrieve($pos['product_id']);
|
||||
|
||||
$pos['ean'] = $p->ean;
|
||||
$pos['ean2'] = $p->ean2;
|
||||
|
||||
$pos['image'] = $p->product_picture;
|
||||
|
||||
unset($p);
|
||||
|
||||
$c = new Currency();
|
||||
$c->retrieve($focus->currency_id);
|
||||
|
||||
$pos['price_start']=format_number($pos['price_start'],2,2).' '.$c->symbol;
|
||||
$pos['price_netto']=format_number($pos['price_netto'],2,2).' '.$c->symbol;
|
||||
$pos['total_netto']=format_number($pos['total_netto'],2,2).' '.$c->symbol;
|
||||
|
||||
unset($c);
|
||||
|
||||
if ($focus->ecmlanguage=='en_ussss') {
|
||||
//get names
|
||||
$db = $GLOBALS['db'];
|
||||
$r = $db->fetchByAssoc($db->query("SELECT short_description FROM ecmproduct_language WHERE ecmproduct_id='".$pos['product_id']."' AND language='en'"));
|
||||
$pos['name'] = $r['short_description'];
|
||||
|
||||
$lists = return_app_list_strings_language($focus->ecmlanguage);
|
||||
$pos['unit_name'] = $lists['ecmproducts_unit_dom'][$pos['unit_id']];
|
||||
unset($lists);
|
||||
}
|
||||
|
||||
$pos['discount'].='%';
|
||||
|
||||
$result[] = $pos;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
Reference in New Issue
Block a user