Merge pull request #17262 from andreubisquerra/master
TakePOS notes improvements
This commit is contained in:
commit
0520a6044b
@ -751,7 +751,7 @@ div#moreinfo, div#infowarehouse {
|
|||||||
border: none;
|
border: none;
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #8c907e;
|
background-color: #8c907e;
|
||||||
padding: 14px 28px;
|
padding: 14px 0px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
@ -486,7 +486,8 @@ function FreeZone() {
|
|||||||
|
|
||||||
function TakeposOrderNotes() {
|
function TakeposOrderNotes() {
|
||||||
console.log("Open box to order notes");
|
console.log("Open box to order notes");
|
||||||
$.colorbox({href:"freezone.php?action=addnote&place="+place+"&idline="+selectedline, onClosed: function () { Refresh(); },width:"80%", height:"250px", transition:"none", iframe:"true", title:"<?php echo $langs->trans("OrderNotes"); ?>"});
|
ModalBox('ModalNote');
|
||||||
|
$("#textinput").focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
function Refresh() {
|
function Refresh() {
|
||||||
@ -918,6 +919,20 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
|
|||||||
<button type="button" class="block" onclick="document.getElementById('ModalCreditNote').style.display = 'none';"><?php print $langs->trans("No"); ?></button>
|
<button type="button" class="block" onclick="document.getElementById('ModalCreditNote').style.display = 'none';"><?php print $langs->trans("No"); ?></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Modal Note -->
|
||||||
|
<div id="ModalNote" class="modal">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<span class="close" href="#" onclick="document.getElementById('ModalNote').style.display = 'none';">×</span>
|
||||||
|
<h3><?php print $langs->trans("Note"); ?></h3>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<input type="text" class="block" id="textinput">
|
||||||
|
<button type="button" class="block" onclick="SetNote(); document.getElementById('ModalNote').style.display = 'none';">OK</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row1<?php if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
|
<div class="row1<?php if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
|
||||||
@ -1031,7 +1046,7 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector" && $conf->global->TAKEPOS_ORDER_NOTES == 1) {
|
if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector" && $conf->global->TAKEPOS_ORDER_NOTES == 1) {
|
||||||
$menus[$r++] = array('title'=>'<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("OrderNotes").'</div>', 'action'=>'TakeposOrderNotes();');
|
$menus[$r++] = array('title'=>'<span class="fa fa-sticky-note paddingrightonly"></span><div class="trunc">'.$langs->trans("OrderNotes").'</div>', 'action'=>'TakeposOrderNotes();');
|
||||||
}
|
}
|
||||||
if ($conf->global->TAKEPOS_SUPPLEMENTS) {
|
if ($conf->global->TAKEPOS_SUPPLEMENTS) {
|
||||||
$menus[$r++] = array('title'=>'<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("ProductSupplements").'</div>', 'action'=>'LoadProducts(\'supplements\');');
|
$menus[$r++] = array('title'=>'<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("ProductSupplements").'</div>', 'action'=>'LoadProducts(\'supplements\');');
|
||||||
|
|||||||
@ -565,9 +565,9 @@ if ($action == "freezone") {
|
|||||||
|
|
||||||
if ($action == "addnote") {
|
if ($action == "addnote") {
|
||||||
foreach ($invoice->lines as $line) {
|
foreach ($invoice->lines as $line) {
|
||||||
if ($line->id == $number) {
|
if ($line->id == $idline) {
|
||||||
$line->array_options['order_notes'] = $desc;
|
$desc = GETPOST('addnote', 'alpha');
|
||||||
$result = $invoice->updateline($line->id, $line->desc, $line->subprice, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit);
|
$result = $invoice->updateline($line->id, $desc, $line->subprice, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$invoice->fetch($placeid);
|
$invoice->fetch($placeid);
|
||||||
@ -1019,6 +1019,11 @@ function CreditNote() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function SetNote() {
|
||||||
|
$("#poslines").load("invoice.php?action=addnote&invoiceid="+placeid+"&idline="+selectedline+"&addnote="+$("#textinput").val(), function() {
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$( document ).ready(function() {
|
$( document ).ready(function() {
|
||||||
console.log("Set customer info and sales in header placeid=<?php echo $placeid; ?> status=<?php echo $invoice->statut; ?>");
|
console.log("Set customer info and sales in header placeid=<?php echo $placeid; ?> status=<?php echo $invoice->statut; ?>");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user