Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0
Conflicts: htdocs/api/index.php htdocs/langs/en_US/productbatch.lang htdocs/langs/fr_FR/productbatch.lang htdocs/ticket/list.php
This commit is contained in:
commit
2a18bce2f3
@ -77,7 +77,6 @@ if (preg_match('/\/api\/index\.php/', $_SERVER["PHP_SELF"])) {
|
||||
header('Access-Control-Allow-Headers: Content-Type, Authorization, api_key, DOLAPIKEY');
|
||||
}
|
||||
|
||||
|
||||
$res = 0;
|
||||
if (!$res && file_exists("../main.inc.php")) {
|
||||
$res = include '../main.inc.php';
|
||||
|
||||
@ -192,6 +192,7 @@ $limit = 5;
|
||||
$sql = "SELECT p.rowid, p.ref, p.amount, p.datec, p.statut";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p";
|
||||
$sql .= " WHERE p.type = 'bank-transfer'";
|
||||
$sql .= " AND p.entity IN (".getEntity('invoice').")";
|
||||
$sql .= " ORDER BY datec DESC";
|
||||
$sql .= $db->plimit($limit);
|
||||
|
||||
|
||||
@ -262,12 +262,20 @@ if ($id) {
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."prelevement_lignes as pl";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."prelevement_facture as pf";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."facture as f";
|
||||
if ($type == 'bank-transfer') {
|
||||
$sql .= " , ".MAIN_DB_PREFIX."facture_fourn as f";
|
||||
} else {
|
||||
$sql .= " , ".MAIN_DB_PREFIX."facture as f";
|
||||
}
|
||||
$sql .= " , ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql .= " WHERE pf.fk_prelevement_lignes = pl.rowid";
|
||||
$sql .= " AND pl.fk_prelevement_bons = p.rowid";
|
||||
$sql .= " AND f.fk_soc = s.rowid";
|
||||
$sql .= " AND pf.fk_facture = f.rowid";
|
||||
if ($type == 'bank-transfer') {
|
||||
$sql .= " AND pf.fk_facture_fourn = f.rowid";
|
||||
} else {
|
||||
$sql .= " AND pf.fk_facture = f.rowid";
|
||||
}
|
||||
$sql .= " AND f.entity IN (".getEntity('invoice').")";
|
||||
$sql .= " AND pl.rowid = ".((int) $id);
|
||||
if ($socid) {
|
||||
|
||||
@ -42,4 +42,5 @@ HideLots=Hide lots
|
||||
#Traceability - qc status
|
||||
OutOfOrder=Out of order
|
||||
InWorkingOrder=In working order
|
||||
ToReplace=Replace
|
||||
ToReplace=Replace
|
||||
CantMoveNonExistantSerial=Error. You ask a move on a record for a serial that does not exists anymore. May be you take the same serial on same warehouse several times in same shipment or it was used by another shipment. Remove this shipment and prepare another one.
|
||||
|
||||
@ -43,3 +43,4 @@ HideLots=Masquer les lots
|
||||
OutOfOrder=Hors d'usage
|
||||
InWorkingOrder=En état de marche
|
||||
ToReplace=Remplacer
|
||||
CantMoveNonExistantSerial=Erreur : Vous avez demandé un mouvement sur un numéro de série qui n’existe plus. Peut-être avez-vous requis le même numéro de série plusieurs fois dans une même expédition, ou il a déjà servi dans une autre expédition. Supprimez cette expédition et préparez-en une autre.
|
||||
|
||||
@ -959,7 +959,7 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete') {
|
||||
$delallowed = $usercancreate;
|
||||
$modulepart = 'stock';
|
||||
|
||||
print $formfile->showdocuments($modulepart, $object->ref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 0, 0, 0, 28, 0, '', 0, '', $object->default_lang, '', $object);
|
||||
print $formfile->showdocuments($modulepart, $objectref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 0, 0, 0, 28, 0, '', 0, '', $object->default_lang, '', $object);
|
||||
$somethingshown = $formfile->numoffiles;
|
||||
|
||||
print '</div><div class="fichehalfright">';
|
||||
|
||||
@ -851,7 +851,9 @@ class MouvementStock extends CommonObject
|
||||
*/
|
||||
private function createBatch($dluo, $qty)
|
||||
{
|
||||
global $user;
|
||||
global $user, $langs;
|
||||
|
||||
$langs->load('productbatch');
|
||||
|
||||
$pdluo = new Productbatch($this->db);
|
||||
|
||||
@ -862,7 +864,7 @@ class MouvementStock extends CommonObject
|
||||
$result = $pdluo->fetch($dluo);
|
||||
if (empty($pdluo->id)) {
|
||||
// We didn't find the line. May be it was deleted before by a previous move in same transaction.
|
||||
$this->error = 'Error. You ask a move on a record for a serial that does not exists anymore. May be you take the same serial on same warehouse several times in same shipment or it was used by another shipment. Remove this shipment and prepare another one.';
|
||||
$this->error = $langs->trans('CantMoveNonExistantSerial');
|
||||
$this->errors[] = $this->error;
|
||||
$result = -2;
|
||||
}
|
||||
|
||||
@ -621,10 +621,10 @@ if ($limit > 0 && $limit != $conf->liste_limit) {
|
||||
$param .= '&limit='.urlencode($limit);
|
||||
}
|
||||
foreach ($search as $key => $val) {
|
||||
if (is_array($search[$key]) && count($search[$key])) {
|
||||
foreach ($search[$key] as $skey) {
|
||||
if (is_array($val) && count($val)) {
|
||||
foreach ($val as $skey) {
|
||||
if ($skey != '') {
|
||||
$param .= '&search_'.$key.'[]='.urlencode($skey);
|
||||
$param .= (!empty($val)) ? '&search_'.$key.'[]='.urlencode($skey) : "";
|
||||
}
|
||||
}
|
||||
} elseif ($search[$key] != '') {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user