mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Debug bad params
This commit is contained in:
parent
cb13069fa1
commit
6df4795ded
|
|
@ -1046,7 +1046,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
|
||||
// Website
|
||||
print '<tr><td>'.$form->editfieldkey('Web', 'member_url', GETPOST('member_url', 'alpha'), $object, 0).'</td>';
|
||||
print '<td>'.img_picto('', 'globe').' <input type="text" class="maxwidth500 widthcentpercentminusx" name="member_url" id="member_url" value="'.(GETPOSTISSET('member_url', 'alpha') ? GETPOST('member_url', 'alpha') : $object->url).'"></td></tr>';
|
||||
print '<td>'.img_picto('', 'globe').' <input type="text" class="maxwidth500 widthcentpercentminusx" name="member_url" id="member_url" value="'.(GETPOSTISSET('member_url') ? GETPOST('member_url', 'alpha') : $object->url).'"></td></tr>';
|
||||
|
||||
// Address
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Address").'</td><td>';
|
||||
|
|
|
|||
|
|
@ -1075,7 +1075,7 @@ if ($mode == 'marketplace') {
|
|||
<div id="listing-content">
|
||||
<table summary="list_of_modules" id="list_of_modules" class="productlist centpercent">
|
||||
<tbody id="listOfModules">
|
||||
<?php echo $dolistore->get_products(!empty($categorie) ? $categorie: ''); ?>
|
||||
<?php echo $dolistore->get_products(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -362,7 +362,7 @@ if (empty($reshook)) {
|
|||
if (!$error) {
|
||||
$contactid = GETPOST("contactid", 'int');
|
||||
$object->fetch($contactid);
|
||||
$object->fetchRoles($contactid);
|
||||
$object->fetchRoles();
|
||||
|
||||
// Photo save
|
||||
$dir = $conf->societe->multidir_output[$object->entity]."/contact/".$object->id."/photos";
|
||||
|
|
|
|||
|
|
@ -419,7 +419,7 @@ class DiscountAbsolute
|
|||
* When discount is from a credit note used to reduce payment of an invoice, we link using rowidinvoice
|
||||
*
|
||||
* @param int $rowidline Invoice line id (To use discount into invoice lines)
|
||||
* @param int $rowidinvoice Invoice id (To use discount as a credit note to reduc payment of invoice)
|
||||
* @param int $rowidinvoice Invoice id (To use discount as a credit note to reduce payment of invoice)
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function link_to_invoice($rowidline, $rowidinvoice)
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class DolGeoIP
|
|||
{
|
||||
global $conf;
|
||||
|
||||
$geoipversion = '2'; // 'php', or '2'
|
||||
$geoipversion = '2'; // 'php', or geoip version '2'
|
||||
if (!empty($conf->global->GEOIP_VERSION)) {
|
||||
$geoipversion = $conf->global->GEOIP_VERSION;
|
||||
}
|
||||
|
|
@ -181,7 +181,7 @@ class DolGeoIP
|
|||
return '';
|
||||
}
|
||||
} else {
|
||||
return geoip_country_code_by_name($this->gi, $name);
|
||||
return strtolower(geoip_country_code_by_name($name));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -180,6 +180,8 @@ class FileUpload
|
|||
)
|
||||
);
|
||||
|
||||
global $action;
|
||||
|
||||
$hookmanager->executeHooks(
|
||||
'overrideUploadOptions',
|
||||
array(
|
||||
|
|
@ -187,8 +189,7 @@ class FileUpload
|
|||
'element' => $element
|
||||
),
|
||||
$object,
|
||||
$action,
|
||||
$hookmanager
|
||||
$action
|
||||
);
|
||||
|
||||
if ($options) {
|
||||
|
|
|
|||
|
|
@ -2061,7 +2061,7 @@ function get_left_menu_products($mainmenu, &$newmenu, $usemenuhider = 1, $leftme
|
|||
if (isModEnabled('supplier_order')) {
|
||||
$newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->hasRight('stock', 'mouvement', 'creer') && $user->hasRight('fournisseur', 'lire'));
|
||||
}
|
||||
$newmenu->add("/product/stock/stockatdate.php", $langs->trans("StockAtDate"), 1, $user->hasRight('product', 'read', '', 1) && $user->hasRight('stock', 'lire'));
|
||||
$newmenu->add("/product/stock/stockatdate.php", $langs->trans("StockAtDate"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire'));
|
||||
|
||||
// Categories for warehouses
|
||||
if (isModEnabled('categorie')) {
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domai
|
|||
$action = GETPOST('action', 'aZ09');
|
||||
$backtourl = GETPOST('backtourl', 'alpha');
|
||||
$keyforprovider = GETPOST('keyforprovider', 'aZ09');
|
||||
if (!GETPOSTISSET('keyforprovider', 'aZ09') && !empty($_SESSION["oauthkeyforproviderbeforeoauthjump"]) && (GETPOST('code') || $action == 'delete')) {
|
||||
if (!GETPOSTISSET('keyforprovider') && !empty($_SESSION["oauthkeyforproviderbeforeoauthjump"]) && (GETPOST('code') || $action == 'delete')) {
|
||||
// If we are coming from the Oauth page
|
||||
$keyforprovider = $_SESSION["oauthkeyforproviderbeforeoauthjump"];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ if (!empty($array_query['cust_prospect_status'])) {
|
|||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||
}
|
||||
print '</td><td>';
|
||||
print $formadvtargetemaling->multiselectProspectionStatus($array_query['cust_prospect_status'], 'cust_prospect_status', 1);
|
||||
print $formadvtargetemaling->multiselectProspectionStatus($array_query['cust_prospect_status'], 'cust_prospect_status');
|
||||
print '</td><td>'."\n";
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ if ($resql) {
|
|||
// Expected to pay
|
||||
print '<td class="right">'.price($objp->d_amount).'</td>';
|
||||
// Status
|
||||
print '<td class="center">'.$don->getLibStatut(4, $objp->amount).'</td>';
|
||||
print '<td class="center">'.$don->getLibStatut(4).'</td>';
|
||||
// Amount paid
|
||||
print '<td class="right">'.price($objp->amount).'</td>';
|
||||
print "</tr>\n";
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ print load_fiche_titre($langs->trans("ECMArea").' - '.$langs->trans("Search"));
|
|||
print $langs->trans("FeatureNotYetAvailable").'.<br><br>';
|
||||
|
||||
// Tool bar
|
||||
$head = ecm_prepare_head_fm($ecmdir, $module, $section);
|
||||
$head = ecm_prepare_head_fm($ecmdir);
|
||||
//print dol_get_fiche_head($head, 'search_form', '', 1);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
|
||||
if (!$error && empty($conf->global->EXPENSEREPORT_ALLOW_OVERLAPPING_PERIODS)) {
|
||||
$overlappingExpenseReportID = $object->periode_existe($fuser, $object->date_debut, $object->date_fin, true);
|
||||
$overlappingExpenseReportID = $object->periode_existe($fuser, $object->date_debut, $object->date_fin);
|
||||
|
||||
if ($overlappingExpenseReportID > 0) {
|
||||
$error++;
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ if ($resql) {
|
|||
print '<td class="right">'.price($objp->total_ttc - $objp->amount).'</td>';
|
||||
|
||||
// Status
|
||||
print '<td class="center">'.$expensereport->getLibStatut(4, $objp->amount).'</td>';
|
||||
print '<td class="center">'.$expensereport->getLibStatut(4).'</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ class FichinterRec extends Fichinter
|
|||
$fichintsrc = new Fichinter($this->db);
|
||||
|
||||
$result = $fichintsrc->fetch($this->id_origin);
|
||||
$result = $fichintsrc->fetch_lines(1); // to get all lines
|
||||
$result = $fichintsrc->fetch_lines(); // to get all lines
|
||||
|
||||
|
||||
if ($result > 0) {
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ if ($idprod > 0) {
|
|||
$label .= ' ('.$productSupplier->fourn_ref.')';
|
||||
}
|
||||
|
||||
$prices[] = array("id" => $productSupplier->product_fourn_price_id, "price" => price2num($price, 0, '', 0), "label" => $label, "title" => $title); // For price field, we must use price2num(), for label or title, price()
|
||||
$prices[] = array("id" => $productSupplier->product_fourn_price_id, "price" => price2num($price, '', 0), "label" => $label, "title" => $title); // For price field, we must use price2num(), for label or title, price()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1383,7 +1383,7 @@ class FactureFournisseur extends CommonInvoice
|
|||
$result = $this->update_price(1);
|
||||
if ($result > 0) {
|
||||
// Create link between discount and invoice line
|
||||
$result = $remise->link_to_invoice($lineid, 0, 'supplier');
|
||||
$result = $remise->link_to_invoice($lineid, 0);
|
||||
if ($result < 0) {
|
||||
$this->error = $remise->error;
|
||||
$this->db->rollback();
|
||||
|
|
|
|||
|
|
@ -1172,7 +1172,28 @@ if (empty($reshook)) {
|
|||
if (!empty($conf->global->MAIN_DEPOSIT_MULTI_TVA) && $diff != 0) {
|
||||
$object->fetch_lines();
|
||||
$subprice_diff = $object->lines[0]->subprice - $diff / (1 + $object->lines[0]->tva_tx / 100);
|
||||
$object->updateline($object->lines[0]->id, $object->lines[0]->desc, $subprice_diff, $object->lines[0]->qty, $object->lines[0]->remise_percent, $object->lines[0]->date_start, $object->lines[0]->date_end, $object->lines[0]->tva_tx, 0, 0, 'HT', $object->lines[0]->info_bits, $object->lines[0]->product_type, 0, 0, 0, $object->lines[0]->pa_ht, $object->lines[0]->label, 0, array(), 100);
|
||||
$object->updateline(
|
||||
$object->lines[0]->id,
|
||||
$object->lines[0]->desc,
|
||||
$subprice_diff,
|
||||
$object->lines[0]->tva_tx,
|
||||
$object->lines[0]->localtax1_tx,
|
||||
$object->lines[0]->localtax2_tx,
|
||||
$object->lines[0]->qty,
|
||||
$object->lines[0]->fk_product,
|
||||
'HT',
|
||||
$object->lines[0]->info_bits,
|
||||
$object->lines[0]->product_type,
|
||||
$object->lines[0]->remise_percent,
|
||||
0,
|
||||
$object->lines[0]->date_start,
|
||||
$object->lines[0]->date_end,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
'',
|
||||
100
|
||||
);
|
||||
}
|
||||
} elseif ($result > 0) {
|
||||
$lines = $srcobject->lines;
|
||||
|
|
|
|||
|
|
@ -109,7 +109,8 @@ $text = $langs->trans("Margins");
|
|||
//print load_fiche_titre($text);
|
||||
|
||||
// Show tabs
|
||||
$head = marges_prepare_head($user);
|
||||
$head = marges_prepare_head();
|
||||
|
||||
$titre = $langs->trans("Margins");
|
||||
$picto = 'margin';
|
||||
|
||||
|
|
|
|||
|
|
@ -176,7 +176,8 @@ if ($optioncss != '') {
|
|||
}
|
||||
|
||||
// Show tabs
|
||||
$head = marges_prepare_head($user);
|
||||
$head = marges_prepare_head();
|
||||
|
||||
$picto = 'margin';
|
||||
|
||||
print '<form method="post" name="sel" action="'.$_SERVER['PHP_SELF'].'">';
|
||||
|
|
|
|||
|
|
@ -89,7 +89,8 @@ $text = $langs->trans("Margins");
|
|||
//print load_fiche_titre($text);
|
||||
|
||||
// Show tabs
|
||||
$head = marges_prepare_head($user);
|
||||
$head = marges_prepare_head();
|
||||
|
||||
$titre = $langs->trans("Margins");
|
||||
$picto = 'margin';
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,8 @@ $text = $langs->trans("Margins");
|
|||
//print load_fiche_titre($text);
|
||||
|
||||
// Show tabs
|
||||
$head = marges_prepare_head($user);
|
||||
$head = marges_prepare_head();
|
||||
|
||||
$titre = $langs->trans("Margins");
|
||||
$picto = 'margin';
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ if (GETPOST('theme', 'aZ09')) {
|
|||
if (GETPOST('lang', 'aZ09')) {
|
||||
$langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL
|
||||
}
|
||||
if (GETPOSTISSET('THEME_DARKMODEENABLED', 'int')) {
|
||||
if (GETPOSTISSET('THEME_DARKMODEENABLED')) {
|
||||
$conf->global->THEME_DARKMODEENABLED = GETPOST('THEME_DARKMODEENABLED', 'int'); // If darkmode was forced on URL
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,4 +79,5 @@ exclude:
|
|||
- name: PhpArrayIndexImmediatelyRewrittenInspection
|
||||
- name: PhpParameterNameChangedDuringInheritanceInspection
|
||||
- name: PhpDuplicateSwitchCaseBodyInspection
|
||||
|
||||
- name: PhpNestedDirNameCallsCanBeReplacedWithLevelParameterInspection
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user