forked from Wavyzz/dolibarr
Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0
This commit is contained in:
@@ -50,7 +50,7 @@ RUN echo 'xdebug.idekey="netbeans-xdebug"' >> ${PHP_INI_DIR}/php.ini
|
||||
# set up sendmail config, to use maildev
|
||||
RUN echo "account default" > /etc/msmtprc
|
||||
RUN echo "auth off" >> /etc/msmtprc
|
||||
RUN echo "port 25" >> /etc/msmtprc
|
||||
RUN echo "port 1025" >> /etc/msmtprc
|
||||
RUN echo "host mail" >> /etc/msmtprc
|
||||
RUN echo "from local@localdomain.com" >> /etc/msmtprc
|
||||
RUN echo "domain localhost.localdomain" >> /etc/msmtprc
|
||||
|
||||
@@ -55,8 +55,8 @@ services:
|
||||
mail:
|
||||
image: maildev/maildev
|
||||
ports:
|
||||
- "8081:80"
|
||||
- "25:25"
|
||||
- "8081:1080"
|
||||
- "25:1025"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
|
||||
@@ -1171,6 +1171,10 @@ if (empty($reshook)) {
|
||||
if (!empty($price_ht) || (string) $price_ht === '0') {
|
||||
$pu_ht = price2num($price_ht, 'MU');
|
||||
$pu_ttc = price2num($pu_ht * (1 + ((float) $tmpvat / 100)), 'MU');
|
||||
} elseif (!empty($price_ht_devise) || (string) $price_ht_devise === '0') {
|
||||
$pu_ht_devise = price2num($price_ht_devise, 'MU');
|
||||
$pu_ht = '';
|
||||
$pu_ttc = '';
|
||||
} elseif (!empty($price_ttc) || (string) $price_ttc === '0') {
|
||||
$pu_ttc = price2num($price_ttc, 'MU');
|
||||
$pu_ht = price2num($pu_ttc / (1 + ((float) $tmpvat / 100)), 'MU');
|
||||
|
||||
@@ -2193,6 +2193,10 @@ if (empty($reshook)) {
|
||||
if (!empty($price_ht) || $price_ht === '0') {
|
||||
$pu_ht = price2num($price_ht, 'MU');
|
||||
$pu_ttc = price2num($pu_ht * (1 + ($tmpvat / 100)), 'MU');
|
||||
} elseif (!empty($price_ht_devise) || $price_ht_devise === '0') {
|
||||
$pu_ht_devise = price2num($price_ht_devise, 'MU');
|
||||
$pu_ht = '';
|
||||
$pu_ttc = '';
|
||||
} elseif (!empty($price_ttc) || $price_ttc === '0') {
|
||||
$pu_ttc = price2num($price_ttc, 'MU');
|
||||
$pu_ht = price2num($pu_ttc / (1 + ($tmpvat / 100)), 'MU');
|
||||
@@ -2284,8 +2288,10 @@ if (empty($reshook)) {
|
||||
$type = $prod->type;
|
||||
$fk_unit = $prod->fk_unit;
|
||||
} else {
|
||||
$pu_ht = price2num($price_ht, 'MU');
|
||||
$pu_ttc = price2num($price_ttc, 'MU');
|
||||
if (!empty($price_ht)) $pu_ht = price2num($price_ht, 'MU');
|
||||
else $pu_ht = '';
|
||||
if (!empty($price_ttc)) $pu_ttc = price2num($price_ttc, 'MU');
|
||||
else $pu_ttc = '';
|
||||
$tva_npr = (preg_match('/\*/', $tva_tx) ? 1 : 0);
|
||||
$tva_tx = str_replace('*', '', $tva_tx);
|
||||
if (empty($tva_tx)) {
|
||||
@@ -2311,8 +2317,8 @@ if (empty($reshook)) {
|
||||
$localtax1_tx = get_localtax($tva_tx, 1, $object->thirdparty, $mysoc, $tva_npr);
|
||||
$localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty, $mysoc, $tva_npr);
|
||||
|
||||
$pu_ht_devise = price2num(GETPOST('multicurrency_subprice'), '', 2);
|
||||
$pu_ttc_devise = price2num(GETPOST('multicurrency_subprice_ttc'), '', 2);
|
||||
$pu_ht_devise = price2num($price_ht_devise, '', 2);
|
||||
$pu_ttc_devise = price2num($price_ttc_devise, '', 2);
|
||||
|
||||
// Prepare a price equivalent for minimum price check
|
||||
$pu_equivalent = $pu_ht;
|
||||
|
||||
@@ -1722,7 +1722,7 @@ if (empty($reshook)) {
|
||||
$pu_ht = price2num($pu_ttc / (1 + ($tva_tx / 100)), 'MU'); // $pu_ht must be rounded according to settings
|
||||
}
|
||||
$price_base_type = 'HT';
|
||||
$pu_devise = price2num($price_devise, 'CU');
|
||||
$pu_devise = price2num($price_ht_devise, 'CU');
|
||||
|
||||
$result = $object->addline($product_desc, $pu_ht, $tva_tx, $localtax1_tx, $localtax2_tx, $qty, 0, $remise_percent, $date_start, $date_end, 0, $tva_npr, $price_base_type, $type, -1, 0, $array_options, $fk_unit, 0, $pu_devise, $ref_supplier);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user