Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
c8167567ca
24 changed files with 120 additions and 58 deletions
|
|
@ -742,7 +742,7 @@ if ($resql) {
|
|||
// Active
|
||||
print '<td class="center" class="nowrap">';
|
||||
if ($canbedisabled) {
|
||||
print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>';
|
||||
print '<a class="reposition" href="'.$url.'action='.$acts[$obj->active].'&token='.newToken().'">'.$actl[$obj->active].'</a>';
|
||||
} else {
|
||||
print $langs->trans("AlwaysActive");
|
||||
}
|
||||
|
|
@ -796,12 +796,8 @@ $db->close();
|
|||
*/
|
||||
function fieldListAccountingReport($fieldlist, $obj = null, $tabname = '', $context = '')
|
||||
{
|
||||
global $db;
|
||||
global $form, $mysoc;
|
||||
|
||||
$formadmin = new FormAdmin($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
|
||||
foreach ($fieldlist as $field => $value) {
|
||||
if ($fieldlist[$field] == 'country') {
|
||||
print '<td>';
|
||||
|
|
|
|||
|
|
@ -1836,6 +1836,13 @@ class Adherent extends CommonObject
|
|||
}
|
||||
}
|
||||
$invoice->socid = $this->fk_soc;
|
||||
// set customer's bank account on the invoice
|
||||
if (!empty($customer->fk_account)) {
|
||||
$invoice->fk_account = $customer->fk_account;
|
||||
} elseif (getDolGlobalString('FACTURE_RIB_NUMBER')) {
|
||||
// set default bank account from invoice module settings
|
||||
$invoice->fk_account = (int) getDolGlobalString('FACTURE_RIB_NUMBER');
|
||||
}
|
||||
//$invoice->date = $datesubscription;
|
||||
$invoice->date = dol_now();
|
||||
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ if (!getDolGlobalString('MAIN_SUBMODULE_DELIVERY')) {
|
|||
print ' <a class="inline-block valignmiddle" href="'.$_SERVER["PHP_SELF"].'?action=disable_delivery&token='.newToken().'">'.img_picto($langs->trans("Enabled"), 'switch_on').'</a>';
|
||||
}
|
||||
|
||||
print '<br><span class="opacitymedium">'.info_admin($langs->trans("NoNeedForDeliveryReceipts"), 0, 1).'</span>';
|
||||
print '<br>';
|
||||
print '<br><br><span class="opacitymedium">'.info_admin($langs->trans("NoNeedForDeliveryReceipts"), 0, 1).'</span>';
|
||||
print '<br><br>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ $arrayfields = array(
|
|||
'c.multicurrency_total_ht' => array('label' => 'MulticurrencyAmountHT', 'checked' => 0, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1), 'position' => 100),
|
||||
'c.multicurrency_total_vat' => array('label' => 'MulticurrencyAmountVAT', 'checked' => 0, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1), 'position' => 105),
|
||||
'c.multicurrency_total_ttc' => array('label' => 'MulticurrencyAmountTTC', 'checked' => 0, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1), 'position' => 110),
|
||||
'u.login' => array('label' => "Author", 'checked' => 1, 'position' => 115),
|
||||
'u.login' => array('label' => "Author", 'checked' => -1, 'position' => 115),
|
||||
'sale_representative' => array('label' => "SaleRepresentativesOfThirdParty", 'checked' => 0, 'position' => 116),
|
||||
'total_pa' => array('label' => (getDolGlobalString('MARGIN_TYPE') == '1' ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (!isModEnabled('margin') || !$user->hasRight("margins", "liretous") ? 0 : 1)),
|
||||
'total_margin' => array('label' => 'Margin', 'checked' => 0, 'position' => 301, 'enabled' => (!isModEnabled('margin') || !$user->hasRight("margins", "liretous") ? 0 : 1)),
|
||||
|
|
@ -2569,7 +2569,7 @@ while ($i < $imaxinloop) {
|
|||
|
||||
// Author
|
||||
if (!empty($arrayfields['u.login']['checked'])) {
|
||||
print '<td class="tdoverflowmax150">';
|
||||
print '<td class="tdoverflowmax125">';
|
||||
if ($userstatic->id) {
|
||||
print $userstatic->getNomUrl(-1);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -344,7 +344,7 @@ if ($num == 1 && getDolGlobalString('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $s
|
|||
// Output page
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'classforhorizontalscrolloftabs');
|
||||
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'bodyforlist');
|
||||
|
||||
$arrayofselected = is_array($toselect) ? $toselect : array();
|
||||
|
||||
|
|
@ -497,7 +497,7 @@ foreach ($object->fields as $key => $val) {
|
|||
$formadmin = new FormAdmin($db);
|
||||
print $formadmin->select_language((isset($search[$key]) ? $search[$key] : ''), 'search_lang', 0, array(), 1, 0, 0, 'minwidth100imp maxwidth125', 2);
|
||||
} else {
|
||||
print '<input type="text" class="flat maxwidth'.($val['type'] == 'integer' ? '50' : '75').'" name="search_'.$key.'" value="'.dol_escape_htmltag(isset($search[$key]) ? $search[$key] : '').'">';
|
||||
print '<input type="text" class="flat maxwidth'.(in_array($val['type'], array('integer', 'price')) ? '50' : '75').'" name="search_'.$key.'" value="'.dol_escape_htmltag(isset($search[$key]) ? $search[$key] : '').'">';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ class CashControl extends CommonObject
|
|||
'entity' => array('type' => 'integer', 'label' => 'Entity', 'enabled' => 1, 'visible' => 0, 'notnull' => 1, 'position' => 15),
|
||||
'ref' => array('type' => 'varchar(64)', 'label' => 'Ref', 'enabled' => 1, 'visible' => 1, 'notnull' => 1, 'position' => 18),
|
||||
'posmodule' => array('type' => 'varchar(30)', 'label' => 'Module', 'enabled' => 1, 'visible' => 1, 'notnull' => 1, 'position' => 19),
|
||||
'posnumber' => array('type' => 'varchar(30)', 'label' => 'Terminal', 'enabled' => 1, 'visible' => 1, 'notnull' => 1, 'position' => 20, 'css' => 'center'),
|
||||
'posnumber' => array('type' => 'varchar(30)', 'label' => 'Terminal', 'enabled' => 1, 'visible' => 1, 'notnull' => 1, 'position' => 20, 'csslist' => 'width50 center'),
|
||||
'label' => array('type' => 'varchar(255)', 'label' => 'Label', 'enabled' => 1, 'visible' => 0, 'position' => 24),
|
||||
'opening' => array('type' => 'price', 'label' => 'Opening', 'enabled' => 1, 'visible' => 1, 'position' => 25, 'csslist' => 'amount'),
|
||||
'cash' => array('type' => 'price', 'label' => 'Cash', 'enabled' => 1, 'visible' => 1, 'position' => 30, 'csslist' => 'amount'),
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php';
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php';
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2012-2014 Raphaël Dourseanud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2014-2106 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
<?php
|
||||
/* Copyright (C) 2002-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2012-2014 Raphaël Dourseanud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2014-2106 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2020 Maxime DEMAREST <maxime@indelog.fr>
|
||||
* Copyright (C) 2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2024 Yoan Mollard <ymollard@users.noreply.github.com>
|
||||
/* Copyright (C) 2002-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2014-2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2020 Maxime DEMAREST <maxime@indelog.fr>
|
||||
* Copyright (C) 2021-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024 Yoan Mollard <ymollard@users.noreply.github.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
|
||||
|
|
@ -44,6 +44,14 @@ require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
|
|||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancycategory.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('compta', 'bills', 'donation', 'salaries', 'accountancy', 'loan'));
|
||||
|
||||
|
|
@ -55,6 +63,8 @@ $date_endday = GETPOSTINT('date_endday');
|
|||
$date_endyear = GETPOSTINT('date_endyear');
|
||||
$showaccountdetail = GETPOST('showaccountdetail', 'aZ09') ? GETPOST('showaccountdetail', 'aZ09') : 'yes';
|
||||
|
||||
$search_project_ref = GETPOST('search_project_ref', 'alpha');
|
||||
|
||||
$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
|
||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||
|
|
@ -139,7 +149,8 @@ $nbofyear = ($year_end - $year_start) + 1;
|
|||
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES' or 'BOOKKEEPING')
|
||||
$modecompta = getDolGlobalString('ACCOUNTING_MODE');
|
||||
if (isModEnabled('accounting')) {
|
||||
$modecompta = 'BOOKKEEPING';
|
||||
// $modecompta = 'BOOKKEEPING';
|
||||
$modecompta = 'CREANCES-DETTES';
|
||||
}
|
||||
if (GETPOST("modecompta", 'alpha')) {
|
||||
$modecompta = GETPOST("modecompta", 'alpha');
|
||||
|
|
@ -175,7 +186,11 @@ $exportlink = '';
|
|||
$total_ht = 0;
|
||||
$total_ttc = 0;
|
||||
|
||||
// Affiche en-tete de rapport
|
||||
$name = $langs->trans("ReportInOut").', '.$langs->trans("ByProjects");
|
||||
$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0);
|
||||
$builddate = dol_now();
|
||||
|
||||
// Display report header
|
||||
if ($modecompta == "CREANCES-DETTES") {
|
||||
$name = $langs->trans("ReportInOut").', '.$langs->trans("ByProjects");
|
||||
$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0);
|
||||
|
|
@ -200,10 +215,12 @@ if ($modecompta == "CREANCES-DETTES") {
|
|||
|
||||
// Define $calcmode line
|
||||
$calcmode = '';
|
||||
/*
|
||||
if (isModEnabled('accounting')) {
|
||||
$calcmode .= '<input type="radio" name="modecompta" id="modecompta3" value="BOOKKEEPING"'.($modecompta == 'BOOKKEEPING' ? ' checked="checked"' : '').'><label for="modecompta3"> '.$langs->trans("CalcModeBookkeeping").'</label>';
|
||||
$calcmode .= '<br>';
|
||||
}
|
||||
*/
|
||||
$calcmode .= '<input type="radio" name="modecompta" id="modecompta1" value="RECETTES-DEPENSES"'.($modecompta == 'RECETTES-DEPENSES' ? ' checked="checked"' : '').'><label for="modecompta1"> '.$langs->trans("CalcModePayment");
|
||||
if (isModEnabled('accounting')) {
|
||||
$calcmode .= ' <span class="opacitymedium hideonsmartphone">('.$langs->trans("CalcModeNoBookKeeping").')</span>';
|
||||
|
|
@ -270,19 +287,21 @@ print "</tr>\n";
|
|||
$total_ht_outcome = $total_ttc_outcome = $total_ht_income = $total_ttc_income = 0;
|
||||
|
||||
if ($modecompta == 'BOOKKEEPING') {
|
||||
echo "<p>BOOKKEEPING mode not implemented for this report type by project. Contribute to Dolibarr source code :)</p>";
|
||||
echo "<p>BOOKKEEPING mode not implemented for this report type by project.</p>";
|
||||
} else {
|
||||
/*
|
||||
* Customer invoices
|
||||
*/
|
||||
print '<tr class="trforbreak"><td colspan="4">'.$langs->trans("CustomersInvoices").'</td></tr>';
|
||||
|
||||
$sql = '';
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
$sql = "SELECT p.rowid as rowid, p.ref as project_name, sum(f.total_ht) as amount_ht, sum(f.total_ttc) as amount_ttc";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON f.fk_projet = p.rowid";
|
||||
$sql .= " WHERE f.fk_soc = s.rowid";
|
||||
$sql .= " AND f.entity IN (".getEntity('invoice').")";
|
||||
$sql .= " AND f.fk_statut IN (1,2)";
|
||||
if (getDolGlobalString('FACTURE_DEPOSITS_ARE_JUST_PAYMENTS')) {
|
||||
$sql .= " AND f.type IN (0,1,2,5)";
|
||||
|
|
@ -292,6 +311,11 @@ if ($modecompta == 'BOOKKEEPING') {
|
|||
if (!empty($date_start) && !empty($date_end)) {
|
||||
$sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'";
|
||||
}
|
||||
if ($socid) {
|
||||
$sql .= " AND f.fk_soc = ".((int) $socid);
|
||||
}
|
||||
$sql .= " GROUP BY p.rowid, project_name";
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
} elseif ($modecompta == 'RECETTES-DEPENSES') {
|
||||
$sql = "SELECT p.rowid as rowid, p.ref as project_name, sum(pf.amount) as amount_ttc";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
|
|
@ -302,16 +326,16 @@ if ($modecompta == 'BOOKKEEPING') {
|
|||
$sql .= " WHERE pa.rowid = pf.fk_paiement";
|
||||
$sql .= " AND pf.fk_facture = f.rowid";
|
||||
$sql .= " AND f.fk_soc = s.rowid";
|
||||
$sql .= " AND f.entity IN (".getEntity('invoice').")";
|
||||
if (!empty($date_start) && !empty($date_end)) {
|
||||
$sql .= " AND pa.datep >= '".$db->idate($date_start)."' AND pa.datep <= '".$db->idate($date_end)."'";
|
||||
}
|
||||
if ($socid) {
|
||||
$sql .= " AND f.fk_soc = ".((int) $socid);
|
||||
}
|
||||
$sql .= " GROUP BY p.rowid, project_name";
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
}
|
||||
$sql .= " AND f.entity IN (".getEntity('invoice').")";
|
||||
if ($socid) {
|
||||
$sql .= " AND f.fk_soc = ".((int) $socid);
|
||||
}
|
||||
$sql .= " GROUP BY p.rowid, project_name";
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
|
||||
dol_syslog("by project, get customer invoices", LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
|
|
@ -328,7 +352,8 @@ if ($modecompta == 'BOOKKEEPING') {
|
|||
} else {
|
||||
echo $langs->trans("None");
|
||||
}
|
||||
$detailed_list_url = '?search_project_ref='.urlencode($search_project_ref);
|
||||
$detailed_list_url = '';
|
||||
//$detailed_list_url .= '?search_project_ref='.urlencode($search_project_ref);
|
||||
$detailed_list_url .= empty($objp->project_name)? "!*": $objp->project_name;
|
||||
$detailed_list_url .= $search_date_url;
|
||||
echo ' (<a href="'.DOL_URL_ROOT.'/compta/facture/list.php'.$detailed_list_url.'">'.$langs->trans("DetailedListLowercase")."</a>)\n";
|
||||
|
|
@ -340,7 +365,7 @@ if ($modecompta == 'BOOKKEEPING') {
|
|||
echo "</td>\n";
|
||||
echo '<td class="right"><span class="amount">'.price($objp->amount_ttc)."</span></td>\n";
|
||||
|
||||
$total_ht += (isset($objp->amount_ht) ? $objp->amount_ht : 0);
|
||||
$total_ht += ($objp->amount_ht ?? 0);
|
||||
$total_ttc += $objp->amount_ttc;
|
||||
echo "</tr>\n";
|
||||
$i++;
|
||||
|
|
@ -525,7 +550,8 @@ if ($modecompta == 'BOOKKEEPING') {
|
|||
} else {
|
||||
echo $langs->trans("None");
|
||||
}
|
||||
$detailed_list_url = '?search_project='.urlencode($search_project_ref);
|
||||
$detailed_list_url = '';
|
||||
//$detailed_list_url .= '?search_project='.urlencode($search_project_ref);
|
||||
$detailed_list_url .= empty($objp->project_name)? "!*": $objp->project_name;
|
||||
$detailed_list_url .= $search_date_url;
|
||||
echo ' (<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php'.$detailed_list_url.'">'.$langs->trans("DetailedListLowercase")."</a>)\n";
|
||||
|
|
@ -639,7 +665,13 @@ if ($modecompta == 'BOOKKEEPING') {
|
|||
$subtotal_ttc += $obj->amount;
|
||||
|
||||
echo '<tr class="oddeven"><td> </td>';
|
||||
echo "<td>".$langs->trans("Project")." <a href=\"".DOL_URL_ROOT."/projet/card.php?id=".urlencode($project_name)."\">".$project_name."</a></td>\n";
|
||||
echo "<td>".$langs->trans("Project")." ";
|
||||
if (!empty($objp->project_name)) {
|
||||
echo ' <a href="'.DOL_URL_ROOT.'/projet/card.php?id='.$objp->rowid.'">'.$objp->project_name.'</a>';
|
||||
} else {
|
||||
echo $langs->trans("None");
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo '<td class="right">';
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
echo '<span class="amount">'.price(-$obj->amount).'</span>';
|
||||
|
|
|
|||
|
|
@ -341,14 +341,25 @@ abstract class CommonObjectLine extends CommonObject
|
|||
*/
|
||||
public function getNomUrl($withpicto = 0)
|
||||
{
|
||||
$parentattribute = $this->fk_parent_attribute;
|
||||
|
||||
/*
|
||||
if ($parentattribute) {
|
||||
return 'Parent #'.$this->$parentattribute.' - Line #'.$this->id;
|
||||
} else {
|
||||
return 'Line #'.$this->id;
|
||||
}
|
||||
*/
|
||||
|
||||
$parent_element_properties = getElementProperties($this->parent_element);
|
||||
$parent_classname = $parent_element_properties['classname'];
|
||||
$parent_element = new $parent_classname($this->db);
|
||||
/** @var CommonObject $parent_element */
|
||||
$parentattribute = $this->fk_parent_attribute;
|
||||
if ($parentattribute) {
|
||||
$parent_element->fetch($this->$parentattribute);
|
||||
if ($parentattribute && method_exists($parent_element, 'fetch')) {
|
||||
$parent_element->fetch($this->$parentattribute); // @phan-suppress-current-line PhanPluginUnknownObjectMethodCall
|
||||
}
|
||||
|
||||
return $parent_element->getNomUrl($withpicto).' - Line #'.$this->id;
|
||||
return $parent_element->getNomUrl($withpicto).' - Line #'.$this->id; // @phan-suppress-current-line PhanPluginUnknownObjectMethodCall
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -778,7 +778,7 @@ class DiscountAbsolute extends CommonObject
|
|||
* @param string $option Where to link to ('invoice' or 'discount')
|
||||
* @return string String with URL
|
||||
*/
|
||||
public function getNomUrl($withpicto, $option = 'invoice')
|
||||
public function getNomUrl($withpicto = 0, $option = 'invoice')
|
||||
{
|
||||
global $langs;
|
||||
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ $listofexamplesforlink = 'Societe:societe/class/societe.class.php<br>Contact:con
|
|||
<!-- Label -->
|
||||
<tr><td class="titlefieldcreate fieldrequired"><?php echo $langs->trans("LabelOrTranslationKey"); ?></td><td class="valeur"><input type="text" name="label" id="label" class="width200" value="<?php echo GETPOST('label', 'alpha'); ?>" autofocus></td></tr>
|
||||
<!-- Code -->
|
||||
<tr><td class="fieldrequired"><?php echo $langs->trans("AttributeCode"); ?></td><td class="valeur"><input type="text" name="attrname" id="attrname" size="10" value="<?php echo GETPOST('attrname', 'alpha'); ?>" pattern="\w+"> <span class="opacitymedium">(<?php echo $langs->trans("AlphaNumOnlyLowerCharsAndNoSpace"); ?>)</span></td></tr>
|
||||
<tr><td class="fieldrequired"><?php echo $form->textwithpicto($langs->trans("AttributeCode"), $langs->trans("AttributeCodeHelp")); ?></td><td class="valeur"><input type="text" name="attrname" id="attrname" size="10" value="<?php echo GETPOST('attrname', 'alpha'); ?>" pattern="\w+"> <span class="opacitymedium">(<?php echo $langs->trans("AlphaNumOnlyLowerCharsAndNoSpace"); ?>)</span></td></tr>
|
||||
<!-- Type -->
|
||||
<tr><td class="fieldrequired"><?php echo $langs->trans("Type"); ?></td><td class="valeur">
|
||||
<?php
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ if (is_array($param)) {
|
|||
<tr><td class="titlefieldcreate fieldrequired"><?php echo $langs->trans("LabelOrTranslationKey"); ?></td><td class="valeur"><input type="text" name="label" size="40" value="<?php echo $label; ?>"></td></tr>
|
||||
|
||||
<!-- Code -->
|
||||
<tr><td class="fieldrequired"><?php echo $langs->trans("AttributeCode"); ?></td><td class="valeur"><?php echo $attrname; ?></td></tr>
|
||||
<tr><td class="fieldrequired"><?php echo $form->textwithpicto($langs->trans("AttributeCode"), $langs->trans("AttributeCodeHelp")); ?></td><td class="valeur"><?php echo $attrname; ?></td></tr>
|
||||
|
||||
<!-- Type -->
|
||||
<tr><td class="fieldrequired"><?php echo $langs->trans("Type"); ?></td><td class="valeur">
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ print img_picto('A-Z', '1downarrow.png');
|
|||
print '</span>';
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans("LabelOrTranslationKey").'</td>';
|
||||
print '<td>'.$langs->trans("TranslationString").'</td>';
|
||||
//print '<td>'.$langs->trans("TranslationString").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Size").'</td>';
|
||||
|
|
@ -134,10 +134,17 @@ if (isset($extrafields->attributes[$elementtype]['type']) && is_array($extrafiel
|
|||
}
|
||||
// Position
|
||||
print "<td>".dol_escape_htmltag((string) $extrafields->attributes[$elementtype]['pos'][$key])."</td>\n";
|
||||
// Label
|
||||
print '<td title="'.dol_escape_htmltag($extrafields->attributes[$elementtype]['label'][$key]).'" class="tdoverflowmax150">'.dol_escape_htmltag($extrafields->attributes[$elementtype]['label'][$key])."</td>\n"; // We don't translate here, we want admin to know what is the key not translated value
|
||||
// Label and label translated
|
||||
print '<td title="'.dol_escape_htmltag($extrafields->attributes[$elementtype]['label'][$key]).'" class="tdoverflowmax150 subtitle">';
|
||||
print dol_escape_htmltag($extrafields->attributes[$elementtype]['label'][$key]);
|
||||
if ($langs->transnoentitiesnoconv($extrafields->attributes[$elementtype]['label'][$key]) != $extrafields->attributes[$elementtype]['label'][$key]) {
|
||||
print '<br><span class="subtitle small opacitymedium inline-block" title="'.dolPrintHTMLForAttribute($langs->trans("LabelTranslatedInCurrentLanguage")).'">';
|
||||
print $langs->transnoentitiesnoconv($extrafields->attributes[$elementtype]['label'][$key]);
|
||||
}
|
||||
print '</span>';
|
||||
print "</td>\n"; // We don't translate here, we want admin to know what is the key not translated value
|
||||
// Label translated
|
||||
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv($extrafields->attributes[$elementtype]['label'][$key])).'">'.dol_escape_htmltag($langs->transnoentitiesnoconv($extrafields->attributes[$elementtype]['label'][$key]))."</td>\n";
|
||||
//print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv($extrafields->attributes[$elementtype]['label'][$key])).'">'.dol_escape_htmltag($langs->transnoentitiesnoconv($extrafields->attributes[$elementtype]['label'][$key]))."</td>\n";
|
||||
// Key
|
||||
print '<td title="'.dol_escape_htmltag($key).'" class="tdoverflowmax100">'.dol_escape_htmltag($key)."</td>\n";
|
||||
// Type
|
||||
|
|
|
|||
|
|
@ -1043,7 +1043,7 @@ class Cronjob extends CommonObject
|
|||
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||
* @return string String with URL
|
||||
*/
|
||||
public function getNomUrl(int $withpicto = 0, string $option = '', int $notooltip = 0, string $morecss = '', int $save_lastsearch_value = -1)
|
||||
public function getNomUrl($withpicto = 0, string $option = '', int $notooltip = 0, string $morecss = '', int $save_lastsearch_value = -1)
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ create table llx_product
|
|||
description text,
|
||||
note_public text,
|
||||
note text,
|
||||
customcode varchar(32), -- Optional custom code
|
||||
customcode varchar(32), -- Customs|Commodity|HS|TARIC code see https://github.com/Dolibarr/dolibarr/issues/31679
|
||||
fk_country integer DEFAULT NULL, -- Optional id of original country
|
||||
fk_state integer DEFAULT NULL, -- Optional id of original state/province
|
||||
price double(24,8) DEFAULT 0, -- price without tax
|
||||
|
|
|
|||
|
|
@ -1176,6 +1176,7 @@ NoLocalTaxXForThisCountry=According to the setup of taxes (See %s - %s - %s), yo
|
|||
LabelUsedByDefault=Label used by default if no translation can be found for code
|
||||
LabelOnDocuments=Label on documents
|
||||
LabelOrTranslationKey=Label or translation key
|
||||
LabelTranslatedInCurrentLanguage=Label translated in current language
|
||||
TranslationFound=Translation found
|
||||
TheTranslationIsSearchedFromKey=The translation is searched from the translation key: <b>%s</b>
|
||||
TranslationKey=Translation key
|
||||
|
|
@ -2584,3 +2585,4 @@ SensitiveData=Sensitive data
|
|||
ToolToDecryptAString=Tool to decrypt a string
|
||||
Decrypt=Decrypt
|
||||
FilesIntegrityDesc=If you want to check the integrity of files instead of database, you can do it by using <a href="%s">this tool</a>.
|
||||
AttributeCodeHelp=A code of your choice (without special char and space) to identify the property.<br>Note that if an object B is created from an existing object A that has a different type (for example creation of an invoice from an order), the value of the complementary attributes of A are also copied into the complementary attributes of B when the code of the attribute is the same.
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ BuyingPrices=Buying prices
|
|||
CustomerPrices=Customer prices
|
||||
SuppliersPrices=Vendor prices
|
||||
SuppliersPricesOfProductsOrServices=Vendor prices (of products or services)
|
||||
CustomCode=Customs|Commodity|HS code
|
||||
CustomCode=Customs|Commodity|HS|TARIC code
|
||||
CountryOrigin=Country of origin
|
||||
RegionStateOrigin=Region of origin
|
||||
StateOrigin=State|Province of origin
|
||||
|
|
|
|||
|
|
@ -462,7 +462,7 @@ if ($num == 1 && getDolGlobalInt('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $sear
|
|||
// Output page
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-mymodule page-list bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
|
||||
llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-mymodule page-list bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for a horizontal scroll in the table instead of page
|
||||
|
||||
// Example : Adding jquery code
|
||||
// print '<script type="text/javascript">
|
||||
|
|
@ -645,7 +645,7 @@ foreach ($object->fields as $key => $val) {
|
|||
$formadmin = new FormAdmin($db);
|
||||
print $formadmin->select_language((isset($search[$key]) ? $search[$key] : ''), 'search_lang', 0, array(), 1, 0, 0, 'minwidth100imp maxwidth125', 2);
|
||||
} else {
|
||||
print '<input type="text" class="flat maxwidth'.($val['type'] == 'integer' ? '50' : '75').'" name="search_'.$key.'" value="'.dol_escape_htmltag(isset($search[$key]) ? $search[$key] : '').'">';
|
||||
print '<input type="text" class="flat maxwidth'.(in_array($val['type'], array('integer', 'price')) ? '50' : '75').'" name="search_'.$key.'" value="'.dol_escape_htmltag(isset($search[$key]) ? $search[$key] : '').'">';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -432,7 +432,7 @@ class Reception extends CommonObject
|
|||
|
||||
$sql = "SELECT e.rowid, e.entity, e.ref, e.fk_soc as socid, e.date_creation, e.ref_supplier, e.ref_ext, e.fk_user_author, e.fk_statut as status, e.billed";
|
||||
$sql .= ", e.weight, e.weight_units, e.size, e.size_units, e.width, e.height";
|
||||
$sql .= ", e.date_reception as date_reception, e.model_pdf, e.date_delivery";
|
||||
$sql .= ", e.date_reception as date_reception, e.model_pdf, e.date_delivery, e.date_valid";
|
||||
$sql .= ", e.fk_shipping_method, e.tracking_number";
|
||||
$sql .= ", el.fk_source as origin_id, el.sourcetype as origin";
|
||||
$sql .= ", e.note_private, e.note_public";
|
||||
|
|
@ -473,6 +473,7 @@ class Reception extends CommonObject
|
|||
$this->date = $this->db->jdate($obj->date_reception); // TODO deprecated
|
||||
$this->date_reception = $this->db->jdate($obj->date_reception); // Date real
|
||||
$this->date_delivery = $this->db->jdate($obj->date_delivery); // Date planned
|
||||
$this->date_valid = $this->db->jdate($obj->date_valid); // Date validation
|
||||
$this->model_pdf = $obj->model_pdf;
|
||||
$this->shipping_method_id = $obj->fk_shipping_method;
|
||||
$this->tracking_number = $obj->tracking_number;
|
||||
|
|
|
|||
|
|
@ -923,7 +923,7 @@ class Dolresource extends CommonObject
|
|||
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||
* @return string String with URL
|
||||
*/
|
||||
public function getNomUrl(int $withpicto = 0, string $option = '', string $get_params = '', int $notooltip = 0, string $morecss = '', int $save_lastsearch_value = -1)
|
||||
public function getNomUrl($withpicto = 0, string $option = '', string $get_params = '', int $notooltip = 0, string $morecss = '', int $save_lastsearch_value = -1)
|
||||
{
|
||||
global $langs, $hookmanager, $action;
|
||||
|
||||
|
|
|
|||
|
|
@ -5547,11 +5547,10 @@ div.fiche > table.table-fiche-title:first-of-type div {
|
|||
div.titre {
|
||||
color: var(--colortexttitlenotab);
|
||||
}
|
||||
/*
|
||||
div.subtitle {
|
||||
|
||||
td.subtitle {
|
||||
line-height: 1.1em;
|
||||
}
|
||||
*/
|
||||
|
||||
.secondary {
|
||||
color: var(--colortexttitlenotab);
|
||||
|
|
|
|||
|
|
@ -5526,6 +5526,11 @@ div.titre.small {
|
|||
div.titre {
|
||||
color: var(--colortexttitlenotab);
|
||||
}
|
||||
|
||||
td.subtitle {
|
||||
line-height: 1.1em;
|
||||
}
|
||||
|
||||
.secondary {
|
||||
color: var(--colortexttitlenotab);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue