commit
1fb72c53d0
@ -521,7 +521,7 @@ if ($id > 0 || $ref) {
|
||||
print '</tr>';
|
||||
|
||||
// Availability
|
||||
if (!empty($conf->global->FOURN_PRODUCT_AVAILABILITY)) {
|
||||
if (getDolGlobalInt('FOURN_PRODUCT_AVAILABILITY')) {
|
||||
$langs->load("propal");
|
||||
print '<tr><td>'.$langs->trans("Availability").'</td><td>';
|
||||
$form->selectAvailabilityDelay($object->fk_availability, "oselDispo", 1);
|
||||
@ -907,16 +907,16 @@ END;
|
||||
$arrayfields = array(
|
||||
'pfp.datec'=>array('label'=>$langs->trans("AppliedPricesFrom"), 'checked'=>1, 'position'=>1),
|
||||
's.nom'=>array('label'=>$langs->trans("Suppliers"), 'checked'=>1, 'position'=>2),
|
||||
'pfp.fk_availability'=>array('label'=>$langs->trans("Availability"), 'enabled' => !empty($conf->global->FOURN_PRODUCT_AVAILABILITY), 'checked'=>0, 'position'=>4),
|
||||
'pfp.fk_availability'=>array('label'=>$langs->trans("Availability"), 'enabled' => getDolGlobalInt('FOURN_PRODUCT_AVAILABILITY'), 'checked'=>0, 'position'=>4),
|
||||
'pfp.quantity'=>array('label'=>$langs->trans("QtyMin"), 'checked'=>1, 'position'=>5),
|
||||
'pfp.unitprice'=>array('label'=>$langs->trans("UnitPriceHT"), 'checked'=>1, 'position'=>9),
|
||||
'pfp.multicurrency_unitprice'=>array('label'=>$langs->trans("UnitPriceHTCurrency"), 'enabled' => (!empty($conf->multicurrency->enabled)), 'checked'=>0, 'position'=>10),
|
||||
'pfp.multicurrency_unitprice'=>array('label'=>$langs->trans("UnitPriceHTCurrency"), 'enabled' => isModEnabled('multicurrency'), 'checked'=>0, 'position'=>10),
|
||||
'pfp.delivery_time_days'=>array('label'=>$langs->trans("NbDaysToDelivery"), 'checked'=>1, 'position'=>13),
|
||||
'pfp.supplier_reputation'=>array('label'=>$langs->trans("ReputationForThisProduct"), 'checked'=>1, 'position'=>14),
|
||||
'pfp.fk_barcode_type'=>array('label'=>$langs->trans("BarcodeType"), 'enabled' => $conf->barcode->enabled, 'checked'=>0, 'position'=>15),
|
||||
'pfp.barcode'=>array('label'=>$langs->trans("BarcodeValue"), 'enabled' => $conf->barcode->enabled, 'checked'=>0, 'position'=>16),
|
||||
'pfp.packaging'=>array('label'=>$langs->trans("PackagingForThisProduct"), 'enabled' => !empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING), 'checked'=>0, 'position'=>17),
|
||||
'pfp.tms'=>array('label'=>$langs->trans("DateModification"), 'enabled' => $conf->barcode->enabled, 'checked'=>1, 'position'=>18),
|
||||
'pfp.fk_barcode_type'=>array('label'=>$langs->trans("BarcodeType"), 'enabled' => isModEnabled('barcode'), 'checked'=>0, 'position'=>15),
|
||||
'pfp.barcode'=>array('label'=>$langs->trans("BarcodeValue"), 'enabled' => isModEnabled('barcode'), 'checked'=>0, 'position'=>16),
|
||||
'pfp.packaging'=>array('label'=>$langs->trans("PackagingForThisProduct"), 'enabled' => getDolGlobalInt('PRODUCT_USE_SUPPLIER_PACKAGING'), 'checked'=>0, 'position'=>17),
|
||||
'pfp.tms'=>array('label'=>$langs->trans("DateModification"), 'enabled' => isModEnabled('barcode'), 'checked'=>1, 'position'=>18),
|
||||
);
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
|
||||
@ -992,7 +992,7 @@ if ($id) {
|
||||
print $bankaccountstatic->getNomUrl(1, 'transactions');
|
||||
print '</td>';
|
||||
}
|
||||
print '<td class="right">'.price($objp->amount)."</td>\n";
|
||||
print '<td class="right nowrap amountcard">'.price($objp->amount)."</td>\n";
|
||||
print "</tr>";
|
||||
$totalpaid += $objp->amount;
|
||||
$i++;
|
||||
@ -1003,14 +1003,14 @@ if ($id) {
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("AlreadyPaid")." :</td><td class=\"right\">".price($totalpaid)."</td></tr>\n";
|
||||
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("AmountExpected")." :</td><td class=\"right\">".price($object->amount)."</td></tr>\n";
|
||||
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("AlreadyPaid")." :</td><td class=\"right nowrap amountcard\">".price($totalpaid)."</td></tr>\n";
|
||||
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("AmountExpected")." :</td><td class=\"right nowrap amountcard\">".price($object->amount)."</td></tr>\n";
|
||||
|
||||
$resteapayer = $object->amount - $totalpaid;
|
||||
$cssforamountpaymentcomplete = 'amountpaymentcomplete';
|
||||
|
||||
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("RemainderToPay")." :</td>";
|
||||
print '<td class="right'.($resteapayer ? ' amountremaintopay' : (' '.$cssforamountpaymentcomplete)).'">'.price($resteapayer)."</td></tr>\n";
|
||||
print '<td class="right nowrap'.($resteapayer ? ' amountremaintopay' : (' '.$cssforamountpaymentcomplete)).'">'.price($resteapayer)."</td></tr>\n";
|
||||
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
|
||||
@ -239,11 +239,11 @@ if (isModEnabled('stock')) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter" || $conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") {
|
||||
if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter" || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") {
|
||||
// Select printer to use with terminal
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/dolreceiptprinter.class.php';
|
||||
$printer = new dolReceiptPrinter($db);
|
||||
if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter") {
|
||||
if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter") {
|
||||
$printer->listprinters();
|
||||
$printers = array();
|
||||
foreach ($printer->listprinters as $key => $value) {
|
||||
@ -251,20 +251,20 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter" || $conf->global->TA
|
||||
}
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MainPrinterToUse").'</td>';
|
||||
print '<td>';
|
||||
print $form->selectarray('TAKEPOS_PRINTER_TO_USE'.$terminal, $printers, (empty($conf->global->{'TAKEPOS_PRINTER_TO_USE'.$terminal}) ? '0' : $conf->global->{'TAKEPOS_PRINTER_TO_USE'.$terminal}), 1);
|
||||
print $form->selectarray('TAKEPOS_PRINTER_TO_USE'.$terminal, $printers, getDolGlobalInt('TAKEPOS_PRINTER_TO_USE'.$terminal), 1);
|
||||
print '</td></tr>';
|
||||
if ($conf->global->TAKEPOS_ORDER_PRINTERS) {
|
||||
if (getDolGlobalInt('TAKEPOS_ORDER_PRINTERS')) {
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("OrderPrinterToUse").' - '.$langs->trans("Printer").' 1</td>';
|
||||
print '<td>';
|
||||
print $form->selectarray('TAKEPOS_ORDER_PRINTER1_TO_USE'.$terminal, $printers, (empty($conf->global->{'TAKEPOS_ORDER_PRINTER1_TO_USE'.$terminal}) ? '0' : $conf->global->{'TAKEPOS_ORDER_PRINTER1_TO_USE'.$terminal}), 1);
|
||||
print $form->selectarray('TAKEPOS_ORDER_PRINTER1_TO_USE'.$terminal, $printers, getDolGlobalInt('TAKEPOS_ORDER_PRINTER1_TO_USE'.$terminal), 1);
|
||||
print '</td></tr>';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("OrderPrinterToUse").' - '.$langs->trans("Printer").' 2</td>';
|
||||
print '<td>';
|
||||
print $form->selectarray('TAKEPOS_ORDER_PRINTER2_TO_USE'.$terminal, $printers, (empty($conf->global->{'TAKEPOS_ORDER_PRINTER2_TO_USE'.$terminal}) ? '0' : $conf->global->{'TAKEPOS_ORDER_PRINTER2_TO_USE'.$terminal}), 1);
|
||||
print $form->selectarray('TAKEPOS_ORDER_PRINTER2_TO_USE'.$terminal, $printers, getDolGlobalInt('TAKEPOS_ORDER_PRINTER2_TO_USE'.$terminal), 1);
|
||||
print '</td></tr>';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("OrderPrinterToUse").' - '.$langs->trans("Printer").' 3</td>';
|
||||
print '<td>';
|
||||
print $form->selectarray('TAKEPOS_ORDER_PRINTER3_TO_USE'.$terminal, $printers, (empty($conf->global->{'TAKEPOS_ORDER_PRINTER3_TO_USE'.$terminal}) ? '0' : $conf->global->{'TAKEPOS_ORDER_PRINTER3_TO_USE'.$terminal}), 1);
|
||||
print $form->selectarray('TAKEPOS_ORDER_PRINTER3_TO_USE'.$terminal, $printers, getDolGlobalInt('TAKEPOS_ORDER_PRINTER3_TO_USE'.$terminal), 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
}
|
||||
@ -275,12 +275,12 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter" || $conf->global->TA
|
||||
}
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MainTemplateToUse").' (<a href="'.DOL_URL_ROOT.'/admin/receiptprinter.php?mode=template">'.$langs->trans("SetupReceiptTemplate").'</a>)</td>';
|
||||
print '<td>';
|
||||
print $form->selectarray('TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$terminal, $templates, (empty($conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$terminal}) ? '0' : $conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$terminal}), 1);
|
||||
print $form->selectarray('TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$terminal, $templates, getDolGlobalInt('TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$terminal), 1);
|
||||
print '</td></tr>';
|
||||
if ($conf->global->TAKEPOS_ORDER_PRINTERS) {
|
||||
if (getDolGlobalInt('TAKEPOS_ORDER_PRINTERS')) {
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("OrderTemplateToUse").'</td>';
|
||||
print '<td>';
|
||||
print $form->selectarray('TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS'.$terminal, $templates, (empty($conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS'.$terminal}) ? '0' : $conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS'.$terminal}), 1);
|
||||
print $form->selectarray('TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS'.$terminal, $templates, getDolGlobalInt('TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS'.$terminal), 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
}
|
||||
@ -376,7 +376,7 @@ print $form->textwithpicto($langs->trans('Header'), $htmltext, 1, 'help', '', 0,
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
$variablename = 'TAKEPOS_HEADER'.$terminaltouse;
|
||||
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
|
||||
if (!getDolGlobalInt('PDF_ALLOW_HTML_FOR_FREE_TEXT')) {
|
||||
print '<textarea name="'.$variablename.'" class="flat" cols="120">'.$conf->global->{$variablename}.'</textarea>';
|
||||
} else {
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
@ -392,7 +392,7 @@ print $form->textwithpicto($langs->trans('Footer'), $htmltext, 1, 'help', '', 0,
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
$variablename = 'TAKEPOS_FOOTER'.$terminaltouse;
|
||||
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
|
||||
if (!getDolGlobalInt('PDF_ALLOW_HTML_FOR_FREE_TEXT')) {
|
||||
print '<textarea name="'.$variablename.'" class="flat" cols="120">'.$conf->global->{$variablename}.'</textarea>';
|
||||
} else {
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
|
||||
@ -58,7 +58,7 @@ $setterminal = GETPOST('setterminal', 'int');
|
||||
$setcurrency = GETPOST('setcurrency', 'aZ09');
|
||||
|
||||
if (empty($_SESSION["takeposterminal"])) {
|
||||
if ($conf->global->TAKEPOS_NUM_TERMINALS == "1") {
|
||||
if (getDolGlobalInt('TAKEPOS_NUM_TERMINALS') == 1) {
|
||||
$_SESSION["takeposterminal"] = 1; // Use terminal 1 if there is only 1 terminal
|
||||
} elseif (!empty($_COOKIE["takeposterminal"])) {
|
||||
$_SESSION["takeposterminal"] = preg_replace('/[^a-zA-Z0-9_\-]/', '', $_COOKIE["takeposterminal"]); // Restore takeposterminal from previous session
|
||||
|
||||
Loading…
Reference in New Issue
Block a user