Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
72dbe02958
@ -1217,7 +1217,7 @@ if ($resql) {
|
|||||||
if ($permissiontocancel) {
|
if ($permissiontocancel) {
|
||||||
$arrayofmassactions['cancelorders'] = img_picto('', 'close_title', 'class="pictofixedwidth"').$langs->trans("Cancel");
|
$arrayofmassactions['cancelorders'] = img_picto('', 'close_title', 'class="pictofixedwidth"').$langs->trans("Cancel");
|
||||||
}
|
}
|
||||||
if ($user->rights->facture->creer) {
|
if (!empty($conf->invoice->enabled) && $user->rights->facture->creer) {
|
||||||
$arrayofmassactions['createbills'] = img_picto('', 'bill', 'class="pictofixedwidth"').$langs->trans("CreateInvoiceForThisCustomer");
|
$arrayofmassactions['createbills'] = img_picto('', 'bill', 'class="pictofixedwidth"').$langs->trans("CreateInvoiceForThisCustomer");
|
||||||
}
|
}
|
||||||
if ($permissiontoclose) {
|
if ($permissiontoclose) {
|
||||||
|
|||||||
@ -668,6 +668,8 @@ class Invoices extends DolibarrApi
|
|||||||
$result = $this->invoice->delete(DolibarrApiAccess::$user);
|
$result = $this->invoice->delete(DolibarrApiAccess::$user);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
throw new RestException(500, 'Error when deleting invoice');
|
throw new RestException(500, 'Error when deleting invoice');
|
||||||
|
} elseif ($result == 0) {
|
||||||
|
throw new RestException(403, 'Invoice not erasable');
|
||||||
}
|
}
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
|
|||||||
@ -336,11 +336,11 @@ if ($action == 'importCSV' && !empty($user->rights->stock->mouvement->creer)) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//var_dump($data);
|
//var_dump($data);
|
||||||
$tmp_id_sw = $data[$i][0]['val'];
|
$tmp_id_sw = (int) $data[$i][0]['val'];
|
||||||
$tmp_id_tw = $data[$i][1]['val'];
|
$tmp_id_tw = (int) $data[$i][1]['val'];
|
||||||
$tmp_id_product = $data[$i][2]['val'];
|
$tmp_id_product = (int) $data[$i][2]['val'];
|
||||||
$tmp_qty = $data[$i][3]['val'];
|
$tmp_qty = price2num((float) $data[$i][3]['val'], 'MS');
|
||||||
$tmp_batch = $data[$i][4]['val'];
|
$tmp_batch = dol_escape_htmltag($data[$i][4]['val']);
|
||||||
|
|
||||||
if (!is_numeric($tmp_id_product)) {
|
if (!is_numeric($tmp_id_product)) {
|
||||||
$result = fetchref($productstatic, $tmp_id_product);
|
$result = fetchref($productstatic, $tmp_id_product);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user