mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 09:08:09 +01:00
Compare commits
6 Commits
7828311250
...
526da8e5a7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
526da8e5a7 | ||
|
|
23db225ec3 | ||
|
|
d647a95de8 | ||
|
|
68004a4009 | ||
|
|
a38ffa02ac | ||
|
|
6545957cbd |
@@ -19,6 +19,7 @@
|
||||
* Copyright (C) 2023 William Mead <william.mead@manchenumerique.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2025 Benjamin Falière <benjamin@faliere.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -1932,6 +1933,12 @@ if (empty($reshook)) {
|
||||
|
||||
$type = $product->type;
|
||||
$price_base_type = $product->price_base_type;
|
||||
|
||||
// If base type TTc, we change pu value to define the TTC one
|
||||
if ($price_base_type == 'TTC') {
|
||||
$pu = $pu_ttc;
|
||||
}
|
||||
|
||||
$label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : '');
|
||||
|
||||
$price_min = $product->price_min;
|
||||
@@ -3456,14 +3463,15 @@ if ($action == 'create') {
|
||||
if (empty($reshook)) {
|
||||
if ($action != 'editline') {
|
||||
// Subtotal
|
||||
if ($object->status == Propal::STATUS_DRAFT && isModEnabled('subtotals') && getDolGlobalString('SUBTOTAL_TITLE_'.strtoupper($object->element))) {
|
||||
if ($object->status == Propal::STATUS_DRAFT && isModEnabled('subtotals')
|
||||
&& (getDolGlobalInt('SUBTOTAL_TITLE_'.strtoupper($object->element)) || getDolGlobalInt('SUBTOTAL_'.strtoupper($object->element)))) {
|
||||
$langs->load('subtotals');
|
||||
|
||||
$url_button = array();
|
||||
|
||||
$url_button[] = array(
|
||||
'lang' => 'subtotals',
|
||||
'enabled' => (isModEnabled('propal') && $object->status == Propal::STATUS_DRAFT),
|
||||
'enabled' => (isModEnabled('propal') && $object->status == Propal::STATUS_DRAFT && getDolGlobalInt('SUBTOTAL_TITLE_'.strtoupper($object->element))),
|
||||
'perm' => (bool) $usercancreate,
|
||||
'label' => $langs->trans('AddTitleLine'),
|
||||
'url' => '/comm/propal/card.php?id='.$object->id.'&action=add_title_line&token='.newToken()
|
||||
@@ -3471,7 +3479,7 @@ if ($action == 'create') {
|
||||
|
||||
$url_button[] = array(
|
||||
'lang' => 'subtotals',
|
||||
'enabled' => (isModEnabled('propal') && $object->status == Propal::STATUS_DRAFT),
|
||||
'enabled' => (isModEnabled('propal') && $object->status == Propal::STATUS_DRAFT && getDolGlobalInt('SUBTOTAL_'.strtoupper($object->element))),
|
||||
'perm' => (bool) $usercancreate,
|
||||
'label' => $langs->trans('AddSubtotalLine'),
|
||||
'url' => '/comm/propal/card.php?id='.$object->id.'&action=add_subtotal_line&token='.newToken()
|
||||
|
||||
@@ -3445,14 +3445,15 @@ if ($action == 'create' && $usercancreate) {
|
||||
}
|
||||
|
||||
// Subtotal
|
||||
if ($object->status == Commande::STATUS_DRAFT && isModEnabled('subtotals') && getDolGlobalString('SUBTOTAL_TITLE_'.strtoupper($object->element))) {
|
||||
if ($object->status == Commande::STATUS_DRAFT && isModEnabled('subtotals')
|
||||
&& (getDolGlobalInt('SUBTOTAL_TITLE_'.strtoupper($object->element)) || getDolGlobalInt('SUBTOTAL_'.strtoupper($object->element)))) {
|
||||
$langs->load('subtotals');
|
||||
|
||||
$url_button = array();
|
||||
|
||||
$url_button[] = array(
|
||||
'lang' => 'subtotals',
|
||||
'enabled' => (isModEnabled('order') && $object->status == Commande::STATUS_DRAFT),
|
||||
'enabled' => (isModEnabled('order') && $object->status == Commande::STATUS_DRAFT && getDolGlobalInt('SUBTOTAL_TITLE_'.strtoupper($object->element))),
|
||||
'perm' => (bool) $usercancreate,
|
||||
'label' => $langs->trans('AddTitleLine'),
|
||||
'url' => '/commande/card.php?id='.$object->id.'&action=add_title_line&token='.newToken()
|
||||
@@ -3460,7 +3461,7 @@ if ($action == 'create' && $usercancreate) {
|
||||
|
||||
$url_button[] = array(
|
||||
'lang' => 'subtotals',
|
||||
'enabled' => (isModEnabled('order') && $object->status == Commande::STATUS_DRAFT),
|
||||
'enabled' => (isModEnabled('order') && $object->status == Commande::STATUS_DRAFT && getDolGlobalInt('SUBTOTAL_'.strtoupper($object->element))),
|
||||
'perm' => (bool) $usercancreate,
|
||||
'label' => $langs->trans('AddSubtotalLine'),
|
||||
'url' => '/commande/card.php?id='.$object->id.'&action=add_subtotal_line&token='.newToken()
|
||||
|
||||
@@ -2076,14 +2076,15 @@ if ($action == 'create') {
|
||||
);
|
||||
|
||||
// Subtotal
|
||||
if (empty($object->suspended) && isModEnabled('subtotals') && getDolGlobalString('SUBTOTAL_TITLE_'.strtoupper($object->element))) {
|
||||
if (empty($object->suspended) && isModEnabled('subtotals')
|
||||
&& (getDolGlobalInt('SUBTOTAL_TITLE_'.strtoupper($object->element)) || getDolGlobalInt('SUBTOTAL_'.strtoupper($object->element)))) {
|
||||
$langs->load("subtotals");
|
||||
|
||||
$url_button = array();
|
||||
|
||||
$url_button[] = array(
|
||||
'lang' => 'subtotals',
|
||||
'enabled' => (isModEnabled('invoice') && $object->status == Facture::STATUS_DRAFT),
|
||||
'enabled' => (isModEnabled('invoice') && $object->status == Facture::STATUS_DRAFT && getDolGlobalInt('SUBTOTAL_TITLE_'.strtoupper($object->element))),
|
||||
'perm' => (bool) $usercancreate,
|
||||
'label' => $langs->trans('AddTitleLine'),
|
||||
'url' => '/compta/facture/card-rec.php?id='.$object->id.'&action=add_title_line&token='.newToken()
|
||||
@@ -2091,7 +2092,7 @@ if ($action == 'create') {
|
||||
|
||||
$url_button[] = array(
|
||||
'lang' => 'subtotals',
|
||||
'enabled' => (isModEnabled('invoice') && $object->status == Facture::STATUS_DRAFT),
|
||||
'enabled' => (isModEnabled('invoice') && $object->status == Facture::STATUS_DRAFT && getDolGlobalInt('SUBTOTAL_'.strtoupper($object->element))),
|
||||
'perm' => (bool) $usercancreate,
|
||||
'label' => $langs->trans('AddSubtotalLine'),
|
||||
'url' => '/compta/facture/card-rec.php?id='.$object->id.'&action=add_subtotal_line&token='.newToken()
|
||||
|
||||
@@ -6390,14 +6390,15 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// Subtotal
|
||||
if ($object->status == Facture::STATUS_DRAFT && isModEnabled('subtotals') && getDolGlobalString('SUBTOTAL_TITLE_'.strtoupper($object->element))) {
|
||||
if ($object->status == Facture::STATUS_DRAFT && isModEnabled('subtotals')
|
||||
&& (getDolGlobalInt('SUBTOTAL_TITLE_'.strtoupper($object->element)) || getDolGlobalInt('SUBTOTAL_'.strtoupper($object->element)))) {
|
||||
$langs->load("subtotals");
|
||||
|
||||
$url_button = array();
|
||||
|
||||
$url_button[] = array(
|
||||
'lang' => 'subtotals',
|
||||
'enabled' => (isModEnabled('invoice') && $object->status == Facture::STATUS_DRAFT),
|
||||
'enabled' => (isModEnabled('invoice') && $object->status == Facture::STATUS_DRAFT && getDolGlobalInt('SUBTOTAL_TITLE_'.strtoupper($object->element))),
|
||||
'perm' => (bool) $usercancreate,
|
||||
'label' => $langs->trans('AddTitleLine'),
|
||||
'url' => '/compta/facture/card.php?facid='.$object->id.'&action=add_title_line&token='.newToken()
|
||||
@@ -6405,7 +6406,7 @@ if ($action == 'create') {
|
||||
|
||||
$url_button[] = array(
|
||||
'lang' => 'subtotals',
|
||||
'enabled' => (isModEnabled('invoice') && $object->status == Facture::STATUS_DRAFT),
|
||||
'enabled' => (isModEnabled('invoice') && $object->status == Facture::STATUS_DRAFT && getDolGlobalInt('SUBTOTAL_'.strtoupper($object->element))),
|
||||
'perm' => (bool) $usercancreate,
|
||||
'label' => $langs->trans('AddSubtotalLine'),
|
||||
'url' => '/compta/facture/card.php?facid='.$object->id.'&action=add_subtotal_line&token='.newToken()
|
||||
|
||||
@@ -1898,7 +1898,7 @@ if ($step == 5 && $datatoimport) {
|
||||
//dol_syslog("line ".$sourcelinenb.' - '.$nboflines.' - '.$excludefirstline.' - '.$endatlinenb);
|
||||
$arrayrecord = $obj->import_read_record();
|
||||
if ($arrayrecord === false) {
|
||||
$arrayofwarnings[$sourcelinenb][0] = array('lib' => 'File has '.$nboflines.' lines. However we reach the end of file or an empty line at record '.$sourcelinenb.'. This may occurs when some records are split onto several lines and not correctly delimited by the "Char delimiter", or if there is line with no data on all fields.', 'type' => 'EOF_RECORD_ON_SEVERAL_LINES');
|
||||
$arrayofwarnings[$sourcelinenb][0] = array('lib' => $langs->trans('ErrorFileLinesReachEOF', $nboflines, $sourcelinenb), 'type' => 'EOF_RECORD_ON_SEVERAL_LINES');
|
||||
$endoffile++;
|
||||
continue;
|
||||
}
|
||||
@@ -2321,7 +2321,7 @@ if ($step == 6 && $datatoimport) {
|
||||
$sourcelinenb++;
|
||||
$arrayrecord = $obj->import_read_record();
|
||||
if ($arrayrecord === false) {
|
||||
$arrayofwarnings[$sourcelinenb][0] = array('lib' => 'File has '.$nboflines.' lines. However we reach the end of file or an empty line at record '.$sourcelinenb.'. This may occurs when some records are split onto several lines and not correctly delimited by the "Char delimiter", or if there is line with no data on all fields.', 'type' => 'EOF_RECORD_ON_SEVERAL_LINES');
|
||||
$arrayofwarnings[$sourcelinenb][0] = array('lib' => $langs->trans('ErrorFileLinesReachEOF', $nboflines, $sourcelinenb), 'type' => 'EOF_RECORD_ON_SEVERAL_LINES');
|
||||
$endoffile++;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -152,3 +152,4 @@ MandatoryTargetFieldsNotMapped=Some mandatory target fields are not mapped
|
||||
AllTargetMandatoryFieldsAreMapped=All target fields that need a mandatory value are mapped
|
||||
ResultOfSimulationNoError=Result of simulation: No error
|
||||
NumberOfLinesLimited=Number of lines limited
|
||||
ErrorFileLinesReachEOF=File has %s lines. However we reach the end of file or an empty line at record %s. This may occurs when some records are split onto several lines and not correctly delimited by the "Char delimiter", or if there is line with no data on all fields.
|
||||
|
||||
Reference in New Issue
Block a user