NEW option for Takepos to show the total price without tax
This commit is contained in:
parent
f7c119e48c
commit
49c0967a3e
@ -124,4 +124,6 @@ GiftReceipt=Gift receipt
|
||||
ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first
|
||||
AllowDelayedPayment=Allow delayed payment
|
||||
PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts
|
||||
WeighingScale=Weighing scale
|
||||
WeighingScale=Weighing scale
|
||||
ShowPriceHT = Display the price excluding tax column
|
||||
ShowPriceHTOnReceipt = Display the price excluding tax column on receipt
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2019 Andreu Bisquerra Gaya <jove@bisquerra.com>
|
||||
* Copyright (C) 2021 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -233,6 +234,14 @@ print '<td colspan="2">';
|
||||
print $form->selectyesno("TAKEPOS_AUTO_PRINT_TICKETS", $conf->global->TAKEPOS_AUTO_PRINT_TICKETS, 1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
|
||||
// Show price without vat
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('ShowPriceHTOnReceipt');
|
||||
print '<td colspan="2">';
|
||||
print ajax_constantonoff("TAKEPOS_SHOW_HT_RECEIPT", array(), $conf->entity, 0, 0, 1, 0);
|
||||
print "</td></tr>\n";
|
||||
|
||||
if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector" && filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) {
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('WeighingScale');
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2021 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -371,6 +372,13 @@ print '<td colspan="2">';
|
||||
print ajax_constantonoff("TAKEPOS_DELAYED_PAYMENT", array(), $conf->entity, 0, 0, 1, 0);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Show price without vat
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('ShowPriceHT');
|
||||
print '<td colspan="2">';
|
||||
print ajax_constantonoff("TAKEPOS_SHOW_HT", array(), $conf->entity, 0, 0, 1, 0);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Numbering module
|
||||
//print '<tr class="oddeven"><td>';
|
||||
//print $langs->trans("BillsNumberingModule");
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2018 Andreu Bisquerra <jove@bisquerra.com>
|
||||
* Copyright (C) 2021 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -1120,7 +1121,10 @@ print '<!-- invoice.php place='.(int) $place.' invoice='.$invoice->ref.' mobilep
|
||||
print '<div class="div-table-responsive-no-min invoice">';
|
||||
print '<table id="tablelines" class="noborder noshadow postablelines" width="100%">';
|
||||
if ($sectionwithinvoicelink && ($mobilepage == "invoice" || $mobilepage == "")) {
|
||||
print '<tr><td colspan="4">'.$sectionwithinvoicelink.'</td></tr>';
|
||||
if(!empty($conf->global->TAKEPOS_SHOW_HT)){ print '<tr><td colspan="5">'.$sectionwithinvoicelink.'</td></tr>'; }
|
||||
else{
|
||||
print '<tr><td colspan="4">'.$sectionwithinvoicelink.'</td></tr>';
|
||||
}
|
||||
}
|
||||
print '<tr class="liste_titre nodrag nodrop">';
|
||||
print '<td class="linecoldescription">';
|
||||
@ -1154,6 +1158,23 @@ if ($_SESSION["basiclayout"] != 1)
|
||||
{
|
||||
print '<td class="linecolqty right">'.$langs->trans('ReductionShort').'</td>';
|
||||
print '<td class="linecolqty right">'.$langs->trans('Qty').'</td>';
|
||||
if($conf->global->TAKEPOS_SHOW_HT) {
|
||||
print '<td class="linecolht right nowraponall">';
|
||||
print '<span class="opacitymedium small">' . $langs->trans('TotalHTShort') . '</span><br>';
|
||||
// In phone version only show when it is invoice page
|
||||
if ($mobilepage == "invoice" || $mobilepage == "") {
|
||||
print '<span id="linecolht-span-total" style="font-size:1.3em; font-weight: bold;">' . price($invoice->total_ht, 1, '', 1, -1, -1, $conf->currency) . '</span>';
|
||||
if (!empty($conf->multicurrency->enabled) && $_SESSION["takeposcustomercurrency"] != "" && $conf->currency != $_SESSION["takeposcustomercurrency"]) {
|
||||
//Only show customer currency if multicurrency module is enabled, if currency selected and if this currency selected is not the same as main currency
|
||||
include_once DOL_DOCUMENT_ROOT . '/multicurrency/class/multicurrency.class.php';
|
||||
$multicurrency = new MultiCurrency($db);
|
||||
$multicurrency->fetch(0, $_SESSION["takeposcustomercurrency"]);
|
||||
print '<br><span id="linecolht-span-total" style="font-size:0.9em; font-style:italic;">(' . price($invoice->total_ht * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')</span>';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
print '<td class="linecolht right nowraponall">';
|
||||
print '<span class="opacitymedium small">'.$langs->trans('TotalTTCShort').'</span><br>';
|
||||
// In phone version only show when it is invoice page
|
||||
@ -1373,6 +1394,18 @@ if ($placeid > 0)
|
||||
}
|
||||
|
||||
$htmlforlines .= '</td>';
|
||||
if($conf->global->TAKEPOS_SHOW_HT) {
|
||||
$htmlforlines .= '<td class="right classfortooltip" title="'.$moreinfo.'">';
|
||||
$htmlforlines .= price($line->total_ht, 1, '', 1, -1, -1, $conf->currency);
|
||||
if (!empty($conf->multicurrency->enabled) && $_SESSION["takeposcustomercurrency"] != "" && $conf->currency != $_SESSION["takeposcustomercurrency"]) {
|
||||
//Only show customer currency if multicurrency module is enabled, if currency selected and if this currency selected is not the same as main currency
|
||||
include_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php';
|
||||
$multicurrency = new MultiCurrency($db);
|
||||
$multicurrency->fetch(0, $_SESSION["takeposcustomercurrency"]);
|
||||
$htmlforlines .= '<br><span id="linecolht-span-total" style="font-size:0.9em; font-style:italic;">('.price($line->total_ht * $multicurrency->rate->rate).' '.$_SESSION["takeposcustomercurrency"].')</span>';
|
||||
}
|
||||
$htmlforlines .= '</td>';
|
||||
}
|
||||
$htmlforlines .= '<td class="right classfortooltip" title="'.$moreinfo.'">';
|
||||
$htmlforlines .= price($line->total_ttc, 1, '', 1, -1, -1, $conf->currency);
|
||||
if (!empty($conf->multicurrency->enabled) && $_SESSION["takeposcustomercurrency"] != "" && $conf->currency != $_SESSION["takeposcustomercurrency"]) {
|
||||
@ -1390,10 +1423,15 @@ if ($placeid > 0)
|
||||
print $htmlforlines;
|
||||
}
|
||||
} else {
|
||||
print '<tr class="drag drop oddeven"><td class="left"><span class="opacitymedium">'.$langs->trans("Empty").'</span></td><td></td><td></td><td></td></tr>';
|
||||
print '<tr class="drag drop oddeven"><td class="left"><span class="opacitymedium">'.$langs->trans("Empty").'</span></td><td></td><td></td><td></td>';
|
||||
if(!empty($conf->global->TAKEPOS_SHOW_HT)){ print '<td></td>'; }
|
||||
print '</tr>';
|
||||
}
|
||||
} else { // No invoice generated yet
|
||||
print '<tr class="drag drop oddeven"><td class="left"><span class="opacitymedium">'.$langs->trans("Empty").'</span></td><td></td><td></td><td></td></tr>';
|
||||
print '<tr class="drag drop oddeven"><td class="left"><span class="opacitymedium">'.$langs->trans("Empty").'</span></td><td></td><td></td><td></td>';
|
||||
|
||||
if(!empty($conf->global->TAKEPOS_SHOW_HT)){ print '<td></td>'; }
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018 Andreu Bisquerra <jove@bisquerra.com>
|
||||
* Copyright (C) 2019 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||
* Copyright (C) 2021 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -139,6 +140,9 @@ if ($conf->global->TAKEPOS_SHOW_CUSTOMER)
|
||||
<th class="center"><?php print $langs->trans("Label"); ?></th>
|
||||
<th class="right"><?php print $langs->trans("Qty"); ?></th>
|
||||
<th class="right"><?php if ($gift != 1) print $langs->trans("Price"); ?></th>
|
||||
<?php if(!empty($conf->global->TAKEPOS_SHOW_HT_RECEIPT)){ ?>
|
||||
<th class="right"><?php if ($gift != 1) print $langs->trans("TotalHT"); ?></th>
|
||||
<?php } ?>
|
||||
<th class="right"><?php if ($gift != 1) print $langs->trans("TotalTTC"); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -154,6 +158,12 @@ if ($conf->global->TAKEPOS_SHOW_CUSTOMER)
|
||||
</td>
|
||||
<td class="right"><?php echo $line->qty; ?></td>
|
||||
<td class="right"><?php if ($gift != 1) echo price(price2num($line->total_ttc / $line->qty, 'MT'), 1); ?></td>
|
||||
<?php
|
||||
if(!empty($conf->global->TAKEPOS_SHOW_HT_RECEIPT)){ ?>
|
||||
<td class="right"><?php if ($gift != 1) echo price($line->total_ht, 1); ?></td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<td class="right"><?php if ($gift != 1) echo price($line->total_ttc, 1); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
Loading…
Reference in New Issue
Block a user