Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
213c918a90
@ -503,9 +503,8 @@ if ($action == 'create' && !$error)
|
||||
print "</table>\n";
|
||||
}
|
||||
|
||||
|
||||
//Mode liste
|
||||
if (($action != 'create' && $action != 'add') || !$error)
|
||||
if (($action != 'create' && $action != 'add') && !$error)
|
||||
{
|
||||
llxHeader();
|
||||
?>
|
||||
|
||||
@ -670,15 +670,24 @@ class pdf_azur extends ModelePDFPropales
|
||||
}
|
||||
|
||||
$already_merged[] = $line->fk_product;
|
||||
|
||||
$product = new Product($this->db);
|
||||
$product->fetch($line->fk_product);
|
||||
|
||||
if ($product->entity!=$conf->entity) {
|
||||
$entity_product_file=$product->entity;
|
||||
} else {
|
||||
$entity_product_file=$conf->entity;
|
||||
}
|
||||
|
||||
// If PDF is selected and file is not empty
|
||||
if (count($filetomerge->lines) > 0) {
|
||||
foreach ( $filetomerge->lines as $linefile ) {
|
||||
if (! empty($linefile->id) && ! empty($linefile->file_name)) {
|
||||
if (! empty($conf->product->enabled))
|
||||
$filetomerge_dir = $conf->product->multidir_output[$conf->entity] . '/' . dol_sanitizeFileName($line->product_ref);
|
||||
$filetomerge_dir = $conf->product->multidir_output[$entity_product_file] . '/' . dol_sanitizeFileName($line->product_ref);
|
||||
elseif (! empty($conf->service->enabled))
|
||||
$filetomerge_dir = $conf->service->multidir_output[$conf->entity] . '/' . dol_sanitizeFileName($line->product_ref);
|
||||
$filetomerge_dir = $conf->service->multidir_output[$entity_product_file] . '/' . dol_sanitizeFileName($line->product_ref);
|
||||
|
||||
dol_syslog(get_class($this) . ':: upload_dir=' . $filetomerge_dir, LOG_DEBUG);
|
||||
|
||||
|
||||
@ -259,7 +259,7 @@ $formfile = new FormFile($db);
|
||||
$companystatic = new Societe($db);
|
||||
|
||||
// Mode creation
|
||||
if ($action == 'create' && empty($mesgs)) {
|
||||
if ($action == 'create' && !$error) {
|
||||
|
||||
llxHeader();
|
||||
print_fiche_titre($langs->trans('NewBill'));
|
||||
@ -380,7 +380,7 @@ if ($action == 'create' && empty($mesgs)) {
|
||||
}
|
||||
|
||||
// Mode liste
|
||||
if (($action != 'create' && $action != 'add') || ! empty($mesgs)) {
|
||||
if (($action != 'create' && $action != 'add') && !$error) {
|
||||
llxHeader();
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
|
||||
@ -227,7 +227,7 @@ class Propalmergepdfproduct extends CommonObject
|
||||
*
|
||||
* @param int $product_id Id object
|
||||
* @param string $lang Lang string code
|
||||
* @return int <0 if KO, >0 if OK
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function fetch_by_product($product_id, $lang='')
|
||||
{
|
||||
@ -656,5 +656,4 @@ class PropalmergepdfproductLine
|
||||
function __construct() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user