Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
4627f06c70
@ -34,8 +34,8 @@ $action = GETPOST('action', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
|
||||
$codeventil = GETPOST('codeventil');
|
||||
$id = GETPOST('id');
|
||||
$codeventil = GETPOST('codeventil', 'int');
|
||||
$id = GETPOST('id', 'int');
|
||||
|
||||
// Security check
|
||||
if ($user->socid > 0)
|
||||
|
||||
@ -38,8 +38,8 @@ $action = GETPOST('action', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
|
||||
$codeventil = GETPOST('codeventil');
|
||||
$id = GETPOST('id');
|
||||
$codeventil = GETPOST('codeventil', 'int');
|
||||
$id = GETPOST('id', 'int');
|
||||
|
||||
// Security check
|
||||
if ($user->socid > 0)
|
||||
|
||||
@ -38,8 +38,8 @@ $action = GETPOST('action', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
|
||||
$codeventil = GETPOST('codeventil');
|
||||
$id = GETPOST('id');
|
||||
$codeventil = GETPOST('codeventil', 'int');
|
||||
$id = GETPOST('id', 'int');
|
||||
|
||||
// Security check
|
||||
if ($user->socid > 0)
|
||||
|
||||
@ -27,7 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/comm/mailing/class/mailing.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/emailing.lib.php';
|
||||
|
||||
$id = GETPOST('id');
|
||||
$id = GETPOST('id', 'int');
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->load("mails");
|
||||
|
||||
@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('bills', 'companies'));
|
||||
|
||||
$id = GETPOST('id');
|
||||
$id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
|
||||
@ -8059,7 +8059,11 @@ abstract class CommonObject
|
||||
$error++;
|
||||
$this->errors[] = $this->error;
|
||||
} else {
|
||||
$result = $this->delete($user);
|
||||
if (get_class($this) == 'Contact') { // TODO special code because delete() for contact has not been standardized like other delete.
|
||||
$result = $this->delete();
|
||||
} else {
|
||||
$result = $this->delete($user);
|
||||
}
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
$this->errors[] = $this->error;
|
||||
|
||||
@ -1045,7 +1045,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
</script>';
|
||||
|
||||
// List of lines already dispatched
|
||||
$sql = "SELECT p.ref, p.label,";
|
||||
$sql = "SELECT p.rowid as pid, p.ref, p.label,";
|
||||
$sql .= " e.rowid as warehouse_id, e.ref as entrepot,";
|
||||
$sql .= " cfd.rowid as dispatchlineid, cfd.fk_product, cfd.qty, cfd.eatby, cfd.sellby, cfd.batch, cfd.comment, cfd.status, cfd.datec";
|
||||
$sql.=" ,cd.rowid, cd.subprice";
|
||||
@ -1131,9 +1131,18 @@ if ($id > 0 || !empty($ref)) {
|
||||
print '<td>'.dol_print_date($db->jdate($objp->date_delivery), 'day').'</td>';
|
||||
|
||||
if (!empty($conf->productbatch->enabled)) {
|
||||
print '<td class="dispatch_batch_number">'.$objp->batch.'</td>';
|
||||
print '<td class="dispatch_dluo">'.dol_print_date($db->jdate($objp->eatby), 'day').'</td>';
|
||||
print '<td class="dispatch_dlc">'.dol_print_date($db->jdate($objp->sellby), 'day').'</td>';
|
||||
if ($objp->batch) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php';
|
||||
$lot=new Productlot($db);
|
||||
$lot->fetch(0, $objp->pid, $objp->batch);
|
||||
print '<td class="dispatch_batch_number">'.$lot->getNomUrl(1).'</td>';
|
||||
print '<td class="dispatch_dluo">'.dol_print_date($lot->eatby, 'day').'</td>';
|
||||
print '<td class="dispatch_dlc">'.dol_print_date($lot->sellby, 'day').'</td>';
|
||||
} else {
|
||||
print '<td class="dispatch_batch_number"></td>';
|
||||
print '<td class="dispatch_dluo"></td>';
|
||||
print '<td class="dispatch_dlc"></td>';
|
||||
}
|
||||
}
|
||||
|
||||
// Qty
|
||||
|
||||
@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductAttributeValue.class.php'
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
||||
$id = GETPOST('id');
|
||||
$id = GETPOST('id', 'int');
|
||||
|
||||
if (!$id) {
|
||||
print json_encode(array(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user