diff --git a/htdocs/takepos/css/pos.css.php b/htdocs/takepos/css/pos.css.php
index 12dd2836ea2..e180dc33b3e 100644
--- a/htdocs/takepos/css/pos.css.php
+++ b/htdocs/takepos/css/pos.css.php
@@ -751,7 +751,7 @@ div#moreinfo, div#infowarehouse {
border: none;
color: white;
background-color: #8c907e;
- padding: 14px 28px;
+ padding: 14px 0px;
font-size: 16px;
cursor: pointer;
text-align: center;
diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php
index 432afdea73a..93d9be71d5a 100644
--- a/htdocs/takepos/index.php
+++ b/htdocs/takepos/index.php
@@ -486,7 +486,8 @@ function FreeZone() {
function TakeposOrderNotes() {
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:"trans("OrderNotes"); ?>"});
+ ModalBox('ModalNote');
+ $("#textinput").focus();
}
function Refresh() {
@@ -918,6 +919,20 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
+
+
+
+
global->TAKEPOS_ORDER_NOTES == 1) {
- $menus[$r++] = array('title'=>'
'.$langs->trans("OrderNotes").'
', 'action'=>'TakeposOrderNotes();');
+ $menus[$r++] = array('title'=>'
'.$langs->trans("OrderNotes").'
', 'action'=>'TakeposOrderNotes();');
}
if ($conf->global->TAKEPOS_SUPPLEMENTS) {
$menus[$r++] = array('title'=>'
'.$langs->trans("ProductSupplements").'
', 'action'=>'LoadProducts(\'supplements\');');
diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php
index d73f6499c93..c7a01e5d8bc 100644
--- a/htdocs/takepos/invoice.php
+++ b/htdocs/takepos/invoice.php
@@ -565,9 +565,9 @@ if ($action == "freezone") {
if ($action == "addnote") {
foreach ($invoice->lines as $line) {
- if ($line->id == $number) {
- $line->array_options['order_notes'] = $desc;
- $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);
+ if ($line->id == $idline) {
+ $desc = GETPOST('addnote', 'alpha');
+ $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);
@@ -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() {
console.log("Set customer info and sales in header placeid= status=statut; ?>");