mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0
This commit is contained in:
commit
3f9b2d9d57
|
|
@ -2343,7 +2343,7 @@ while ($i < $imaxinloop) {
|
|||
if (empty($typenArray)) {
|
||||
$typenArray = $formcompany->typent_array(1);
|
||||
}
|
||||
print $typenArray[$obj->typent_code];
|
||||
print $typenArray[$obj->typent_code]??'';
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
|
|
@ -2594,6 +2594,11 @@ while ($i < $imaxinloop) {
|
|||
if (!$i) {
|
||||
$totalarray['pos'][$totalarray['nbfield']] = 'total_margin';
|
||||
}
|
||||
|
||||
if (!isset($totalarray['val']['total_margin'])) {
|
||||
$totalarray['val']['total_margin'] = 0;
|
||||
}
|
||||
|
||||
$totalarray['val']['total_margin'] += $marginInfo['total_margin'];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -684,12 +684,14 @@ if (empty($reshook)) {
|
|||
$info_bits |= 0x01;
|
||||
}
|
||||
|
||||
$fk_parent_line = GETPOST('fk_parent_line', 'int');
|
||||
|
||||
if ($usercanproductignorepricemin && (!empty($price_min) && (price2num($pu_ht) * (1 - price2num($remise_percent) / 100) < price2num($price_min)))) {
|
||||
$mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency));
|
||||
setEventMessages($mesg, null, 'errors');
|
||||
} else {
|
||||
// Insert line
|
||||
$result = $object->addline($desc, $pu_ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $price_base_type, $info_bits, '', $pu_ttc, $type, -1, $special_code, $label, $fk_unit, 0, $date_start_fill, $date_end_fill, $fournprice, $buyingprice);
|
||||
$result = $object->addline($desc, $pu_ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $price_base_type, $info_bits, '', $pu_ttc, $type, -1, $special_code, $label, $fk_unit, 0, $date_start_fill, $date_end_fill, $fournprice, $buyingprice, $fk_parent_line);
|
||||
|
||||
if ($result > 0) {
|
||||
// Define output language and generate document
|
||||
|
|
@ -875,6 +877,7 @@ if (empty($reshook)) {
|
|||
|
||||
$date_start_fill = GETPOSTINT('date_start_fill');
|
||||
$date_end_fill = GETPOSTINT('date_end_fill');
|
||||
$fk_parent_line = GETPOST('fk_parent_line', 'int');
|
||||
|
||||
// Update line
|
||||
if (!$error) {
|
||||
|
|
@ -902,7 +905,8 @@ if (empty($reshook)) {
|
|||
$date_start_fill,
|
||||
$date_end_fill,
|
||||
$fournprice,
|
||||
$buyingprice
|
||||
$buyingprice,
|
||||
$fk_parent_line
|
||||
);
|
||||
|
||||
if ($result >= 0) {
|
||||
|
|
@ -1252,7 +1256,7 @@ if ($action == 'create') {
|
|||
}
|
||||
|
||||
// Call Hook formConfirm
|
||||
$parameters = array('formConfirm' => $formconfirm);
|
||||
$parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid);
|
||||
$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook)) {
|
||||
$formconfirm .= $hookmanager->resPrint;
|
||||
|
|
|
|||
|
|
@ -8346,7 +8346,7 @@ class Form
|
|||
|
||||
$oldValueForShowOnCombobox = 0;
|
||||
foreach ($objecttmp->fields as $fieldK => $fielV) {
|
||||
if (empty($fielV['showoncombobox']) || empty($objecttmp->$fieldK)) {
|
||||
if (!array_key_exists('showoncombobox', $fielV) || !$fielV['showoncombobox'] || empty($objecttmp->$fieldK)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,13 @@ class InterfaceWebhookTriggers extends DolibarrTriggers
|
|||
|
||||
$jsonstr = json_encode($resobject);
|
||||
|
||||
$response = getURLContent($tmpobject->url, 'POST', $jsonstr, 1, array('content-type:application/json'), array('http', 'https'), 2, -1);
|
||||
$headers = array(
|
||||
'Content-Type: application/json'
|
||||
//'Accept: application/json'
|
||||
);
|
||||
|
||||
$response = getURLContent($tmpobject->url, 'POST', $jsonstr, 1, $headers, array('http', 'https'), 2, -1);
|
||||
|
||||
if (empty($response['curl_error_no']) && $response['http_code'] >= 200 && $response['http_code'] < 300) {
|
||||
$nbPosts++;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user