Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 13.0
Conflicts: htdocs/takepos/invoice.php
This commit is contained in:
commit
255b943b99
@ -483,7 +483,7 @@ function TakeposOrderNotes() {
|
||||
}
|
||||
|
||||
function Refresh() {
|
||||
console.log("Refresh");
|
||||
console.log("Refresh by reloading place="+place);
|
||||
$("#poslines").load("invoice.php?place="+place, function() {
|
||||
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
||||
});
|
||||
@ -491,9 +491,10 @@ function Refresh() {
|
||||
|
||||
function New() {
|
||||
// If we go here,it means $conf->global->TAKEPOS_BAR_RESTAURANT is not defined
|
||||
console.log("New with place = <?php echo $place; ?>, js place="+place);
|
||||
|
||||
invoiceid = $("#invoiceid").val();
|
||||
|
||||
console.log("New with place = <?php echo $place; ?>, js place="+place+", invoiceid="+invoiceid);
|
||||
|
||||
$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getInvoice&id='+invoiceid, function(data) {
|
||||
var r;
|
||||
|
||||
|
||||
@ -572,16 +572,9 @@ if ($action == "deleteline") {
|
||||
}
|
||||
}
|
||||
|
||||
// Action to delete or discard an invoice
|
||||
if ($action == "delete") {
|
||||
// $placeid is the invoice id (it differs from place) and is defined if the place is set and the ref of invoice is '(PROV-POS'.$_SESSION["takeposterminal"].'-'.$place.')', so the fetch at begining of page works.
|
||||
|
||||
/*$reg = array();
|
||||
if (preg_match('/^(\d+)-(\d+)$/', $place, $reg)) {
|
||||
|
||||
$place = $reg[1];
|
||||
var_dump($place);
|
||||
}*/
|
||||
|
||||
if ($placeid > 0) {
|
||||
$result = $invoice->fetch($placeid);
|
||||
|
||||
@ -599,7 +592,9 @@ if ($action == "delete") {
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."facture set fk_soc=".$conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]};
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."facture";
|
||||
$sql .= " SET fk_soc=".$conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]}.", ";
|
||||
$sql .= " datec = '".$db->idate(dol_now())."'";
|
||||
$sql .= " WHERE ref='(PROV-POS".$db->escape($_SESSION["takeposterminal"]."-".$place).")'";
|
||||
$resql1 = $db->query($sql);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user