Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
06a40726bb
@ -307,11 +307,11 @@ if ($resql)
|
||||
print '<tr class="liste_titre">';
|
||||
if (! empty($arrayfields['aa.account_number']['checked'])) print_liste_field_titre($arrayfields['aa.account_number']['label'], $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['aa.label']['checked'])) print_liste_field_titre($arrayfields['aa.label']['label'], $_SERVER["PHP_SELF"], "aa.label", "", $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['aa.account_parent']['checked'])) print_liste_field_titre($arrayfields['aa.account_parent']['label'], $_SERVER["PHP_SELF"], "aa.account_parent", "", $param, 'align="left"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['aa.account_parent']['checked'])) print_liste_field_titre($arrayfields['aa.account_parent']['label'], $_SERVER["PHP_SELF"], "aa.account_parent", "", $param, '', $sortfield, $sortorder, 'left ');
|
||||
if (! empty($arrayfields['aa.pcg_type']['checked'])) print_liste_field_titre($arrayfields['aa.pcg_type']['label'], $_SERVER["PHP_SELF"], 'aa.pcg_type', '', $param, '', $sortfield, $sortorder, '', $arrayfields['aa.pcg_type']['help']);
|
||||
if (! empty($arrayfields['aa.pcg_subtype']['checked'])) print_liste_field_titre($arrayfields['aa.pcg_subtype']['label'], $_SERVER["PHP_SELF"], 'aa.pcg_subtype', '', $param, '', $sortfield, $sortorder, '', $arrayfields['aa.pcg_subtype']['help']);
|
||||
if (! empty($arrayfields['aa.active']['checked'])) print_liste_field_titre($arrayfields['aa.active']['label'], $_SERVER["PHP_SELF"], 'aa.active', '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
$accountstatic = new AccountingAccount($db);
|
||||
@ -403,7 +403,7 @@ if ($resql)
|
||||
}
|
||||
|
||||
// Action
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($user->rights->accounting->chartofaccount) {
|
||||
print '<a href="./card.php?action=update&id=' . $obj->rowid . '&backtopage='.urlencode($_SERVER["PHP_SELF"].'?chartofaccounts='.$object->id).'">';
|
||||
print img_edit();
|
||||
|
||||
@ -532,8 +532,8 @@ if ($id)
|
||||
if ($fieldlist[$field]=='pcg_version' || $fieldlist[$field]=='fk_pcg_version') { $valuetoshow=$langs->trans("Pcg_version"); }
|
||||
|
||||
if ($valuetoshow != '') {
|
||||
print '<td align="'.$align.'">';
|
||||
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) {
|
||||
print '<td class="'.$class.'">';
|
||||
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) {
|
||||
print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1, $valuetoshow).'</a>';
|
||||
} elseif (! empty($tabhelp[$id][$value])) {
|
||||
print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]);
|
||||
@ -662,23 +662,29 @@ if ($id)
|
||||
*/
|
||||
$valuetoshow=ucfirst($fieldlist[$field]); // By defaut
|
||||
$valuetoshow=$langs->trans($valuetoshow); // try to translate
|
||||
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); }
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label')
|
||||
{
|
||||
$valuetoshow=$langs->trans("Label");
|
||||
if ($id != 25) $valuetoshow.="*";
|
||||
}
|
||||
if ($fieldlist[$field]=='country') { $valuetoshow=$langs->trans("Country"); }
|
||||
if ($fieldlist[$field]=='country_id') { $showfield=0; }
|
||||
if ($fieldlist[$field]=='fk_pcg_version') { $valuetoshow=$langs->trans("Pcg_version"); }
|
||||
if ($fieldlist[$field]=='code') {
|
||||
$valuetoshow=$langs->trans("Code");
|
||||
}
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') {
|
||||
$valuetoshow=$langs->trans("Label");
|
||||
if ($id != 25) $valuetoshow.="*";
|
||||
}
|
||||
if ($fieldlist[$field]=='country') {
|
||||
$valuetoshow=$langs->trans("Country");
|
||||
}
|
||||
if ($fieldlist[$field]=='country_id') {
|
||||
$showfield=0;
|
||||
}
|
||||
if ($fieldlist[$field]=='fk_pcg_version') {
|
||||
$valuetoshow=$langs->trans("Pcg_version");
|
||||
}
|
||||
|
||||
// Affiche nom du champ
|
||||
if ($showfield)
|
||||
{
|
||||
print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable?$fieldlist[$field]:''), ($page?'page='.$page.'&':''), $param, "align=".$align, $sortfield, $sortorder);
|
||||
if ($showfield) {
|
||||
print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable?$fieldlist[$field]:''), ($page?'page='.$page.'&':''), $param, "", $sortfield, $sortorder, $class.' ');
|
||||
}
|
||||
}
|
||||
print getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], "active", ($page?'page='.$page.'&':''), $param, 'align="center"', $sortfield, $sortorder);
|
||||
print getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], "active", ($page?'page='.$page.'&':''), $param, '', $sortfield, $sortorder, 'center ');
|
||||
print getTitleFieldOfList('');
|
||||
print getTitleFieldOfList('');
|
||||
print '</tr>';
|
||||
@ -757,7 +763,7 @@ if ($id)
|
||||
$class='tddict';
|
||||
if ($fieldlist[$field] == 'tracking') $class.=' tdoverflowauto';
|
||||
// Show value for field
|
||||
if ($showfield) print '<!-- '.$fieldlist[$field].' --><td align="'.$align.'" class="'.$class.'">'.$valuetoshow.'</td>';
|
||||
if ($showfield) print '<!-- '.$fieldlist[$field].' --><td class="'.$class.'">'.$valuetoshow.'</td>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -769,17 +775,17 @@ if ($id)
|
||||
$url.='&';
|
||||
|
||||
// Active
|
||||
print '<td align="center" class="nowrap">';
|
||||
print '<td class="center nowrap">';
|
||||
if ($canbedisabled) print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>';
|
||||
else print $langs->trans("AlwaysActive");
|
||||
print "</td>";
|
||||
|
||||
// Modify link
|
||||
if ($canbemodified) print '<td align="center"><a class="reposition" href="'.$url.'action=edit">'.img_edit().'</a></td>';
|
||||
if ($canbemodified) print '<td class="center"><a class="reposition" href="'.$url.'action=edit">'.img_edit().'</a></td>';
|
||||
else print '<td> </td>';
|
||||
|
||||
// Delete link
|
||||
if ($iserasable) print '<td align="center"><a href="'.$url.'action=delete">'.img_delete().'</a></td>';
|
||||
if ($iserasable) print '<td class="center"><a href="'.$url.'action=delete">'.img_delete().'</a></td>';
|
||||
else print '<td> </td>';
|
||||
|
||||
print "</tr>\n";
|
||||
@ -852,7 +858,7 @@ function fieldListAccountModel($fieldlist, $obj = '', $tabname = '', $context =
|
||||
}
|
||||
}
|
||||
elseif ($fieldlist[$field] == 'type_cdr') {
|
||||
if ($fieldlist[$field] == 'type_cdr') print '<td align="center">';
|
||||
if ($fieldlist[$field] == 'type_cdr') print '<td class="center">';
|
||||
else print '<td>';
|
||||
if ($fieldlist[$field] == 'type_cdr') {
|
||||
print $form->selectarray($fieldlist[$field], array(0=>$langs->trans('None'), 1=>$langs->trans('AtEndOfMonth'), 2=>$langs->trans('CurrentNext')), (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''));
|
||||
|
||||
@ -41,8 +41,7 @@ $rowid=GETPOST('rowid', 'alpha');
|
||||
$code=GETPOST('code', 'alpha');
|
||||
|
||||
// Security access
|
||||
if (empty($user->rights->accounting->chartofaccount))
|
||||
{
|
||||
if (empty($user->rights->accounting->chartofaccount)) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
@ -468,29 +467,46 @@ if ($id)
|
||||
$valuetoshow=ucfirst($fieldlist[$field]); // Par defaut
|
||||
$valuetoshow=$langs->trans($valuetoshow); // try to translate
|
||||
$class="left";
|
||||
if ($fieldlist[$field]=='type') {
|
||||
if ($tabname[$id] == MAIN_DB_PREFIX."c_paiement") $valuetoshow=$form->textwithtooltip($langs->trans("Type"), $langs->trans("TypePaymentDesc"), 2, 1, img_help(1, ''));
|
||||
else $valuetoshow=$langs->trans("Type");
|
||||
if ($fieldlist[$field]=='type') {
|
||||
if ($tabname[$id] == MAIN_DB_PREFIX."c_paiement") {
|
||||
$valuetoshow=$form->textwithtooltip($langs->trans("Type"), $langs->trans("TypePaymentDesc"), 2, 1, img_help(1, ''));
|
||||
} else {
|
||||
$valuetoshow=$langs->trans("Type");
|
||||
}
|
||||
}
|
||||
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); }
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label')
|
||||
{
|
||||
if ($fieldlist[$field]=='code') {
|
||||
$valuetoshow=$langs->trans("Code");
|
||||
}
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') {
|
||||
$valuetoshow=$langs->trans("Label");
|
||||
}
|
||||
if ($fieldlist[$field]=='libelle_facture') { $valuetoshow=$langs->trans("LabelOnDocuments"); }
|
||||
if ($fieldlist[$field]=='country') {
|
||||
if ($fieldlist[$field]=='libelle_facture') {
|
||||
$valuetoshow=$langs->trans("LabelOnDocuments");
|
||||
}
|
||||
if ($fieldlist[$field]=='country') {
|
||||
$valuetoshow=$langs->trans("Country");
|
||||
}
|
||||
if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); }
|
||||
if ($fieldlist[$field]=='accountancy_code_sell'){ $valuetoshow=$langs->trans("AccountancyCodeSell"); }
|
||||
if ($fieldlist[$field]=='accountancy_code_buy'){ $valuetoshow=$langs->trans("AccountancyCodeBuy"); }
|
||||
if ($fieldlist[$field]=='pcg_version' || $fieldlist[$field]=='fk_pcg_version') { $valuetoshow=$langs->trans("Pcg_version"); }
|
||||
if ($fieldlist[$field]=='range_account') { $valuetoshow=$langs->trans("Comment"); }
|
||||
if ($fieldlist[$field]=='category_type') { $valuetoshow=$langs->trans("Calculated"); }
|
||||
if ($fieldlist[$field]=='accountancy_code') {
|
||||
$valuetoshow=$langs->trans("AccountancyCode");
|
||||
}
|
||||
if ($fieldlist[$field]=='accountancy_code_sell') {
|
||||
$valuetoshow=$langs->trans("AccountancyCodeSell");
|
||||
}
|
||||
if ($fieldlist[$field]=='accountancy_code_buy') {
|
||||
$valuetoshow=$langs->trans("AccountancyCodeBuy");
|
||||
}
|
||||
if ($fieldlist[$field]=='pcg_version' || $fieldlist[$field]=='fk_pcg_version') {
|
||||
$valuetoshow=$langs->trans("Pcg_version");
|
||||
}
|
||||
if ($fieldlist[$field]=='range_account') {
|
||||
$valuetoshow=$langs->trans("Comment");
|
||||
}
|
||||
if ($fieldlist[$field]=='category_type') {
|
||||
$valuetoshow=$langs->trans("Calculated");
|
||||
}
|
||||
|
||||
if ($valuetoshow != '')
|
||||
{
|
||||
print '<td align="'.$align.'">';
|
||||
if ($valuetoshow != '') {
|
||||
print '<td class="'.$class.'">';
|
||||
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1, $valuetoshow).'</a>';
|
||||
elseif (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]);
|
||||
else print $valuetoshow;
|
||||
@ -591,7 +607,7 @@ if ($id)
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<td class="liste_titre center">';
|
||||
if ($filterfound)
|
||||
{
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||
@ -613,38 +629,73 @@ if ($id)
|
||||
|
||||
$valuetoshow=ucfirst($fieldlist[$field]); // By defaut
|
||||
$valuetoshow=$langs->trans($valuetoshow); // try to translate
|
||||
if ($fieldlist[$field]=='source') { $valuetoshow=$langs->trans("Contact"); }
|
||||
if ($fieldlist[$field]=='price') { $valuetoshow=$langs->trans("PriceUHT"); }
|
||||
if ($fieldlist[$field]=='taux') {
|
||||
if ($tabname[$id] != MAIN_DB_PREFIX."c_revenuestamp") $valuetoshow=$langs->trans("Rate");
|
||||
else $valuetoshow=$langs->trans("Amount");
|
||||
$align='center';
|
||||
if ($fieldlist[$field]=='source') {
|
||||
$valuetoshow=$langs->trans("Contact");
|
||||
}
|
||||
if ($fieldlist[$field]=='type') { $valuetoshow=$langs->trans("Type"); }
|
||||
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); }
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label')
|
||||
{
|
||||
if ($fieldlist[$field]=='price') {
|
||||
$valuetoshow=$langs->trans("PriceUHT");
|
||||
}
|
||||
if ($fieldlist[$field]=='taux') {
|
||||
if ($tabname[$id] != MAIN_DB_PREFIX."c_revenuestamp") {
|
||||
$valuetoshow=$langs->trans("Rate");
|
||||
} else {
|
||||
$valuetoshow=$langs->trans("Amount");
|
||||
}
|
||||
$class='center';
|
||||
}
|
||||
if ($fieldlist[$field]=='type') {
|
||||
$valuetoshow=$langs->trans("Type");
|
||||
}
|
||||
if ($fieldlist[$field]=='code') {
|
||||
$valuetoshow=$langs->trans("Code");
|
||||
}
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') {
|
||||
$valuetoshow=$langs->trans("Label");
|
||||
}
|
||||
if ($fieldlist[$field]=='country') { $valuetoshow=$langs->trans("Country"); }
|
||||
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; }
|
||||
if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); }
|
||||
if ($fieldlist[$field]=='accountancy_code_sell'){ $valuetoshow=$langs->trans("AccountancyCodeSell"); $sortable=0; }
|
||||
if ($fieldlist[$field]=='accountancy_code_buy'){ $valuetoshow=$langs->trans("AccountancyCodeBuy"); $sortable=0; }
|
||||
if ($fieldlist[$field]=='fk_pcg_version') { $valuetoshow=$langs->trans("Pcg_version"); }
|
||||
if ($fieldlist[$field]=='account_parent') { $valuetoshow=$langs->trans("Accountsparent"); }
|
||||
if ($fieldlist[$field]=='pcg_type') { $valuetoshow=$langs->trans("Pcg_type"); }
|
||||
if ($fieldlist[$field]=='pcg_subtype') { $valuetoshow=$langs->trans("Pcg_subtype"); }
|
||||
if ($fieldlist[$field]=='type_template') { $valuetoshow=$langs->trans("TypeOfTemplate"); }
|
||||
if ($fieldlist[$field]=='range_account') { $valuetoshow=$langs->trans("Comment"); }
|
||||
if ($fieldlist[$field]=='category_type') { $valuetoshow=$langs->trans("Calculated"); }
|
||||
if ($fieldlist[$field]=='country') {
|
||||
$valuetoshow=$langs->trans("Country");
|
||||
}
|
||||
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') {
|
||||
$showfield=0;
|
||||
}
|
||||
if ($fieldlist[$field]=='accountancy_code') {
|
||||
$valuetoshow=$langs->trans("AccountancyCode");
|
||||
}
|
||||
if ($fieldlist[$field]=='accountancy_code_sell') {
|
||||
$valuetoshow=$langs->trans("AccountancyCodeSell");
|
||||
$sortable=0;
|
||||
}
|
||||
if ($fieldlist[$field]=='accountancy_code_buy') {
|
||||
$valuetoshow=$langs->trans("AccountancyCodeBuy");
|
||||
$sortable=0;
|
||||
}
|
||||
if ($fieldlist[$field]=='fk_pcg_version') {
|
||||
$valuetoshow=$langs->trans("Pcg_version");
|
||||
}
|
||||
if ($fieldlist[$field]=='account_parent') {
|
||||
$valuetoshow=$langs->trans("Accountsparent");
|
||||
}
|
||||
if ($fieldlist[$field]=='pcg_type') {
|
||||
$valuetoshow=$langs->trans("Pcg_type");
|
||||
}
|
||||
if ($fieldlist[$field]=='pcg_subtype') {
|
||||
$valuetoshow=$langs->trans("Pcg_subtype");
|
||||
}
|
||||
if ($fieldlist[$field]=='type_template') {
|
||||
$valuetoshow=$langs->trans("TypeOfTemplate");
|
||||
}
|
||||
if ($fieldlist[$field]=='range_account') {
|
||||
$valuetoshow=$langs->trans("Comment");
|
||||
}
|
||||
if ($fieldlist[$field]=='category_type') {
|
||||
$valuetoshow=$langs->trans("Calculated");
|
||||
}
|
||||
// Affiche nom du champ
|
||||
if ($showfield)
|
||||
{
|
||||
print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable?$fieldlist[$field]:''), ($page?'page='.$page.'&':''), $param, "align=".$align, $sortfield, $sortorder);
|
||||
if ($showfield) {
|
||||
print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable?$fieldlist[$field]:''), ($page?'page='.$page.'&':''), $param, "", $sortfield, $sortorder, $class.' ');
|
||||
}
|
||||
}
|
||||
print getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], "active", ($page?'page='.$page.'&':''), $param, 'align="center"', $sortfield, $sortorder);
|
||||
print getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], "active", ($page?'page='.$page.'&':''), $param, '', $sortfield, $sortorder, 'center ');
|
||||
print getTitleFieldOfList('');
|
||||
print getTitleFieldOfList('');
|
||||
print getTitleFieldOfList('');
|
||||
@ -670,7 +721,7 @@ if ($id)
|
||||
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
|
||||
print '<input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
||||
@ -732,7 +783,7 @@ if ($id)
|
||||
|
||||
$class='tddict';
|
||||
// Show value for field
|
||||
if ($showfield) print '<!-- '.$fieldlist[$field].' --><td align="'.$align.'" class="'.$class.'">'.$valuetoshow.'</td>';
|
||||
if ($showfield) print '<!-- '.$fieldlist[$field].' --><td class="'.$class.'">'.$valuetoshow.'</td>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -750,7 +801,7 @@ if ($id)
|
||||
$url.='&';
|
||||
|
||||
// Active
|
||||
print '<td align="center" class="nowrap">';
|
||||
print '<td class="center" class="nowrap">';
|
||||
if ($canbedisabled) print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>';
|
||||
else
|
||||
{
|
||||
@ -759,13 +810,13 @@ if ($id)
|
||||
print "</td>";
|
||||
|
||||
// Modify link
|
||||
if ($canbemodified) print '<td align="center"><a class="reposition" href="'.$url.'action=edit">'.img_edit().'</a></td>';
|
||||
if ($canbemodified) print '<td class="center"><a class="reposition" href="'.$url.'action=edit">'.img_edit().'</a></td>';
|
||||
else print '<td> </td>';
|
||||
|
||||
// Delete link
|
||||
if ($iserasable)
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($user->admin) print '<a href="'.$url.'action=delete">'.img_delete().'</a>';
|
||||
//else print '<a href="#">'.img_delete().'</a>'; // Some dictionary can be edited by other profile than admin
|
||||
print '</td>';
|
||||
|
||||
@ -32,8 +32,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
$langs->loadLangs(array("compta","admin","accountancy"));
|
||||
|
||||
// Security check
|
||||
if (empty($user->rights->accounting->chartofaccount))
|
||||
{
|
||||
if (empty($user->rights->accounting->chartofaccount)) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
@ -112,7 +111,7 @@ foreach ($list_account_main as $key) {
|
||||
print $form->textwithpicto($label, $htmltext);
|
||||
print '</td>';
|
||||
// Value
|
||||
print '<td>'; // Do not force align=right, or it align also the content of the select box
|
||||
print '<td>'; // Do not force class=right, or it align also the content of the select box
|
||||
print $formaccounting->select_account($conf->global->$key, $key, 1, '', 1, 1);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -156,7 +156,7 @@ foreach ($list_account_main as $key) {
|
||||
print $form->textwithpicto($label, $htmltext);
|
||||
print '</td>';
|
||||
// Value
|
||||
print '<td>'; // Do not force align=right, or it align also the content of the select box
|
||||
print '<td>'; // Do not force class=right, or it align also the content of the select box
|
||||
print $formaccounting->select_account($conf->global->$key, $key, 1, '', 1, 1);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -179,7 +179,7 @@ foreach ($list_account as $key) {
|
||||
$label = $langs->trans($key);
|
||||
print '<td width="50%">' . $label . '</td>';
|
||||
// Value
|
||||
print '<td>'; // Do not force align=right, or it align also the content of the select box
|
||||
print '<td>'; // Do not force class=right, or it align also the content of the select box
|
||||
print $formaccounting->select_account($conf->global->$key, $key, 1, '', 1, 1);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -131,8 +131,8 @@ if ($result)
|
||||
print '<td>' . $langs->trans("Label") . '</td>';
|
||||
print '<td>' . $langs->trans("DateStart") . '</td>';
|
||||
print '<td>' . $langs->trans("DateEnd") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("NumberOfAccountancyEntries") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("NumberOfAccountancyMovements") . '</td>';
|
||||
print '<td class="center">' . $langs->trans("NumberOfAccountancyEntries") . '</td>';
|
||||
print '<td class="center">' . $langs->trans("NumberOfAccountancyMovements") . '</td>';
|
||||
print '<td class="right">' . $langs->trans("Statut") . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -147,8 +147,8 @@ if ($result)
|
||||
print '<td class="left">' . $obj->label . '</td>';
|
||||
print '<td class="left">' . dol_print_date($db->jdate($obj->date_start), 'day') . '</td>';
|
||||
print '<td class="left">' . dol_print_date($db->jdate($obj->date_end), 'day') . '</td>';
|
||||
print '<td align="center">' . $object->getAccountancyEntriesByFiscalYear($obj->date_start, $obj->date_end) . '</td>';
|
||||
print '<td align="center">' . $object->getAccountancyMovementsByFiscalYear($obj->date_start, $obj->date_end) . '</td>';
|
||||
print '<td class="center">' . $object->getAccountancyEntriesByFiscalYear($obj->date_start, $obj->date_end) . '</td>';
|
||||
print '<td class="center">' . $object->getAccountancyMovementsByFiscalYear($obj->date_start, $obj->date_end) . '</td>';
|
||||
print '<td class="right">' . $fiscalyearstatic->LibStatut($obj->statut, 5) . '</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
|
||||
@ -132,7 +132,7 @@ if ($result) {
|
||||
print '<td>' . $langs->trans("Accountparent") . '</td>';
|
||||
print '<td>' . $langs->trans("Pcgtype") . '</td>';
|
||||
print '<td>' . $langs->trans("Pcgsubtype") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("Import") . '</td>';
|
||||
print '<td class="center">' . $langs->trans("Import") . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
$form = new Form($db);
|
||||
@ -166,7 +166,7 @@ if ($result) {
|
||||
// Colonne choix ligne a ventiler
|
||||
$checked = ('label' == 'O') ? ' checked' : '';
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<input type="checkbox" name="mesCasesCochees[]" ' . $checked . ' value="' . $objp->accounting . '"/>';
|
||||
print '</td>';
|
||||
|
||||
@ -174,7 +174,7 @@ if ($result) {
|
||||
$i ++;
|
||||
}
|
||||
|
||||
print '<tr><td colspan="8"> </td></tr><tr><td colspan="8" align="center"><input type="submit" class="butAction" value="' . $langs->trans("Import") . '"></td></tr>';
|
||||
print '<tr><td colspan="8"> </td></tr><tr><td colspan="8" class="center"><input type="submit" class="butAction" value="' . $langs->trans("Import") . '"></td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
|
||||
@ -430,16 +430,18 @@ if ($id)
|
||||
$valuetoshow=ucfirst($fieldlist[$field]); // Par defaut
|
||||
$valuetoshow=$langs->trans($valuetoshow); // try to translate
|
||||
$class="left";
|
||||
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); }
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label')
|
||||
{
|
||||
if ($fieldlist[$field]=='code') {
|
||||
$valuetoshow=$langs->trans("Code");
|
||||
}
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') {
|
||||
$valuetoshow=$langs->trans("Label");
|
||||
}
|
||||
if ($fieldlist[$field]=='nature') { $valuetoshow=$langs->trans("Nature"); }
|
||||
if ($fieldlist[$field]=='nature') {
|
||||
$valuetoshow=$langs->trans("Nature");
|
||||
}
|
||||
|
||||
if ($valuetoshow != '')
|
||||
{
|
||||
print '<td align="'.$align.'">';
|
||||
if ($valuetoshow != '') {
|
||||
print '<td class="'.$class.'">';
|
||||
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1, $valuetoshow).'</a>';
|
||||
elseif (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]);
|
||||
else print $valuetoshow;
|
||||
@ -549,17 +551,22 @@ if ($id)
|
||||
*/
|
||||
$valuetoshow=ucfirst($fieldlist[$field]); // By defaut
|
||||
$valuetoshow=$langs->trans($valuetoshow); // try to translate
|
||||
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); }
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') { $valuetoshow=$langs->trans("Label"); }
|
||||
if ($fieldlist[$field]=='nature') { $valuetoshow=$langs->trans("Nature"); }
|
||||
if ($fieldlist[$field]=='code') {
|
||||
$valuetoshow=$langs->trans("Code");
|
||||
}
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') {
|
||||
$valuetoshow=$langs->trans("Label");
|
||||
}
|
||||
if ($fieldlist[$field]=='nature') {
|
||||
$valuetoshow=$langs->trans("Nature");
|
||||
}
|
||||
|
||||
// Affiche nom du champ
|
||||
if ($showfield)
|
||||
{
|
||||
print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable?$fieldlist[$field]:''), ($page?'page='.$page.'&':''), $param, "align=".$align, $sortfield, $sortorder);
|
||||
if ($showfield) {
|
||||
print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable?$fieldlist[$field]:''), ($page?'page='.$page.'&':''), $param, "", $sortfield, $sortorder, $class.' ');
|
||||
}
|
||||
}
|
||||
print getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], "active", ($page?'page='.$page.'&':''), $param, 'align="center"', $sortfield, $sortorder);
|
||||
print getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], "active", ($page?'page='.$page.'&':''), $param, '', $sortfield, $sortorder, 'center ');
|
||||
print getTitleFieldOfList('');
|
||||
print getTitleFieldOfList('');
|
||||
print getTitleFieldOfList('');
|
||||
@ -621,7 +628,7 @@ if ($id)
|
||||
|
||||
$class='tddict';
|
||||
// Show value for field
|
||||
if ($showfield) print '<!-- '.$fieldlist[$field].' --><td align="'.$align.'" class="'.$class.'">'.$valuetoshow.'</td>';
|
||||
if ($showfield) print '<!-- '.$fieldlist[$field].' --><td class="'.$class.'">'.$valuetoshow.'</td>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -696,11 +703,11 @@ $db->close();
|
||||
/**
|
||||
* Show fields in insert/edit mode
|
||||
*
|
||||
* @param array $fieldlist Array of fields
|
||||
* @param Object $obj If we show a particular record, obj is filled with record fields
|
||||
* @param string $tabname Name of SQL table
|
||||
* @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered
|
||||
* @return void
|
||||
* @param array $fieldlist Array of fields
|
||||
* @param Object $obj If we show a particular record, obj is filled with record fields
|
||||
* @param string $tabname Name of SQL table
|
||||
* @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered
|
||||
* @return void
|
||||
*/
|
||||
function fieldListJournal($fieldlist, $obj = '', $tabname = '', $context = '')
|
||||
{
|
||||
|
||||
@ -307,7 +307,7 @@ if ($result)
|
||||
print '<td>'.$langs->trans('OptionModeProductBuyDesc')."</td></tr>\n";
|
||||
print "</table>\n";
|
||||
|
||||
print '<div align="center"><input type="submit" class="button" value="' . $langs->trans('Refresh') . '" name="changetype"></div>';
|
||||
print '<div class="center"><input type="submit" class="button" value="' . $langs->trans('Refresh') . '" name="changetype"></div>';
|
||||
|
||||
print "<br>\n";
|
||||
|
||||
@ -338,7 +338,7 @@ if ($result)
|
||||
print ' '.$langs->trans("or").' '.$form->selectarray('search_current_account_valid', $listofvals, $search_current_account_valid, 1);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td align="center" class="liste_titre">';
|
||||
print '<td class="center liste_titre">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@ -348,14 +348,14 @@ if ($result)
|
||||
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
|
||||
if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "p.description", "", $param, '', $sortfield, $sortorder);
|
||||
if ($accounting_product_mode == 'ACCOUNTANCY_SELL') print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') print_liste_field_titre("OnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if ($accounting_product_mode == 'ACCOUNTANCY_SELL') print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') print_liste_field_titre("OnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') $fieldtosortaccount="p.accountancy_code_buy";
|
||||
else $fieldtosortaccount="p.accountancy_code_sell";
|
||||
print_liste_field_titre("CurrentDedicatedAccountingAccount", $_SERVER["PHP_SELF"], $fieldtosortaccount, "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("AssignDedicatedAccountingAccount");
|
||||
$clickpitco=$form->showCheckAddButtons('checkforselect', 1);
|
||||
print_liste_field_titre($clickpitco, '', '', '', '', 'align="center"');
|
||||
print_liste_field_titre($clickpitco, '', '', '', '', '', '', '', 'center ');
|
||||
print '</tr>';
|
||||
|
||||
$product_static = new Product($db);
|
||||
@ -408,10 +408,10 @@ if ($result)
|
||||
}
|
||||
|
||||
if ($accounting_product_mode == 'ACCOUNTANCY_SELL')
|
||||
print '<td align="center">'.$product_static->getLibStatut(3, 0).'</td>';
|
||||
print '<td class="center">'.$product_static->getLibStatut(3, 0).'</td>';
|
||||
|
||||
if ($accounting_product_mode == 'ACCOUNTANCY_BUY')
|
||||
print '<td align="center">'.$product_static->getLibStatut(3, 1).'</td>';
|
||||
print '<td class="center">'.$product_static->getLibStatut(3, 1).'</td>';
|
||||
|
||||
// Current accounting account
|
||||
print '<td class="left">';
|
||||
@ -450,7 +450,7 @@ if ($result)
|
||||
}
|
||||
|
||||
// Checkbox select
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<input type="checkbox" class="checkforselect" name="chk_prod[]" value="' . $obj->rowid . '"/></td>';
|
||||
print "</tr>";
|
||||
$i ++;
|
||||
@ -485,7 +485,7 @@ if ($result)
|
||||
</script>';
|
||||
|
||||
|
||||
print '<br><div align="center"><input type="submit" class="butAction" id="changeaccount" name="changeaccount" value="' . $langs->trans("Save") . '"></div>';
|
||||
print '<br><div class="center"><input type="submit" class="butAction" id="changeaccount" name="changeaccount" value="' . $langs->trans("Save") . '"></div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -248,7 +248,7 @@ if ($action != 'export_csv')
|
||||
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Balance", $_SERVER["PHP_SELF"], "", $param, "", 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $param, "", 'width="60" class="center"', $sortfield, $sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
$total_debit = 0;
|
||||
@ -296,7 +296,7 @@ if ($action != 'export_csv')
|
||||
print '<td class="right">' . price($line->debit) . '</td>';
|
||||
print '<td class="right">' . price($line->credit) . '</td>';
|
||||
print '<td class="right">' . price($line->credit - $line->debit) . '</td>';
|
||||
print '<td align="center">' . $link;
|
||||
print '<td class="center">' . $link;
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
@ -73,19 +73,19 @@ $y = $year_current;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td width=150>' . $langs->trans("Label") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("JanuaryMin") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("FebruaryMin") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("MarchMin") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("AprilMin") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("MayMin") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("JuneMin") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("JulyMin") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("AugustMin") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("SeptemberMin") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("OctoberMin") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("NovemberMin") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("DecemberMin") . '</td>';
|
||||
print '<td align="center"><strong>Total</strong></td>';
|
||||
print '<td class="center">' . $langs->trans("JanuaryMin") . '</td>';
|
||||
print '<td class="center">' . $langs->trans("FebruaryMin") . '</td>';
|
||||
print '<td class="center">' . $langs->trans("MarchMin") . '</td>';
|
||||
print '<td class="center">' . $langs->trans("AprilMin") . '</td>';
|
||||
print '<td class="center">' . $langs->trans("MayMin") . '</td>';
|
||||
print '<td class="center">' . $langs->trans("JuneMin") . '</td>';
|
||||
print '<td class="center">' . $langs->trans("JulyMin") . '</td>';
|
||||
print '<td class="center">' . $langs->trans("AugustMin") . '</td>';
|
||||
print '<td class="center">' . $langs->trans("SeptemberMin") . '</td>';
|
||||
print '<td class="center">' . $langs->trans("OctoberMin") . '</td>';
|
||||
print '<td class="center">' . $langs->trans("NovemberMin") . '</td>';
|
||||
print '<td class="center">' . $langs->trans("DecemberMin") . '</td>';
|
||||
print '<td class="center"><strong>Total</strong></td>';
|
||||
print '</tr>';
|
||||
|
||||
$sql = "SELECT bk.numero_compte AS 'compte',";
|
||||
|
||||
@ -604,7 +604,7 @@ if ($action == 'create')
|
||||
print_liste_field_titre("LabelOperation");
|
||||
print_liste_field_titre("Debit", "", "", "", "", 'class="right"');
|
||||
print_liste_field_titre("Credit", "", "", "", "", 'class="right"');
|
||||
print_liste_field_titre("Action", "", "", "", "", 'width="60" align="center"');
|
||||
print_liste_field_titre("Action", "", "", "", "", 'width="60" class="center"');
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
@ -644,7 +644,7 @@ if ($action == 'create')
|
||||
print '<td class="right">' . price($line->debit) . '</td>';
|
||||
print '<td class="right">' . price($line->credit) . '</td>';
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=update&id=' . $line->id . '&piece_num=' . $line->piece_num . '&mode='.$mode.'">';
|
||||
print img_edit();
|
||||
print '</a> ';
|
||||
|
||||
@ -606,18 +606,18 @@ print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
if (! empty($arrayfields['t.piece_num']['checked'])) print_liste_field_titre($arrayfields['t.piece_num']['label'], $_SERVER['PHP_SELF'], "t.piece_num", "", $param, "", $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['t.doc_date']['checked'])) print_liste_field_titre($arrayfields['t.doc_date']['label'], $_SERVER['PHP_SELF'], "t.doc_date", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['t.doc_date']['checked'])) print_liste_field_titre($arrayfields['t.doc_date']['label'], $_SERVER['PHP_SELF'], "t.doc_date", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (! empty($arrayfields['t.doc_ref']['checked'])) print_liste_field_titre($arrayfields['t.doc_ref']['label'], $_SERVER['PHP_SELF'], "t.doc_ref", "", $param, "", $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['t.numero_compte']['checked'])) print_liste_field_titre($arrayfields['t.numero_compte']['label'], $_SERVER['PHP_SELF'], "t.numero_compte", "", $param, "", $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['t.subledger_account']['checked'])) print_liste_field_titre($arrayfields['t.subledger_account']['label'], $_SERVER['PHP_SELF'], "t.subledger_account", "", $param, "", $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['t.label_operation']['checked'])) print_liste_field_titre($arrayfields['t.label_operation']['label'], $_SERVER['PHP_SELF'], "t.label_operation", "", $param, "", $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['t.debit']['checked'])) print_liste_field_titre($arrayfields['t.debit']['label'], $_SERVER['PHP_SELF'], "t.debit", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['t.credit']['checked'])) print_liste_field_titre($arrayfields['t.credit']['label'], $_SERVER['PHP_SELF'], "t.credit", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['t.lettering_code']['checked'])) print_liste_field_titre($arrayfields['t.lettering_code']['label'], $_SERVER['PHP_SELF'], "t.lettering_code", "", $param, 'class="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['t.code_journal']['checked'])) print_liste_field_titre($arrayfields['t.code_journal']['label'], $_SERVER['PHP_SELF'], "t.code_journal", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['t.date_creation']['checked'])) print_liste_field_titre($arrayfields['t.date_creation']['label'], $_SERVER['PHP_SELF'], "t.date_creation", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['t.tms']['checked'])) print_liste_field_titre($arrayfields['t.tms']['label'], $_SERVER['PHP_SELF'], "t.tms", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
if (! empty($arrayfields['t.debit']['checked'])) print_liste_field_titre($arrayfields['t.debit']['label'], $_SERVER['PHP_SELF'], "t.debit", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (! empty($arrayfields['t.credit']['checked'])) print_liste_field_titre($arrayfields['t.credit']['label'], $_SERVER['PHP_SELF'], "t.credit", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (! empty($arrayfields['t.lettering_code']['checked'])) print_liste_field_titre($arrayfields['t.lettering_code']['label'], $_SERVER['PHP_SELF'], "t.lettering_code", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (! empty($arrayfields['t.code_journal']['checked'])) print_liste_field_titre($arrayfields['t.code_journal']['label'], $_SERVER['PHP_SELF'], "t.code_journal", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (! empty($arrayfields['t.date_creation']['checked'])) print_liste_field_titre($arrayfields['t.date_creation']['label'], $_SERVER['PHP_SELF'], "t.date_creation", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (! empty($arrayfields['t.tms']['checked'])) print_liste_field_titre($arrayfields['t.tms']['label'], $_SERVER['PHP_SELF'], "t.tms", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
|
||||
@ -286,7 +286,7 @@ print $formaccounting->select_account($search_accountancy_code_end, 'search_acco
|
||||
print '</div>';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<td class="liste_titre center">';
|
||||
print $langs->trans('From') . ': ';
|
||||
print $form->selectDate($search_date_start, 'search_date_start', 0, 0, 1);
|
||||
print '<br>';
|
||||
@ -297,7 +297,7 @@ print '<td class="liste_titre"><input type="text" size="7" class="flat" name="se
|
||||
print '<td class="liste_titre"><input type="text" size="7" class="flat" name="search_label_operation" value="' . dol_escape_htmltag($search_label_operation) . '"/></td>';
|
||||
print '<td class="liste_titre right"><input type="text" class="flat" name="search_debit" size="4" value="'.dol_escape_htmltag($search_debit).'"></td>';
|
||||
print '<td class="liste_titre right"><input type="text" class="flat" name="search_credit" size="4" value="'.dol_escape_htmltag($search_credit).'"></td>';
|
||||
print '<td class="liste_titre" align="center"><input type="text" name="search_ledger_code" size="3" value="' . dol_escape_htmltag($search_ledger_code) . '"></td>';
|
||||
print '<td class="liste_titre center"><input type="text" name="search_ledger_code" size="3" value="' . dol_escape_htmltag($search_ledger_code) . '"></td>';
|
||||
print '<td class="liste_titre right" colspan="2">';
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpicto;
|
||||
@ -305,14 +305,14 @@ print '</td>';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("AccountAccountingShort", $_SERVER['PHP_SELF']);
|
||||
print_liste_field_titre("TransactionNumShort", $_SERVER['PHP_SELF'], "t.piece_num", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Docdate", $_SERVER['PHP_SELF'], "t.doc_date", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("TransactionNumShort", $_SERVER['PHP_SELF'], "t.piece_num", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Docdate", $_SERVER['PHP_SELF'], "t.doc_date", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("Piece", $_SERVER['PHP_SELF'], "t.doc_ref", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Label");
|
||||
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Codejournal", $_SERVER['PHP_SELF'], "t.code_journal", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Codejournal", $_SERVER['PHP_SELF'], "t.code_journal", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $param, "", 'width="60"', $sortfield, $sortorder, 'center ');
|
||||
print "</tr>\n";
|
||||
|
||||
print '</tr>';
|
||||
@ -364,7 +364,7 @@ while ($i < min($num, $limit))
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td>';
|
||||
print '<td class="right"><a href="./card.php?piece_num=' . $line->piece_num . '">'.$line->piece_num.'</a></td>';
|
||||
print '<td align="center">' . dol_print_date($line->doc_date, 'day') . '</td>';
|
||||
print '<td class="center">' . dol_print_date($line->doc_date, 'day') . '</td>';
|
||||
|
||||
// TODO Add a link according to doc_type and fk_doc
|
||||
print '<td class="nowrap">';
|
||||
@ -384,9 +384,9 @@ while ($i < min($num, $limit))
|
||||
$accountingjournal = new AccountingJournal($db);
|
||||
$result = $accountingjournal->fetch('', $line->code_journal);
|
||||
$journaltoshow = (($result > 0)?$accountingjournal->getNomUrl(0, 0, 0, '', 0) : $line->code_journal);
|
||||
print '<td align="center">' . $journaltoshow . '</td>';
|
||||
print '<td class="center">' . $journaltoshow . '</td>';
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?piece_num=' . $line->piece_num . '">' . img_edit() . '</a> ';
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=delmouv&mvt_num=' . $line->piece_num . $param . '&page=' . $page . '">' . img_delete() . '</a>';
|
||||
print '</td>';
|
||||
|
||||
@ -238,12 +238,12 @@ if ($resql) {
|
||||
print '<td class="right">' . price($obj->debit) . '</td>';
|
||||
print '<td class="right">' . price($obj->credit) . '</td>';
|
||||
print '<td class="right">' . price(round($solde, 2)) . '</td>';
|
||||
print '<td align="center">' . $obj->code_journal . '</td>';
|
||||
print '<td class="center">' . $obj->code_journal . '</td>';
|
||||
|
||||
if (empty($obj->lettering_code)) {
|
||||
print '<td class="nowrap" align="center"><input type="checkbox" class="flat checkforselect" name="toselect[]" id="toselect[]" value="' . $obj->rowid . '" /></td>';
|
||||
print '<td class="nowrap center"><input type="checkbox" class="flat checkforselect" name="toselect[]" id="toselect[]" value="' . $obj->rowid . '" /></td>';
|
||||
} else
|
||||
print '<td align="center">' . $obj->lettering_code . '</td>';
|
||||
print '<td class="center">' . $obj->lettering_code . '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
@ -240,12 +240,12 @@ if ($resql) {
|
||||
print '<td class="right">' . price($obj->debit) . '</td>';
|
||||
print '<td class="right">' . price($obj->credit) . '</td>';
|
||||
print '<td class="right">' . price(round($solde, 2)) . '</td>';
|
||||
print '<td align="center">' . $obj->code_journal . '</td>';
|
||||
print '<td class="center">' . $obj->code_journal . '</td>';
|
||||
|
||||
if (empty($obj->lettering_code)) {
|
||||
print '<td class="nowrap" align="center"><input type="checkbox" class="flat checkforselect" name="toselect[]" id="toselect[]" value="' . $obj->rowid . '" /></td>';
|
||||
print '<td class="nowrap center"><input type="checkbox" class="flat checkforselect" name="toselect[]" id="toselect[]" value="' . $obj->rowid . '" /></td>';
|
||||
} else
|
||||
print '<td align="center">' . $obj->lettering_code . '</td>';
|
||||
print '<td class="center">' . $obj->lettering_code . '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
@ -309,7 +309,9 @@ if ($result) {
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth25" name="search_lineid" value="' . dol_escape_htmltag($search_lineid) . '""></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
|
||||
print '<td class="liste_titre center nowraponall">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_day" value="'.dol_escape_htmltag($search_day).'">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) {
|
||||
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_day" value="'.dol_escape_htmltag($search_day).'">';
|
||||
}
|
||||
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_month" value="'.dol_escape_htmltag($search_month).'">';
|
||||
$formother->select_year($search_year, 'search_year', 1, 20, 5);
|
||||
print '</td>';
|
||||
@ -323,8 +325,8 @@ if ($result) {
|
||||
//print '<input type="text" class="flat maxwidth50" name="search_country" value="' . dol_escape_htmltag($search_country) . '">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_tvaintra" value="' . dol_escape_htmltag($search_tvaintra) . '"></td>';
|
||||
print '<td class="liste_titre" align="center"><input type="text" class="flat maxwidth50" name="search_account" value="' . dol_escape_htmltag($search_account) . '"></td>';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<td class="liste_titre center"><input type="text" class="flat maxwidth50" name="search_account" value="' . dol_escape_htmltag($search_account) . '"></td>';
|
||||
print '<td class="liste_titre center">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print "</td></tr>\n";
|
||||
@ -332,17 +334,17 @@ if ($result) {
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "fd.rowid", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "f.datef, f.ref, fd.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "f.datef, f.ref, fd.rowid", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("ProductRef", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
|
||||
//print_liste_field_titre("ProductLabel", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "fd.description", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "fd.total_ht", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "fd.tva_tx", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "fd.total_ht", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "fd.tva_tx", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
$clickpicto=$form->showCheckAddButtons();
|
||||
print_liste_field_titre($clickpicto, '', '', '', '', 'align="center"');
|
||||
print_liste_field_titre($clickpicto, '', '', '', '', '', '', '', 'center ');
|
||||
print "</tr>\n";
|
||||
|
||||
$facture_static = new Facture($db);
|
||||
@ -368,7 +370,7 @@ if ($result) {
|
||||
// Ref Invoice
|
||||
print '<td class="nowraponall">' . $facture_static->getNomUrl(1) . '</td>';
|
||||
|
||||
print '<td align="center">' . dol_print_date($db->jdate($objp->datef), 'day') . '</td>';
|
||||
print '<td class="center">' . dol_print_date($db->jdate($objp->datef), 'day') . '</td>';
|
||||
|
||||
// Ref Product
|
||||
print '<td>';
|
||||
@ -391,7 +393,7 @@ if ($result) {
|
||||
|
||||
print '<td>' . $objp->tva_intra . '</td>';
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $codecompta . ' <a href="./card.php?id=' . $objp->rowid . '&backtopage='.urlencode($_SERVER["PHP_SELF"].($param?'?'.$param:'')).'">';
|
||||
print img_edit();
|
||||
print '</a>';
|
||||
|
||||
@ -376,7 +376,9 @@ if ($result) {
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth25" name="search_lineid" value="' . dol_escape_htmltag($search_lineid) . '""></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
|
||||
print '<td class="liste_titre center nowraponall">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) {
|
||||
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
|
||||
}
|
||||
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
|
||||
$formother->select_year($search_year, 'search_year', 1, 20, 5);
|
||||
print '</td>';
|
||||
@ -392,7 +394,7 @@ if ($result) {
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_tvaintra" value="' . dol_escape_htmltag($search_tvaintra) . '"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td align="center" class="liste_titre">';
|
||||
print '<td class="center liste_titre">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@ -401,19 +403,19 @@ if ($result) {
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "f.datef, f.ref, l.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "f.datef, f.ref, l.rowid", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("ProductRef", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
|
||||
//print_liste_field_titre("ProductLabel", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "l.total_ht", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "l.total_ht", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("AccountAccountingSuggest", '', '', '', '', 'align="center"');
|
||||
print_liste_field_titre("IntoAccount", '', '', '', '', 'align="center"');
|
||||
print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("AccountAccountingSuggest", '', '', '', '', '', '', '', 'center ');
|
||||
print_liste_field_titre("IntoAccount", '', '', '', '', '', '', '', 'center ');
|
||||
$checkpicto='';
|
||||
if ($massactionbutton) $checkpicto=$form->showCheckAddButtons('checkforselect', 1);
|
||||
print_liste_field_titre($checkpicto, '', '', '', '', 'align="center"');
|
||||
print_liste_field_titre($checkpicto, '', '', '', '', '', '', '', 'center ');
|
||||
print "</tr>\n";
|
||||
|
||||
$facture_static = new Facture($db);
|
||||
@ -482,7 +484,7 @@ if ($result) {
|
||||
// Ref Invoice
|
||||
print '<td class="nowraponall">' . $facture_static->getNomUrl(1) . '</td>';
|
||||
|
||||
print '<td align="center">' . dol_print_date($db->jdate($objp->datef), 'day') . '</td>';
|
||||
print '<td class="center">' . dol_print_date($db->jdate($objp->datef), 'day') . '</td>';
|
||||
|
||||
// Ref Product
|
||||
print '<td>';
|
||||
@ -513,7 +515,7 @@ if ($result) {
|
||||
print '<td>' . $objp->tva_intra . '</td>';
|
||||
|
||||
// Current account
|
||||
print '<td align="center" style="' . $code_sell_p_notset . '">';
|
||||
print '<td class="center" style="' . $code_sell_p_notset . '">';
|
||||
print (($objp->type_l == 1)?$langs->trans("DefaultForService"):$langs->trans("DefaultForProduct")) . ' = ' . ($objp->code_sell_l > 0 ? length_accountg($objp->code_sell_l) : $langs->trans("Unknown"));
|
||||
if ($objp->product_id > 0)
|
||||
{
|
||||
@ -523,12 +525,12 @@ if ($result) {
|
||||
print '</td>';
|
||||
|
||||
// Suggested accounting account
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone');
|
||||
print '</td>';
|
||||
|
||||
// Column with checkbox
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<input type="checkbox" class="flat checkforselect checkforselect'.$objp->rowid.'" name="toselect[]" value="' . $objp->rowid . "_" . $i . '"' . ($objp->aarowid ? "checked" : "") . '/>';
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -270,7 +270,7 @@ if ($result) {
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
|
||||
print '<td class="liste_titre right"><input type="text" class="flat maxwidth50" name="search_amount" value="' . dol_escape_htmltag($search_amount) . '"></td>';
|
||||
print '<td class="liste_titre" align="center"><input type="text" class="flat maxwidth50" name="search_vat" size="1" placeholder="%" value="' . dol_escape_htmltag($search_vat) . '"></td>';
|
||||
print '<td class="liste_titre center"><input type="text" class="flat maxwidth50" name="search_vat" size="1" placeholder="%" value="' . dol_escape_htmltag($search_vat) . '"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_account" value="' . dol_escape_htmltag($search_account) . '"></td>';
|
||||
print '<td class="liste_titre right"></td>';
|
||||
print '<td class="liste_titre right">';
|
||||
@ -282,15 +282,15 @@ if ($result) {
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "erd.rowid", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("ExpenseReport", $_SERVER["PHP_SELF"], "er.ref", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "erd.date, erd.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "erd.date, erd.rowid", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("TypeFees", $_SERVER["PHP_SELF"], "f.label", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "erd.comments", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "erd.total_ht", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "erd.tva_tx", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "erd.total_ht", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "erd.tva_tx", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre('');
|
||||
$checkpicto=$form->showCheckAddButtons();
|
||||
print_liste_field_titre($checkpicto, '', '', '', '', 'align="center"');
|
||||
print_liste_field_titre($checkpicto, '', '', '', '', '', '', '', 'center ');
|
||||
print "</tr>\n";
|
||||
|
||||
$expensereport_static = new ExpenseReport($db);
|
||||
@ -309,7 +309,7 @@ if ($result) {
|
||||
// Ref Invoice
|
||||
print '<td>' . $expensereport_static->getNomUrl(1) . '</td>';
|
||||
|
||||
print '<td align="center">' . dol_print_date($db->jdate($objp->date), 'day') . '</td>';
|
||||
print '<td class="center">' . dol_print_date($db->jdate($objp->date), 'day') . '</td>';
|
||||
|
||||
print '<td class="tdoverflow">' . ($langs->trans($objp->type_fees_code) == $objp->type_fees_code ? $objp->type_fees_label : $langs->trans(($objp->type_fees_code))) . '</td>';
|
||||
|
||||
@ -321,7 +321,7 @@ if ($result) {
|
||||
|
||||
print '<td class="right">' . price($objp->total_ht) . '</td>';
|
||||
|
||||
print '<td align="center">' . vatrate($objp->tva_tx.($objp->vat_src_code?' ('.$objp->vat_src_code.')':'')) . '</td>';
|
||||
print '<td class="center">' . vatrate($objp->tva_tx.($objp->vat_src_code?' ('.$objp->vat_src_code.')':'')) . '</td>';
|
||||
|
||||
print '<td>' . $codeCompta . '</td>';
|
||||
|
||||
|
||||
@ -319,7 +319,7 @@ if ($result) {
|
||||
print '<td class="liste_titre right"><input type="text" class="right flat maxwidth50" name="search_vat" placeholder="%" size="1" value="' . dol_escape_htmltag($search_vat) . '"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td align="center" class="liste_titre">';
|
||||
print '<td class="center" class="liste_titre">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@ -328,16 +328,16 @@ if ($result) {
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "erd.rowid", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("ExpenseReport", $_SERVER["PHP_SELF"], "er.ref", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "erd.date, erd.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "erd.date, erd.rowid", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("TypeFees", $_SERVER["PHP_SELF"], "f.label", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "erd.comments", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "erd.total_ht", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "erd.tva_tx", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("AccountAccountingSuggest", '', '', '', '', 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("IntoAccount", '', '', '', '', 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "erd.total_ht", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "erd.tva_tx", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("AccountAccountingSuggest", '', '', '', '', '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("IntoAccount", '', '', '', '', '', $sortfield, $sortorder, 'center ');
|
||||
$checkpicto='';
|
||||
if ($massactionbutton) $checkpicto=$form->showCheckAddButtons('checkforselect', 1);
|
||||
print_liste_field_titre($checkpicto, '', '', '', '', 'align="center"');
|
||||
print_liste_field_titre($checkpicto, '', '', '', '', '', '', '', 'center ');
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
@ -362,7 +362,7 @@ if ($result) {
|
||||
print '<td>' . $expensereport_static->getNomUrl(1) . '</td>';
|
||||
|
||||
// Date
|
||||
print '<td align="center">' . dol_print_date($db->jdate($objp->date), 'day') . '</td>';
|
||||
print '<td class="center">' . dol_print_date($db->jdate($objp->date), 'day') . '</td>';
|
||||
|
||||
// Fees label
|
||||
print '<td>';
|
||||
@ -386,16 +386,16 @@ if ($result) {
|
||||
print '</td>';
|
||||
|
||||
// Current account
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print length_accountg(html_entity_decode($objp->code_buy));
|
||||
print '</td>';
|
||||
|
||||
// Suggested accounting account
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone');
|
||||
print '</td>';
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<input type="checkbox" class="flat checkforselect checkforselect'.$objp->rowid.'" name="toselect[]" value="' . $objp->rowid . "_" . $i . '"' . ($objp->aarowid ? "checked" : "") . '/>';
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -994,8 +994,8 @@ if (empty($action) || $action == 'view') {
|
||||
print "<td>" . $langs->trans("SubledgerAccount") . "</td>";
|
||||
print "<td>" . $langs->trans("LabelOperation") . "</td>";
|
||||
print "<td>" . $langs->trans("PaymentMode") . "</td>";
|
||||
print "<td align='right'>" . $langs->trans("Debit") . "</td>";
|
||||
print "<td align='right'>" . $langs->trans("Credit") . "</td>";
|
||||
print "<td class='right'>" . $langs->trans("Debit") . "</td>";
|
||||
print "<td class='right'>" . $langs->trans("Credit") . "</td>";
|
||||
print "</tr>\n";
|
||||
|
||||
$r = '';
|
||||
@ -1044,8 +1044,8 @@ if (empty($action) || $action == 'view') {
|
||||
print $reflabel;
|
||||
print "</td>";
|
||||
print "<td>" . $val["type_payment"] . "</td>";
|
||||
print "<td align='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "<td align='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "<td class='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "<td class='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
}
|
||||
@ -1126,8 +1126,8 @@ if (empty($action) || $action == 'view') {
|
||||
print "</td>";
|
||||
print "<td>" . $reflabel . "</td>";
|
||||
print "<td>" . $val["type_payment"] . "</td>";
|
||||
print "<td align='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "<td align='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "<td class='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "<td class='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
}
|
||||
@ -1163,8 +1163,8 @@ if (empty($action) || $action == 'view') {
|
||||
print "</td>";
|
||||
print "<td>" . $reflabel . "</td>";
|
||||
print "<td>" . $val["type_payment"] . "</td>";
|
||||
print "<td align='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "<td align='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "<td class='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "<td class='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
}
|
||||
|
||||
@ -328,8 +328,8 @@ if ($result) {
|
||||
// print '<input type="text" class="flat maxwidth50" name="search_country" value="' . dol_escape_htmltag($search_country) . '">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_tvaintra" value="' . dol_escape_htmltag($search_tvaintra) . '"></td>';
|
||||
print '<td class="liste_titre" align="center"><input type="text" class="flat maxwidth50" name="search_account" value="' . dol_escape_htmltag($search_account) . '"></td>';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<td class="liste_titre center"><input type="text" class="flat maxwidth50" name="search_account" value="' . dol_escape_htmltag($search_account) . '"></td>';
|
||||
print '<td class="liste_titre center">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@ -339,17 +339,17 @@ if ($result) {
|
||||
print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("InvoiceLabel", $_SERVER["PHP_SELF"], "f.libelle", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "f.datef, f.ref, l.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "f.datef, f.ref, l.rowid", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("ProductRef", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
|
||||
//print_liste_field_titre("ProductLabel", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "l.total_ht", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "l.total_ht", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
$checkpicto=$form->showCheckAddButtons();
|
||||
print_liste_field_titre($checkpicto, '', '', '', '', 'align="center"');
|
||||
print_liste_field_titre($checkpicto, '', '', '', '', '', '', '', 'center ');
|
||||
print "</tr>\n";
|
||||
|
||||
$facturefournisseur_static = new FactureFournisseur($db);
|
||||
@ -380,7 +380,7 @@ if ($result) {
|
||||
print $objp->invoice_label;
|
||||
print '</td>';
|
||||
|
||||
print '<td align="center">' . dol_print_date($db->jdate($objp->datef), 'day') . '</td>';
|
||||
print '<td class="center">' . dol_print_date($db->jdate($objp->datef), 'day') . '</td>';
|
||||
|
||||
// Ref product
|
||||
print '<td>';
|
||||
@ -404,7 +404,7 @@ if ($result) {
|
||||
|
||||
print '<td>' . $objp->tva_intra . '</td>';
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $codecompta . ' <a href="./card.php?id=' . $objp->rowid . '&backtopage='.urlencode($_SERVER["PHP_SELF"].($param?'?'.$param:'')) . '">';
|
||||
print img_edit();
|
||||
print '</a></td>';
|
||||
|
||||
@ -392,7 +392,7 @@ if ($result) {
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_tvaintra" value="' . dol_escape_htmltag($search_tvaintra) . '"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td align="center" class="liste_titre">';
|
||||
print '<td class="center liste_titre">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@ -402,19 +402,19 @@ if ($result) {
|
||||
print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("InvoiceLabel", $_SERVER["PHP_SELF"], "f.libelle", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "f.datef, f.ref, l.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "f.datef, f.ref, l.rowid", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("ProductRef", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
|
||||
//print_liste_field_titre("ProductLabel", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "l.total_ht", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "l.total_ht", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("AccountAccountingSuggest", '', '', '', '', 'align="center"');
|
||||
print_liste_field_titre("IntoAccount", '', '', '', '', 'align="center"');
|
||||
print_liste_field_titre("AccountAccountingSuggest", '', '', '', '', '', '', '', 'center ');
|
||||
print_liste_field_titre("IntoAccount", '', '', '', '', '', '', '', 'center ');
|
||||
$checkpicto='';
|
||||
if ($massactionbutton) $checkpicto=$form->showCheckAddButtons('checkforselect', 1);
|
||||
print_liste_field_titre($checkpicto, '', '', '', '', 'align="center"');
|
||||
print_liste_field_titre($checkpicto, '', '', '', '', '', '', '', 'center ');
|
||||
print "</tr>\n";
|
||||
|
||||
$facturefourn_static = new FactureFournisseur($db);
|
||||
@ -475,7 +475,7 @@ if ($result) {
|
||||
print $objp->invoice_label;
|
||||
print '</td>';
|
||||
|
||||
print '<td align="center">' . dol_print_date($db->jdate($objp->datef), 'day') . '</td>';
|
||||
print '<td class="center">' . dol_print_date($db->jdate($objp->datef), 'day') . '</td>';
|
||||
|
||||
// Ref product
|
||||
print '<td>';
|
||||
@ -506,7 +506,7 @@ if ($result) {
|
||||
print '<td>' . $objp->tva_intra . '</td>';
|
||||
|
||||
// Current account
|
||||
print '<td align="center" style="' . $code_buy_p_notset . '">';
|
||||
print '<td class="center" style="' . $code_buy_p_notset . '">';
|
||||
print (($objp->type_l == 1)?$langs->trans("DefaultForService"):$langs->trans("DefaultForProduct")) . ' = ' . ($objp->code_buy_l > 0 ? length_accountg($objp->code_buy_l) : $langs->trans("Unknown"));
|
||||
if ($objp->product_id > 0)
|
||||
{
|
||||
@ -516,12 +516,12 @@ if ($result) {
|
||||
print '</td>';
|
||||
|
||||
// Suggested accounting account
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone');
|
||||
print '</td>';
|
||||
|
||||
// Column with checkbox
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<input type="checkbox" class="flat checkforselect checkforselect'.$objp->rowid.'" name="toselect[]" value="' . $objp->rowid . "_" . $i . '"' . ($objp->aarowid ? "checked" : "") . '/>';
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -1281,9 +1281,12 @@ class Adherent extends CommonObject
|
||||
$this->public = $obj->public;
|
||||
|
||||
$this->datec = $this->db->jdate($obj->datec);
|
||||
$this->date_creation = $this->db->jdate($obj->datec);
|
||||
$this->datem = $this->db->jdate($obj->datem);
|
||||
$this->date_modification= $this->db->jdate($obj->datem);
|
||||
$this->datefin = $this->db->jdate($obj->datefin);
|
||||
$this->datevalid = $this->db->jdate($obj->datev);
|
||||
$this->date_validation = $this->db->jdate($obj->datev);
|
||||
$this->birth = $this->db->jdate($obj->birthday);
|
||||
|
||||
$this->note_private = $obj->note_private;
|
||||
|
||||
@ -1562,12 +1562,12 @@ else
|
||||
|
||||
print '<tr class="liste_titre'.($cursorline?' liste_titre_add':'').'">';
|
||||
print '<td>'.$langs->trans("ServiceNb", $cursorline).'</td>';
|
||||
print '<td width="80" align="center">'.$langs->trans("VAT").'</td>';
|
||||
print '<td width="80" class="center">'.$langs->trans("VAT").'</td>';
|
||||
print '<td width="80" class="right">'.$langs->trans("PriceUHT").'</td>';
|
||||
if (!empty($conf->multicurrency->enabled)) {
|
||||
print '<td width="80" class="right">'.$langs->trans("PriceUHTCurrency").'</td>';
|
||||
}
|
||||
print '<td width="30" align="center">'.$langs->trans("Qty").'</td>';
|
||||
print '<td width="30" class="center">'.$langs->trans("Qty").'</td>';
|
||||
if ($conf->global->PRODUCT_USE_UNITS) print '<td width="30" class="left">'.$langs->trans("Unit").'</td>';
|
||||
print '<td width="50" class="right">'.$langs->trans("ReductionShort").'</td>';
|
||||
if (! empty($conf->margin->enabled) && ! empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) print '<td width="50" class="right">'.$langs->trans("BuyingPrice").'</td>';
|
||||
@ -1614,7 +1614,7 @@ else
|
||||
print '<td>'.img_object($langs->trans("ShowProductOrService"), ($objp->product_type ? 'service' : 'product')).' '.dol_htmlentitiesbr($objp->description)."</td>\n";
|
||||
}
|
||||
// TVA
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print vatrate($objp->tva_tx.($objp->vat_src_code?(' ('.$objp->vat_src_code.')'):''), '%', $objp->info_bits);
|
||||
print '</td>';
|
||||
// Price
|
||||
@ -1624,7 +1624,7 @@ else
|
||||
print '<td class="linecoluht_currency nowrap right">'.price($objp->multicurrency_subprice).'</td>';
|
||||
}
|
||||
// Quantite
|
||||
print '<td align="center">'.$objp->qty.'</td>';
|
||||
print '<td class="center">'.$objp->qty.'</td>';
|
||||
// Unit
|
||||
if($conf->global->PRODUCT_USE_UNITS) print '<td class="left">'.$langs->trans($object->lines[$cursorline-1]->getLabelOfUnit()).'</td>';
|
||||
// Remise
|
||||
@ -1638,7 +1638,7 @@ else
|
||||
}
|
||||
|
||||
// Margin
|
||||
if (! empty($conf->margin->enabled) && ! empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) print '<td align="right" class="nowrap">'.price($objp->pa_ht).'</td>';
|
||||
if (! empty($conf->margin->enabled) && ! empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) print '<td class="right nowrap">'.price($objp->pa_ht).'</td>';
|
||||
|
||||
// Icon move, update et delete (statut contrat 0=brouillon,1=valide,2=ferme)
|
||||
print '<td class="nowrap right">';
|
||||
@ -1750,7 +1750,7 @@ else
|
||||
print $form->load_tva("eltva_tx", $objp->tva_tx.($objp->vat_src_code?(' ('.$objp->vat_src_code.')'):''), $mysoc, $object->thirdparty, $objp->fk_product, $objp->info_bits, $objp->product_type, 0, 1);
|
||||
print '</td>';
|
||||
print '<td class="right"><input size="5" type="text" name="elprice" value="'.price($objp->subprice).'"></td>';
|
||||
print '<td align="center"><input size="2" type="text" name="elqty" value="'.$objp->qty.'"></td>';
|
||||
print '<td class="center"><input size="2" type="text" name="elqty" value="'.$objp->qty.'"></td>';
|
||||
if ($conf->global->PRODUCT_USE_UNITS)
|
||||
{
|
||||
print '<td class="left">';
|
||||
@ -1764,7 +1764,7 @@ else
|
||||
if ($objp->fk_product) print '<select id="fournprice" name="fournprice"></select>';
|
||||
print '<input id="buying_price" type="text" size="5" name="buying_price" value="'.price($objp->pa_ht, 0, '', 0).'"></td>';
|
||||
}
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Modify").'">';
|
||||
print '<br><input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</td>';
|
||||
@ -1930,7 +1930,7 @@ else
|
||||
if (! empty($objp->comment)) print " - ".$objp->comment;
|
||||
print '</td>';
|
||||
|
||||
print '<td align="center"> </td>';
|
||||
print '<td class="center"> </td>';
|
||||
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
|
||||
@ -197,7 +197,7 @@ foreach($listofstatus as $status)
|
||||
}
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
{
|
||||
print '<tr class="impair"><td align="center" colspan="2">';
|
||||
print '<tr class="impair"><td class="center" colspan="2">';
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
||||
$dolgraph = new DolGraph();
|
||||
@ -331,9 +331,9 @@ if ($result)
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("LastContracts", 5).'</th>';
|
||||
print '<th align="center">'.$langs->trans("DateModification").'</th>';
|
||||
print '<th class="center">'.$langs->trans("DateModification").'</th>';
|
||||
//print '<th class="left">'.$langs->trans("Status").'</th>';
|
||||
print '<th align="center" width="80" colspan="4">'.$langs->trans("Services").'</th>';
|
||||
print '<th class="center" width="80" colspan="4">'.$langs->trans("Services").'</th>';
|
||||
print "</tr>\n";
|
||||
|
||||
while ($i < $num)
|
||||
@ -352,7 +352,7 @@ if ($result)
|
||||
$staticcompany->name=$obj->name;
|
||||
print $staticcompany->getNomUrl(1, '', 20);
|
||||
print '</td>';
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->tms), 'dayhour').'</td>';
|
||||
print '<td class="center">'.dol_print_date($db->jdate($obj->tms), 'dayhour').'</td>';
|
||||
//print '<td class="left">'.$staticcontrat->LibStatut($obj->statut,2).'</td>';
|
||||
print '<td class="right" width="32">'.($obj->nb_initial>0 ? $obj->nb_initial.$staticcontratligne->LibStatut(0, 3):'').'</td>';
|
||||
print '<td class="right" width="32">'.($obj->nb_running>0 ? $obj->nb_running.$staticcontratligne->LibStatut(4, 3, 0):'').'</td>';
|
||||
|
||||
@ -498,14 +498,14 @@ if (! empty($arrayfields['state.nom']['checked']))
|
||||
// Country
|
||||
if (! empty($arrayfields['country.code_iso']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<td class="liste_titre center">';
|
||||
print $form->select_country($search_country, 'search_country', '', 0, 'minwidth100imp maxwidth100');
|
||||
print '</td>';
|
||||
}
|
||||
// Company type
|
||||
if (! empty($arrayfields['typent.code']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre maxwidthonsmartphone" align="center">';
|
||||
print '<td class="liste_titre maxwidthonsmartphone center">';
|
||||
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT));
|
||||
print '</td>';
|
||||
}
|
||||
@ -547,7 +547,7 @@ if (! empty($arrayfields['c.tms']['checked']))
|
||||
// First end date
|
||||
if (! empty($arrayfields['lower_planned_end_date']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre nowraponall" align="center">';
|
||||
print '<td class="liste_titre nowraponall center">';
|
||||
$arrayofoperators=array('0'=>'','='=>'=','<='=>'<=','>='=>'>=');
|
||||
print $form->selectarray('search_op2df', $arrayofoperators, $search_op2df, 0);
|
||||
print '</br>';
|
||||
@ -561,7 +561,7 @@ if (! empty($arrayfields['status']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre right" colspan="4"></td>';
|
||||
}
|
||||
print '<td class="liste_titre" align="middle">';
|
||||
print '<td class="liste_titre center">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@ -576,27 +576,32 @@ if (! empty($arrayfields['s.email']['checked'])) print_liste_field_t
|
||||
if (! empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (! empty($arrayfields['sale_representative']['checked'])) print_liste_field_titre($arrayfields['sale_representative']['label'], $_SERVER["PHP_SELF"], "", "", "$param", '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['c.date_contrat']['checked'])) print_liste_field_titre($arrayfields['c.date_contrat']['label'], $_SERVER["PHP_SELF"], "c.date_contrat", "", "$param", 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['c.date_contrat']['checked'])) print_liste_field_titre($arrayfields['c.date_contrat']['label'], $_SERVER["PHP_SELF"], "c.date_contrat", "", "$param", '', $sortfield, $sortorder, 'center ');
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||
// Hook fields
|
||||
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (! empty($arrayfields['c.datec']['checked'])) print_liste_field_titre($arrayfields['c.datec']['label'], $_SERVER["PHP_SELF"], "c.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['c.tms']['checked'])) print_liste_field_titre($arrayfields['c.tms']['label'], $_SERVER["PHP_SELF"], "c.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['lower_planned_end_date']['checked'])) print_liste_field_titre($arrayfields['lower_planned_end_date']['label'], $_SERVER["PHP_SELF"], "lower_planned_end_date", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['status']['checked']))
|
||||
{
|
||||
if (! empty($arrayfields['c.datec']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['c.datec']['label'], $_SERVER["PHP_SELF"], "c.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||
}
|
||||
if (! empty($arrayfields['c.tms']['checked'])){
|
||||
print_liste_field_titre($arrayfields['c.tms']['label'], $_SERVER["PHP_SELF"], "c.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||
}
|
||||
if (! empty($arrayfields['lower_planned_end_date']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['lower_planned_end_date']['label'], $_SERVER["PHP_SELF"], "lower_planned_end_date", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||
}
|
||||
if (! empty($arrayfields['status']['checked'])) {
|
||||
print_liste_field_titre($staticcontratligne->LibStatut(0, 3), '', '', '', '', 'width="16"');
|
||||
print_liste_field_titre($staticcontratligne->LibStatut(4, 3, 0), '', '', '', '', 'width="16"');
|
||||
print_liste_field_titre($staticcontratligne->LibStatut(4, 3, 1), '', '', '', '', 'width="16"');
|
||||
print_liste_field_titre($staticcontratligne->LibStatut(5, 3), '', '', '', '', 'width="16"');
|
||||
}
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
while ($i < min($num, $limit))
|
||||
@ -608,8 +613,7 @@ while ($i < min($num, $limit))
|
||||
$contracttmp->ref_customer=$obj->ref_customer;
|
||||
$contracttmp->ref_supplier=$obj->ref_supplier;
|
||||
|
||||
if ($obj->socid > 0)
|
||||
{
|
||||
if ($obj->socid > 0) {
|
||||
$result=$socstatic->fetch($obj->socid);
|
||||
}
|
||||
|
||||
@ -619,8 +623,7 @@ while ($i < min($num, $limit))
|
||||
print '<td class="nowrap">';
|
||||
print $contracttmp->getNomUrl(1);
|
||||
if ($obj->nb_late) print img_warning($langs->trans("Late"));
|
||||
if (!empty($obj->note_private) || !empty($obj->note_public))
|
||||
{
|
||||
if (!empty($obj->note_private) || !empty($obj->note_public)) {
|
||||
print ' <span class="note">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/contrat/note.php?id='.$obj->rowid.'&save_lastsearch_values=1">'.img_picto($langs->trans("ViewPrivateNote"), 'note').'</a>';
|
||||
print '</span>';
|
||||
@ -681,7 +684,7 @@ while ($i < min($num, $limit))
|
||||
// Country
|
||||
if (! empty($arrayfields['country.code_iso']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
$tmparray=getCountry($obj->fk_pays, 'all');
|
||||
print $tmparray['label'];
|
||||
print '</td>';
|
||||
@ -690,7 +693,7 @@ while ($i < min($num, $limit))
|
||||
// Type ent
|
||||
if (! empty($arrayfields['typent.code']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if (count($typenArray)==0) $typenArray = $formcompany->typent_array(1);
|
||||
print $typenArray[$obj->typent_code];
|
||||
print '</td>';
|
||||
@ -705,8 +708,8 @@ while ($i < min($num, $limit))
|
||||
$listsalesrepresentatives=$socstatic->getSalesRepresentatives($user);
|
||||
if ($listsalesrepresentatives < 0) dol_print_error($db);
|
||||
$nbofsalesrepresentative=count($listsalesrepresentatives);
|
||||
if ($nbofsalesrepresentative > 3) // We print only number
|
||||
{
|
||||
if ($nbofsalesrepresentative > 3) {
|
||||
// We print only number
|
||||
print '<a href="'.DOL_URL_ROOT.'/societe/commerciaux.php?socid='.$socstatic->id.'">';
|
||||
print $nbofsalesrepresentative;
|
||||
print '</a>';
|
||||
@ -743,7 +746,7 @@ while ($i < min($num, $limit))
|
||||
// Date
|
||||
if (! empty($arrayfields['c.date_contrat']['checked']))
|
||||
{
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->date_contrat), 'day', 'tzuser').'</td>';
|
||||
print '<td class="center">'.dol_print_date($db->jdate($obj->date_contrat), 'day', 'tzuser').'</td>';
|
||||
}
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
@ -754,7 +757,7 @@ while ($i < min($num, $limit))
|
||||
// Date creation
|
||||
if (! empty($arrayfields['c.datec']['checked']))
|
||||
{
|
||||
print '<td align="center" class="nowrap">';
|
||||
print '<td class="center nowrap">';
|
||||
print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@ -762,7 +765,7 @@ while ($i < min($num, $limit))
|
||||
// Date modification
|
||||
if (! empty($arrayfields['c.tms']['checked']))
|
||||
{
|
||||
print '<td align="center" class="nowrap">';
|
||||
print '<td class="center nowrap">';
|
||||
print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@ -770,7 +773,7 @@ while ($i < min($num, $limit))
|
||||
// Date lower end date
|
||||
if (! empty($arrayfields['lower_planned_end_date']['checked']))
|
||||
{
|
||||
print '<td align="center" class="nowrapforall">';
|
||||
print '<td class="center nowrapforall">';
|
||||
print dol_print_date($db->jdate($obj->lower_planned_end_date), 'day', 'tzuser');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@ -778,13 +781,13 @@ while ($i < min($num, $limit))
|
||||
// Status
|
||||
if (! empty($arrayfields['status']['checked']))
|
||||
{
|
||||
print '<td align="center">'.($obj->nb_initial>0?$obj->nb_initial:'').'</td>';
|
||||
print '<td align="center">'.($obj->nb_running>0?$obj->nb_running:'').'</td>';
|
||||
print '<td align="center">'.($obj->nb_expired>0?$obj->nb_expired:'').'</td>';
|
||||
print '<td align="center">'.($obj->nb_closed>0 ?$obj->nb_closed:'').'</td>';
|
||||
print '<td class="center">'.($obj->nb_initial>0?$obj->nb_initial:'').'</td>';
|
||||
print '<td class="center">'.($obj->nb_running>0?$obj->nb_running:'').'</td>';
|
||||
print '<td class="center">'.($obj->nb_expired>0?$obj->nb_expired:'').'</td>';
|
||||
print '<td class="center">'.($obj->nb_closed>0 ?$obj->nb_closed:'').'</td>';
|
||||
}
|
||||
// Action column
|
||||
print '<td class="nowrap" align="center">';
|
||||
print '<td class="nowrap center">';
|
||||
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
{
|
||||
$selected=0;
|
||||
|
||||
@ -376,26 +376,26 @@ print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"")
|
||||
print '<tr class="liste_titre">';
|
||||
if (! empty($arrayfields['c.ref']['checked'])) print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref", "", $param, "", $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['p.description']['checked'])) print_liste_field_titre($arrayfields['p.description']['label'], $_SERVER["PHP_SELF"], "p.description", "", $param, "", $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['cd.qty']['checked'])) print_liste_field_titre($arrayfields['cd.qty']['label'], $_SERVER["PHP_SELF"], "cd.qty", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['cd.total_ht']['checked'])) print_liste_field_titre($arrayfields['cd.total_ht']['label'], $_SERVER["PHP_SELF"], "cd.total_ht", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['cd.total_tva']['checked'])) print_liste_field_titre($arrayfields['cd.total_tva']['label'], $_SERVER["PHP_SELF"], "cd.total_tva", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['cd.tva_tx']['checked'])) print_liste_field_titre($arrayfields['cd.tva_tx']['label'], $_SERVER["PHP_SELF"], "cd.tva_tx", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['cd.subprice']['checked'])) print_liste_field_titre($arrayfields['cd.subprice']['label'], $_SERVER["PHP_SELF"], "cd.subprice", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['cd.qty']['checked'])) print_liste_field_titre($arrayfields['cd.qty']['label'], $_SERVER["PHP_SELF"], "cd.qty", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||
if (! empty($arrayfields['cd.total_ht']['checked'])) print_liste_field_titre($arrayfields['cd.total_ht']['label'], $_SERVER["PHP_SELF"], "cd.total_ht", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||
if (! empty($arrayfields['cd.total_tva']['checked'])) print_liste_field_titre($arrayfields['cd.total_tva']['label'], $_SERVER["PHP_SELF"], "cd.total_tva", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||
if (! empty($arrayfields['cd.tva_tx']['checked'])) print_liste_field_titre($arrayfields['cd.tva_tx']['label'], $_SERVER["PHP_SELF"], "cd.tva_tx", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||
if (! empty($arrayfields['cd.subprice']['checked'])) print_liste_field_titre($arrayfields['cd.subprice']['label'], $_SERVER["PHP_SELF"], "cd.subprice", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||
if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['cd.date_ouverture_prevue']['checked'])) print_liste_field_titre($arrayfields['cd.date_ouverture_prevue']['label'], $_SERVER["PHP_SELF"], "cd.date_ouverture_prevue", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['cd.date_ouverture']['checked'])) print_liste_field_titre($arrayfields['cd.date_ouverture']['label'], $_SERVER["PHP_SELF"], "cd.date_ouverture", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['cd.date_fin_validite']['checked'])) print_liste_field_titre($arrayfields['cd.date_fin_validite']['label'], $_SERVER["PHP_SELF"], "cd.date_fin_validite", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['cd.date_cloture']['checked'])) print_liste_field_titre($arrayfields['cd.date_cloture']['label'], $_SERVER["PHP_SELF"], "cd.date_cloture", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['cd.date_ouverture_prevue']['checked'])) print_liste_field_titre($arrayfields['cd.date_ouverture_prevue']['label'], $_SERVER["PHP_SELF"], "cd.date_ouverture_prevue", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (! empty($arrayfields['cd.date_ouverture']['checked'])) print_liste_field_titre($arrayfields['cd.date_ouverture']['label'], $_SERVER["PHP_SELF"], "cd.date_ouverture", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (! empty($arrayfields['cd.date_fin_validite']['checked'])) print_liste_field_titre($arrayfields['cd.date_fin_validite']['label'], $_SERVER["PHP_SELF"], "cd.date_fin_validite", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (! empty($arrayfields['cd.date_cloture']['checked'])) print_liste_field_titre($arrayfields['cd.date_cloture']['label'], $_SERVER["PHP_SELF"], "cd.date_cloture", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||
// Hook fields
|
||||
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (! empty($arrayfields['cd.datec']['checked'])) print_liste_field_titre($arrayfields['cd.datec']['label'], $_SERVER["PHP_SELF"], "cd.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['cd.tms']['checked'])) print_liste_field_titre($arrayfields['cd.tms']['label'], $_SERVER["PHP_SELF"], "cd.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['cd.datec']['checked'])) print_liste_field_titre($arrayfields['cd.datec']['label'], $_SERVER["PHP_SELF"], "cd.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||
if (! empty($arrayfields['cd.tms']['checked'])) print_liste_field_titre($arrayfields['cd.tms']['label'], $_SERVER["PHP_SELF"], "cd.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||
if (! empty($arrayfields['status']['checked'])) print_liste_field_titre($arrayfields['status']['label'], $_SERVER["PHP_SELF"], "cd.statut,c.statut", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
@ -451,7 +451,7 @@ if (! empty($arrayfields['s.nom']['checked']))
|
||||
|
||||
if (! empty($arrayfields['cd.date_ouverture_prevue']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<td class="liste_titre center">';
|
||||
$arrayofoperators=array('<'=>'<','>'=>'>');
|
||||
print $form->selectarray('filter_opouvertureprevue', $arrayofoperators, $filter_opouvertureprevue, 1);
|
||||
print ' ';
|
||||
@ -461,7 +461,7 @@ if (! empty($arrayfields['cd.date_ouverture_prevue']['checked']))
|
||||
}
|
||||
if (! empty($arrayfields['cd.date_ouverture']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<td class="liste_titre center">';
|
||||
$arrayofoperators=array('<'=>'<','>'=>'>');
|
||||
print $form->selectarray('filter_op1', $arrayofoperators, $filter_op1, 1);
|
||||
print ' ';
|
||||
@ -471,7 +471,7 @@ if (! empty($arrayfields['cd.date_ouverture']['checked']))
|
||||
}
|
||||
if (! empty($arrayfields['cd.date_fin_validite']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<td class="liste_titre center">';
|
||||
$arrayofoperators=array('<'=>'<','>'=>'>');
|
||||
print $form->selectarray('filter_op2', $arrayofoperators, $filter_op2, 1);
|
||||
print ' ';
|
||||
@ -481,7 +481,7 @@ if (! empty($arrayfields['cd.date_fin_validite']['checked']))
|
||||
}
|
||||
if (! empty($arrayfields['cd.date_cloture']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<td class="liste_titre center">';
|
||||
$arrayofoperators=array('<'=>'<','>'=>'>');
|
||||
print $form->selectarray('filter_opcloture', $arrayofoperators, $filter_opcloture, 1);
|
||||
print ' ';
|
||||
@ -639,7 +639,7 @@ while ($i < min($num, $limit))
|
||||
// Start date
|
||||
if (! empty($arrayfields['cd.date_ouverture_prevue']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print ($obj->date_ouverture_prevue?dol_print_date($db->jdate($obj->date_ouverture_prevue), 'dayhour'):' ');
|
||||
if ($db->jdate($obj->date_ouverture_prevue) && ($db->jdate($obj->date_ouverture_prevue) < ($now - $conf->contrat->services->inactifs->warning_delay)) && $obj->statut == 0)
|
||||
print ' '.img_picto($langs->trans("Late"), "warning");
|
||||
@ -649,13 +649,13 @@ while ($i < min($num, $limit))
|
||||
}
|
||||
if (! empty($arrayfields['cd.date_ouverture']['checked']))
|
||||
{
|
||||
print '<td align="center">'.($obj->date_ouverture?dol_print_date($db->jdate($obj->date_ouverture), 'dayhour'):' ').'</td>';
|
||||
print '<td class="center">'.($obj->date_ouverture?dol_print_date($db->jdate($obj->date_ouverture), 'dayhour'):' ').'</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// End date
|
||||
if (! empty($arrayfields['cd.date_fin_validite']['checked']))
|
||||
{
|
||||
print '<td align="center">'.($obj->date_fin_validite?dol_print_date($db->jdate($obj->date_fin_validite), 'dayhour'):' ');
|
||||
print '<td class="center">'.($obj->date_fin_validite?dol_print_date($db->jdate($obj->date_fin_validite), 'dayhour'):' ');
|
||||
if ($obj->date_fin_validite && $db->jdate($obj->date_fin_validite) < ($now - $conf->contrat->services->expires->warning_delay) && $obj->statut < 5)
|
||||
{
|
||||
$warning_delay=$conf->contrat->services->expires->warning_delay / 3600 / 24;
|
||||
@ -669,7 +669,7 @@ while ($i < min($num, $limit))
|
||||
// Close date (real end date)
|
||||
if (! empty($arrayfields['cd.date_cloture']['checked']))
|
||||
{
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->date_cloture), 'dayhour').'</td>';
|
||||
print '<td class="center">'.dol_print_date($db->jdate($obj->date_cloture), 'dayhour').'</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
@ -682,7 +682,7 @@ while ($i < min($num, $limit))
|
||||
// Date creation
|
||||
if (! empty($arrayfields['cd.datec']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@ -690,7 +690,7 @@ while ($i < min($num, $limit))
|
||||
// Date modification
|
||||
if (! empty($arrayfields['cd.tms']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@ -711,7 +711,7 @@ while ($i < min($num, $limit))
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Action column
|
||||
print '<td class="nowrap" align="center">';
|
||||
print '<td class="nowrap center">';
|
||||
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
{
|
||||
$selected=0;
|
||||
|
||||
@ -50,7 +50,7 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
||||
<td><?php echo $langs->trans("Contract"); ?></td>
|
||||
<td><?php echo $objectlink->getNomUrl(1); ?></td>
|
||||
<td></td>
|
||||
<td align="center"><?php echo dol_print_date($objectlink->date_contrat, 'day'); ?></td>
|
||||
<td class="center"><?php echo dol_print_date($objectlink->date_contrat, 'day'); ?></td>
|
||||
<td class="right"><?php
|
||||
// Price of contract is not shown by default because a contract is a list of service with
|
||||
// start and end date that change with time andd that may be different that the period of reference for price.
|
||||
|
||||
@ -678,6 +678,7 @@ class Don extends CommonObject
|
||||
$this->date_creation = $this->db->jdate($obj->datec);
|
||||
$this->datec = $this->db->jdate($obj->datec);
|
||||
$this->date_validation = $this->db->jdate($obj->date_valid);
|
||||
$this->date_valid = $this->db->jdate($obj->date_valid);
|
||||
$this->date_modification = $this->db->jdate($obj->datem);
|
||||
$this->datem = $this->db->jdate($obj->datem);
|
||||
$this->date = $this->db->jdate($obj->datedon);
|
||||
@ -703,7 +704,7 @@ class Don extends CommonObject
|
||||
$this->mode_reglement_id = $obj->fk_payment;
|
||||
$this->mode_reglement_code= $obj->payment_code;
|
||||
$this->mode_reglement = $obj->payment_label;
|
||||
$this->paid = $obj->paid;
|
||||
$this->paid = $obj->paid;
|
||||
$this->amount = $obj->amount;
|
||||
$this->note_private = $obj->note_private;
|
||||
$this->note_public = $obj->note_public;
|
||||
|
||||
@ -54,4 +54,5 @@ Paymentnumpad=Payment Num Pad
|
||||
Numberspad=Numbers Pad
|
||||
BillsCoinsPad=Bills and Coins Pad
|
||||
DolistorePosCategory=TakePOS modules and other POS solutions for Dolibarr
|
||||
TakeposNeedsCategories=TakePOS needs product categories to work
|
||||
TakeposNeedsCategories=TakePOS needs product categories to work
|
||||
OrderNotes=Order Notes
|
||||
@ -459,7 +459,7 @@ else
|
||||
|
||||
// Client
|
||||
print '<tr><td width="20%">'.$langs->trans("Customer").'</td>';
|
||||
print '<td align="3">'.$soc->getNomUrl(1).'</td>';
|
||||
print '<td colspan="3">'.$soc->getNomUrl(1).'</td>';
|
||||
print "</tr>";
|
||||
*/
|
||||
|
||||
@ -496,7 +496,7 @@ else
|
||||
print $langs->trans('DateReceived');
|
||||
print '</td>';
|
||||
|
||||
if ($action != 'editdate_livraison') print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdate_livraison&id='.$object->id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).'</a></td>';
|
||||
if ($action != 'editdate_livraison') print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdate_livraison&id='.$object->id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="2">';
|
||||
if ($action == 'editdate_livraison')
|
||||
@ -521,7 +521,7 @@ else
|
||||
print '<tr><td>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||
print $langs->trans('IncotermLabel');
|
||||
print '<td><td align="right">';
|
||||
print '<td><td class="right">';
|
||||
if ($user->rights->expedition->livraison->creer) print '<a href="'.DOL_URL_ROOT.'/livraison/card.php?id='.$object->id.'&action=editincoterm">'.img_edit().'</a>';
|
||||
else print ' ';
|
||||
print '</td></tr></table>';
|
||||
@ -598,8 +598,8 @@ else
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Products").'</td>';
|
||||
print '<td align="center">'.$langs->trans("QtyOrdered").'</td>';
|
||||
print '<td align="center">'.$langs->trans("QtyReceived").'</td>';
|
||||
print '<td class="center">'.$langs->trans("QtyOrdered").'</td>';
|
||||
print '<td class="center">'.$langs->trans("QtyReceived").'</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
while ($i < $num_prod)
|
||||
@ -662,8 +662,8 @@ else
|
||||
print "</td>\n";
|
||||
}
|
||||
|
||||
print '<td align="center">'.$object->lines[$i]->qty_asked.'</td>';
|
||||
print '<td align="center">'.$object->lines[$i]->qty_shipped.'</td>';
|
||||
print '<td class="center">'.$object->lines[$i]->qty_asked.'</td>';
|
||||
print '<td class="center">'.$object->lines[$i]->qty_shipped.'</td>';
|
||||
|
||||
print "</tr>";
|
||||
|
||||
|
||||
@ -304,7 +304,7 @@ if ($action == 'create')
|
||||
|
||||
// insurance amount
|
||||
print '<tr><td>'.$langs->trans("Insurance").'</td><td><input name="insurance_amount" size="10" value="' . dol_escape_htmltag(GETPOST("insurance_amount")) . '" placeholder="'.$langs->trans('Amount').'"></td></tr>';
|
||||
|
||||
|
||||
// Project
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
@ -499,7 +499,7 @@ if ($id > 0)
|
||||
{
|
||||
print '<tr><td class="titlefield">'.$langs->trans("LoanCapital").'</td><td>'.price($object->capital, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
// Insurance
|
||||
if ($action == 'edit')
|
||||
{
|
||||
@ -712,9 +712,9 @@ if ($id > 0)
|
||||
print '<td>'.$langs->trans("RefPayment").'</td>';
|
||||
print '<td>'.$langs->trans("Date").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Insurance").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Interest").'</td>';
|
||||
print '<td align="right">'.$langs->trans("LoanCapital").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Insurance").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Interest").'</td>';
|
||||
print '<td class="right">'.$langs->trans("LoanCapital").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
while ($i < $num)
|
||||
@ -725,9 +725,9 @@ if ($id > 0)
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/loan/payment/card.php?id='.$objp->rowid.'">'.img_object($langs->trans("Payment"), "payment").' '.$objp->rowid.'</a></td>';
|
||||
print '<td>'.dol_print_date($db->jdate($objp->dp), 'day')."</td>\n";
|
||||
print "<td>".$objp->paiement_type.' '.$objp->num_payment."</td>\n";
|
||||
print '<td align="right">'.price($objp->amount_insurance, 0, $outputlangs, 1, -1, -1, $conf->currency)."</td>\n";
|
||||
print '<td align="right">'.price($objp->amount_interest, 0, $outputlangs, 1, -1, -1, $conf->currency)."</td>\n";
|
||||
print '<td align="right">'.price($objp->amount_capital, 0, $outputlangs, 1, -1, -1, $conf->currency)."</td>\n";
|
||||
print '<td class="right">'.price($objp->amount_insurance, 0, $outputlangs, 1, -1, -1, $conf->currency)."</td>\n";
|
||||
print '<td class="right">'.price($objp->amount_interest, 0, $outputlangs, 1, -1, -1, $conf->currency)."</td>\n";
|
||||
print '<td class="right">'.price($objp->amount_capital, 0, $outputlangs, 1, -1, -1, $conf->currency)."</td>\n";
|
||||
print "</tr>";
|
||||
$total_capital += $objp->amount_capital;
|
||||
$i++;
|
||||
@ -737,13 +737,13 @@ if ($id > 0)
|
||||
|
||||
if ($object->paid == 0)
|
||||
{
|
||||
print '<tr><td colspan="5" align="right">'.$langs->trans("AlreadyPaid").' :</td><td align="right">'.price($totalpaid, 0, $langs, 0, 0, -1, $conf->currency).'</td></tr>';
|
||||
print '<tr><td colspan="5" align="right">'.$langs->trans("AmountExpected").' :</td><td align="right">'.price($object->capital, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>';
|
||||
print '<tr><td colspan="5" class="right">'.$langs->trans("AlreadyPaid").' :</td><td class="right">'.price($totalpaid, 0, $langs, 0, 0, -1, $conf->currency).'</td></tr>';
|
||||
print '<tr><td colspan="5" class="right">'.$langs->trans("AmountExpected").' :</td><td class="right">'.price($object->capital, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>';
|
||||
|
||||
$staytopay = $object->capital - $totalpaid;
|
||||
|
||||
print '<tr><td colspan="5" align="right">'.$langs->trans("RemainderToPay").' :</td>';
|
||||
print '<td align="right"'.($staytopay?' class="amountremaintopay"':'class="amountpaymentcomplete"').'>';
|
||||
print '<tr><td colspan="5" class="right">'.$langs->trans("RemainderToPay").' :</td>';
|
||||
print '<td class="right"'.($staytopay?' class="amountremaintopay"':'class="amountpaymentcomplete"').'>';
|
||||
print price($staytopay, 0, $langs, 0, 0, -1, $conf->currency);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ if ($action == 'updateecheancier') {
|
||||
$int = GETPOST('hi_interets'.$i);
|
||||
$id = GETPOST('hi_rowid'.$i);
|
||||
$insurance = GETPOST('hi_insurance'.$i);
|
||||
|
||||
|
||||
$echeance = new LoanSchedule($db);
|
||||
$echeance->fetch($id);
|
||||
$echeance->tms = dol_now();
|
||||
@ -148,18 +148,18 @@ print '<table class="border" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
$colspan = 6;
|
||||
if (count($echeance->lines)>0) $colspan++;
|
||||
print '<th align="center" colspan="'.$colspan.'">';
|
||||
print '<th class="center" colspan="'.$colspan.'">';
|
||||
print $langs->trans("FinancialCommitment");
|
||||
print '</th>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
Print '<th width="5%" align="center">'.$langs->trans("Term").'</th>';
|
||||
Print '<th width="5%" align="center">'.$langs->trans("Date").'</th>';
|
||||
print '<th width="15%" align="center">'.$langs->trans("Insurance");
|
||||
Print '<th width="15%" align="center">'.$langs->trans("InterestAmount").'</th>';
|
||||
Print '<th width="10%" align="center">'.$langs->trans("Amount").'</th>';
|
||||
Print '<th width="40%" align="center">'.$langs->trans("CapitalRemain");
|
||||
Print '<th width="5%" class="center">'.$langs->trans("Term").'</th>';
|
||||
Print '<th width="5%" class="center">'.$langs->trans("Date").'</th>';
|
||||
print '<th width="15%" class="center">'.$langs->trans("Insurance");
|
||||
Print '<th width="15%" class="center">'.$langs->trans("InterestAmount").'</th>';
|
||||
Print '<th width="10%" class="center">'.$langs->trans("Amount").'</th>';
|
||||
Print '<th width="40%" class="center">'.$langs->trans("CapitalRemain");
|
||||
print ' ('.price2num($object->capital).')';
|
||||
print '<input type="hidden" name="hi_capital0" id ="hi_capital0" value="'.$object->capital.'">';
|
||||
print '</th>';
|
||||
@ -180,12 +180,12 @@ if ($object->nbterm > 0 && count($echeance->lines)==0)
|
||||
$int = price2num($int, 'MT');
|
||||
$cap_rest = price2num($capital - ($mens-$int), 'MT');
|
||||
print '<tr>';
|
||||
print '<td align="center" id="n'.$i.'">' . $i .'</td>';
|
||||
print '<td align="center" id ="date' .$i .'"><input type="hidden" name="hi_date' .$i .'" id ="hi_date' .$i .'" value="' . dol_time_plus_duree($object->datestart, $i-1, 'm') . '">' . dol_print_date(dol_time_plus_duree($object->datestart, $i-1, 'm'), 'day') . '</td>';
|
||||
print '<td align="center" id="insurance'.$i.'">'.price($insurance+(($i == 1) ? $regulInsurance : 0), 0, '', 1).' €</td><input type="hidden" name="hi_insurance' .$i .'" id ="hi_insurance' .$i .'" value="' . ($insurance+(($i == 1) ? $regulInsurance : 0)) . '">';
|
||||
print '<td align="center" id="interets'.$i.'">'.price($int, 0, '', 1).' €</td><input type="hidden" name="hi_interets' .$i .'" id ="hi_interets' .$i .'" value="' . $int . '">';
|
||||
print '<td align="center"><input name="mens'.$i.'" id="mens'.$i.'" size="5" value="'.$mens.'" ech="'.$i.'"> €</td>';
|
||||
print '<td align="center" id="capital'.$i.'">'.price($cap_rest).' €</td><input type="hidden" name="hi_capital' .$i .'" id ="hi_capital' .$i .'" value="' . $cap_rest . '">';
|
||||
print '<td class="center" id="n'.$i.'">' . $i .'</td>';
|
||||
print '<td class="center" id ="date' .$i .'"><input type="hidden" name="hi_date' .$i .'" id ="hi_date' .$i .'" value="' . dol_time_plus_duree($object->datestart, $i-1, 'm') . '">' . dol_print_date(dol_time_plus_duree($object->datestart, $i-1, 'm'), 'day') . '</td>';
|
||||
print '<td class="center" id="insurance'.$i.'">'.price($insurance+(($i == 1) ? $regulInsurance : 0), 0, '', 1).' €</td><input type="hidden" name="hi_insurance' .$i .'" id ="hi_insurance' .$i .'" value="' . ($insurance+(($i == 1) ? $regulInsurance : 0)) . '">';
|
||||
print '<td class="center" id="interets'.$i.'">'.price($int, 0, '', 1).' €</td><input type="hidden" name="hi_interets' .$i .'" id ="hi_interets' .$i .'" value="' . $int . '">';
|
||||
print '<td class="center"><input name="mens'.$i.'" id="mens'.$i.'" size="5" value="'.$mens.'" ech="'.$i.'"> €</td>';
|
||||
print '<td class="center" id="capital'.$i.'">'.price($cap_rest).' €</td><input type="hidden" name="hi_capital' .$i .'" id ="hi_capital' .$i .'" value="' . $cap_rest . '">';
|
||||
print '</tr>'."\n";
|
||||
$i++;
|
||||
$capital = $cap_rest;
|
||||
@ -203,18 +203,18 @@ elseif(count($echeance->lines)>0)
|
||||
$int = $line->amount_interest;
|
||||
$cap_rest = price2num($capital - ($mens-$int), 'MT');
|
||||
print '<tr>';
|
||||
print '<td align="center" id="n'.$i.'"><input type="hidden" name="hi_rowid' .$i .'" id ="hi_rowid' .$i .'" value="' . $line->id . '">' . $i .'</td>';
|
||||
print '<td align="center" id ="date' .$i .'"><input type="hidden" name="hi_date' .$i .'" id ="hi_date' .$i .'" value="' . $line->datep . '">' . dol_print_date($line->datep, 'day') . '</td>';
|
||||
print '<td align="center" id="insurance'.$i.'">'.price($insurance+(($i == 1) ? $regulInsurance : 0), 0, '', 1).' €</td><input type="hidden" name="hi_insurance' .$i .'" id ="hi_insurance' .$i .'" value="' . ($insurance+(($i == 1) ? $regulInsurance : 0)) . '">';
|
||||
print '<td align="center" id="interets'.$i.'">'.price($int, 0, '', 1).' €</td><input type="hidden" name="hi_interets' .$i .'" id ="hi_interets' .$i .'" value="' . $int . '">';
|
||||
print '<td class="center" id="n'.$i.'"><input type="hidden" name="hi_rowid' .$i .'" id ="hi_rowid' .$i .'" value="' . $line->id . '">' . $i .'</td>';
|
||||
print '<td class="center" id ="date' .$i .'"><input type="hidden" name="hi_date' .$i .'" id ="hi_date' .$i .'" value="' . $line->datep . '">' . dol_print_date($line->datep, 'day') . '</td>';
|
||||
print '<td class="center" id="insurance'.$i.'">'.price($insurance+(($i == 1) ? $regulInsurance : 0), 0, '', 1).' €</td><input type="hidden" name="hi_insurance' .$i .'" id ="hi_insurance' .$i .'" value="' . ($insurance+(($i == 1) ? $regulInsurance : 0)) . '">';
|
||||
print '<td class="center" id="interets'.$i.'">'.price($int, 0, '', 1).' €</td><input type="hidden" name="hi_interets' .$i .'" id ="hi_interets' .$i .'" value="' . $int . '">';
|
||||
if($line->datep > dol_now()){
|
||||
print '<td align="center"><input name="mens'.$i.'" id="mens'.$i.'" size="5" value="'.$mens.'" ech="'.$i.'"> €</td>';
|
||||
print '<td class="center"><input name="mens'.$i.'" id="mens'.$i.'" size="5" value="'.$mens.'" ech="'.$i.'"> €</td>';
|
||||
}else{
|
||||
print '<td align="center">' . price($mens) . ' €</td><input type="hidden" name="mens' .$i .'" id ="mens' .$i .'" value="' . $mens . '">';
|
||||
print '<td class="center">' . price($mens) . ' €</td><input type="hidden" name="mens' .$i .'" id ="mens' .$i .'" value="' . $mens . '">';
|
||||
}
|
||||
|
||||
print '<td align="center" id="capital'.$i.'">'.price($cap_rest).' €</td><input type="hidden" name="hi_capital' .$i .'" id ="hi_capital' .$i .'" value="' . $cap_rest . '">';
|
||||
print '<td align="center"><a class="butAction" href="'.DOL_URL_ROOT.'/loan/payment/payment.php?id='.$object->id.'&action=create">'.$langs->trans('DoPayment').'</a></td>';
|
||||
|
||||
print '<td class="center" id="capital'.$i.'">'.price($cap_rest).' €</td><input type="hidden" name="hi_capital' .$i .'" id ="hi_capital' .$i .'" value="' . $cap_rest . '">';
|
||||
print '<td class="center"><a class="butAction" href="'.DOL_URL_ROOT.'/loan/payment/payment.php?id='.$object->id.'&action=create">'.$langs->trans('DoPayment').'</a></td>';
|
||||
print '</tr>'."\n";
|
||||
$i++;
|
||||
$capital = $cap_rest;
|
||||
@ -224,7 +224,7 @@ elseif(count($echeance->lines)>0)
|
||||
print '</table>';
|
||||
print '</br>';
|
||||
print '</br>';
|
||||
print '<div align="center"><input class="button" type="submit" value="'.$langs->trans("Save").'"></div>';
|
||||
print '<div class="center"><input class="button" type="submit" value="'.$langs->trans("Save").'"></div>';
|
||||
print '</form>';
|
||||
|
||||
// End of page
|
||||
|
||||
@ -139,11 +139,11 @@ if ($resql)
|
||||
print '<tr class="liste_titre_filter">';
|
||||
print '<td class="liste_titre"><input class="flat" size="4" type="text" name="search_ref" value="'.$search_ref.'"></td>';
|
||||
print '<td class="liste_titre"><input class="flat" size="12" type="text" name="search_label" value="'.$search_label.'"></td>';
|
||||
print '<td class="liste_titre" align="right" ><input class="flat" size="8" type="text" name="search_amount" value="'.$search_amount.'"></td>';
|
||||
print '<td class="liste_titre right" ><input class="flat" size="8" type="text" name="search_amount" value="'.$search_amount.'"></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td align="right" class="liste_titre">';
|
||||
print '<td class="right liste_titre">';
|
||||
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"), 'searchclear.png', '', '', 1).'" name="button_removefilter" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||
print '</td>';
|
||||
@ -151,11 +151,11 @@ if ($resql)
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "l.rowid", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "l.label", "", $param, 'align="left"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("LoanCapital", $_SERVER["PHP_SELF"], "l.capital", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("DateStart", $_SERVER["PHP_SELF"], "l.datestart", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("DateEnd", $_SERVER["PHP_SELF"], "l.dateend", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "l.paid", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "l.label", "", $param, '', $sortfield, $sortorder, 'left ');
|
||||
print_liste_field_titre("LoanCapital", $_SERVER["PHP_SELF"], "l.capital", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("DateStart", $_SERVER["PHP_SELF"], "l.datestart", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("DateEnd", $_SERVER["PHP_SELF"], "l.dateend", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "l.paid", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre('');
|
||||
print "</tr>\n";
|
||||
|
||||
@ -175,15 +175,15 @@ if ($resql)
|
||||
print '<td>'.dol_trunc($obj->label, 42).'</td>';
|
||||
|
||||
// Capital
|
||||
print '<td align="right" width="100">'.price($obj->capital).'</td>';
|
||||
print '<td class="right" width="100">'.price($obj->capital).'</td>';
|
||||
|
||||
// Date start
|
||||
print '<td width="110" align="center">'.dol_print_date($db->jdate($obj->datestart), 'day').'</td>';
|
||||
print '<td width="110" class="center">'.dol_print_date($db->jdate($obj->datestart), 'day').'</td>';
|
||||
|
||||
// Date end
|
||||
print '<td width="110" align="center">'.dol_print_date($db->jdate($obj->dateend), 'day').'</td>';
|
||||
print '<td width="110" class="center">'.dol_print_date($db->jdate($obj->dateend), 'day').'</td>';
|
||||
|
||||
print '<td align="right" class="nowrap">'.$loan_static->LibStatut($obj->paid, 5, $obj->alreadypayed).'</a></td>';
|
||||
print '<td class="right nowrap">'.$loan_static->LibStatut($obj->paid, 5, $obj->alreadypayed).'</a></td>';
|
||||
|
||||
print '<td></td>';
|
||||
|
||||
|
||||
@ -56,7 +56,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->loan->del
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."loan_schedule SET fk_bank = 0 WHERE fk_bank = ".$payment->fk_bank;
|
||||
$db->query($sql);
|
||||
|
||||
|
||||
$result = $payment->delete($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
@ -214,9 +214,9 @@ if ($resql)
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans('Loan').'</td>';
|
||||
print '<td>'.$langs->trans('Label').'</td>';
|
||||
// print '<td align="right">'.$langs->trans('ExpectedToPay').'</td>';
|
||||
print '<td align="center">'.$langs->trans('Status').'</td>';
|
||||
print '<td align="right">'.$langs->trans('PayedByThisPayment').'</td>';
|
||||
// print '<td class="right">'.$langs->trans('ExpectedToPay').'</td>';
|
||||
print '<td class="center">'.$langs->trans('Status').'</td>';
|
||||
print '<td class="right">'.$langs->trans('PayedByThisPayment').'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
if ($num > 0)
|
||||
@ -234,13 +234,13 @@ if ($resql)
|
||||
// Label
|
||||
print '<td>'.$objp->label.'</td>';
|
||||
// Expected to pay
|
||||
// print '<td align="right">'.price($objp->capital).'</td>';
|
||||
// print '<td class="right">'.price($objp->capital).'</td>';
|
||||
// Status
|
||||
print '<td align="center">'.$loan->getLibStatut(4, $objp->amount_capital).'</td>';
|
||||
print '<td class="center">'.$loan->getLibStatut(4, $objp->amount_capital).'</td>';
|
||||
// Amount payed
|
||||
$amount_payed = $objp->amount_capital + $objp->amount_insurance + $objp->amount_interest;
|
||||
|
||||
print '<td align="right">'.price($amount_payed).'</td>';
|
||||
print '<td class="right">'.price($amount_payed).'</td>';
|
||||
print "</tr>\n";
|
||||
if ($objp->paid == 1) // If at least one invoice is paid, disable delete
|
||||
{
|
||||
|
||||
@ -279,30 +279,30 @@ if ($action == 'create')
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="left">'.$langs->trans("DateDue").'</td>';
|
||||
print '<td align="right">'.$langs->trans("LoanCapital").'</td>';
|
||||
print '<td align="right">'.$langs->trans("AlreadyPaid").'</td>';
|
||||
print '<td align="right">'.$langs->trans("RemainderToPay").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Amount").'</td>';
|
||||
print '<td class="right">'.$langs->trans("LoanCapital").'</td>';
|
||||
print '<td class="right">'.$langs->trans("AlreadyPaid").'</td>';
|
||||
print '<td class="right">'.$langs->trans("RemainderToPay").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Amount").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
if ($loan->datestart > 0)
|
||||
{
|
||||
print '<td align="left" valign="center">'.dol_print_date($loan->datestart, 'day').'</td>';
|
||||
print '<td class="left" valign="center">'.dol_print_date($loan->datestart, 'day').'</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="center" valign="center"><b>!!!</b></td>';
|
||||
print '<td class="center" valign="center"><b>!!!</b></td>';
|
||||
}
|
||||
|
||||
print '<td align="right" valign="center">'.price($loan->capital)."</td>";
|
||||
print '<td class="right" valign="center">'.price($loan->capital)."</td>";
|
||||
|
||||
print '<td align="right" valign="center">'.price($sumpaid)."</td>";
|
||||
print '<td class="right" valign="center">'.price($sumpaid)."</td>";
|
||||
|
||||
print '<td align="right" valign="center">'.price($loan->capital - $sumpaid)."</td>";
|
||||
print '<td class="right" valign="center">'.price($loan->capital - $sumpaid)."</td>";
|
||||
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($sumpaid < $loan->capital)
|
||||
{
|
||||
print $langs->trans("LoanCapital") .': <input type="text" size="8" name="amount_capital" value="'.$amount_capital.'">';
|
||||
|
||||
@ -45,17 +45,17 @@ $head=loan_prepare_head($object);
|
||||
dol_fiche_head($head, 'FinancialCommitment', $langs->trans("Loan"), -1, 'bill');
|
||||
|
||||
if ($action == 'createecheancier') {
|
||||
|
||||
|
||||
$i=1;
|
||||
while($i <$object->nbterm+1){
|
||||
|
||||
|
||||
$date = GETPOST('hi_date'.$i, 'int');
|
||||
$mens = GETPOST('mens'.$i);
|
||||
$int = GETPOST('hi_interets'.$i);
|
||||
$insurance = GETPOST('hi_insurance'.$i);
|
||||
|
||||
|
||||
$echeance = new LoanSchedule($db);
|
||||
|
||||
|
||||
$echeance->fk_loan = $object->id;
|
||||
$echeance->datec = dol_now();
|
||||
$echeance->tms = dol_now();
|
||||
@ -76,15 +76,15 @@ if ($action == 'createecheancier') {
|
||||
}
|
||||
|
||||
if ($action == 'updateecheancier') {
|
||||
|
||||
|
||||
$i=1;
|
||||
while($i <$object->nbterm+1){
|
||||
|
||||
|
||||
$mens = GETPOST('mens'.$i);
|
||||
$int = GETPOST('hi_interets'.$i);
|
||||
$id = GETPOST('hi_rowid'.$i);
|
||||
$insurance = GETPOST('hi_insurance'.$i);
|
||||
|
||||
|
||||
$echeance = new LoanSchedule($db);
|
||||
$echeance->fetch($id);
|
||||
$echeance->tms = dol_now();
|
||||
@ -154,18 +154,18 @@ print '<table class="border" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
$colspan = 6;
|
||||
if (count($echeance->lines)>0) $colspan++;
|
||||
print '<th align="center" colspan="'.$colspan.'">';
|
||||
print '<th class="center" colspan="'.$colspan.'">';
|
||||
print $langs->trans("FinancialCommitment");
|
||||
print '</th>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
Print '<th width="5%" align="center">'.$langs->trans("Term").'</th>';
|
||||
Print '<th width="5%" align="center">'.$langs->trans("Date").'</th>';
|
||||
print '<th width="15%" align="center">'.$langs->trans("Insurance");
|
||||
Print '<th width="15%" align="center">'.$langs->trans("InterestAmount").'</th>';
|
||||
Print '<th width="10%" align="center">'.$langs->trans("Amount").'</th>';
|
||||
Print '<th width="40%" align="center">'.$langs->trans("CapitalRemain");
|
||||
Print '<th width="5%" class="center">'.$langs->trans("Term").'</th>';
|
||||
Print '<th width="5%" class="center">'.$langs->trans("Date").'</th>';
|
||||
print '<th width="15%" class="center">'.$langs->trans("Insurance");
|
||||
Print '<th width="15%" class="center">'.$langs->trans("InterestAmount").'</th>';
|
||||
Print '<th width="10%" class="center">'.$langs->trans("Amount").'</th>';
|
||||
Print '<th width="40%" class="center">'.$langs->trans("CapitalRemain");
|
||||
print ' ('.price2num($object->capital).')';
|
||||
print '<input type="hidden" name="hi_capital0" id ="hi_capital0" value="'.$object->capital.'">';
|
||||
print '</th>';
|
||||
@ -187,12 +187,12 @@ if ($object->nbterm > 0 && count($echeance->lines)==0)
|
||||
$insu = ($insurance+(($i == 1) ? $regulInsurance : 0));
|
||||
$cap_rest = price2num($capital - ($mens-$int), 'MT');
|
||||
print '<tr>';
|
||||
print '<td align="center" id="n'.$i.'">' . $i .'</td>';
|
||||
print '<td align="center" id ="date' .$i .'"><input type="hidden" name="hi_date' .$i .'" id ="hi_date' .$i .'" value="' . dol_time_plus_duree($object->datestart, $i-1, 'm') . '">' . dol_print_date(dol_time_plus_duree($object->datestart, $i-1, 'm'), 'day') . '</td>';
|
||||
print '<td align="center" id="insurance'.$i.'">'.price($insurance+(($i == 1) ? $regulInsurance : 0), 0, '', 1).' €</td><input type="hidden" name="hi_insurance' .$i .'" id ="hi_insurance' .$i .'" value="' . ($insurance+(($i == 1) ? $regulInsurance : 0)) . '">';
|
||||
print '<td align="center" id="interets'.$i.'">'.price($int, 0, '', 1).' €</td><input type="hidden" name="hi_interets' .$i .'" id ="hi_interets' .$i .'" value="' . $int . '">';
|
||||
print '<td align="center"><input name="mens'.$i.'" id="mens'.$i.'" size="5" value="'.$mens.'" ech="'.$i.'"> €</td>';
|
||||
print '<td align="center" id="capital'.$i.'">'.price($cap_rest).' €</td><input type="hidden" name="hi_capital' .$i .'" id ="hi_capital' .$i .'" value="' . $cap_rest . '">';
|
||||
print '<td class="center" id="n'.$i.'">' . $i .'</td>';
|
||||
print '<td class="center" id ="date' .$i .'"><input type="hidden" name="hi_date' .$i .'" id ="hi_date' .$i .'" value="' . dol_time_plus_duree($object->datestart, $i-1, 'm') . '">' . dol_print_date(dol_time_plus_duree($object->datestart, $i-1, 'm'), 'day') . '</td>';
|
||||
print '<td class="center" id="insurance'.$i.'">'.price($insurance+(($i == 1) ? $regulInsurance : 0), 0, '', 1).' €</td><input type="hidden" name="hi_insurance' .$i .'" id ="hi_insurance' .$i .'" value="' . ($insurance+(($i == 1) ? $regulInsurance : 0)) . '">';
|
||||
print '<td class="center" id="interets'.$i.'">'.price($int, 0, '', 1).' €</td><input type="hidden" name="hi_interets' .$i .'" id ="hi_interets' .$i .'" value="' . $int . '">';
|
||||
print '<td class="center"><input name="mens'.$i.'" id="mens'.$i.'" size="5" value="'.$mens.'" ech="'.$i.'"> €</td>';
|
||||
print '<td class="center" id="capital'.$i.'">'.price($cap_rest).' €</td><input type="hidden" name="hi_capital' .$i .'" id ="hi_capital' .$i .'" value="' . $cap_rest . '">';
|
||||
print '</tr>'."\n";
|
||||
$i++;
|
||||
$capital = $cap_rest;
|
||||
@ -211,20 +211,20 @@ elseif(count($echeance->lines)>0)
|
||||
$int = $line->amount_interest;
|
||||
$insu = ($insurance+(($i == 1) ? $regulInsurance : 0));
|
||||
$cap_rest = price2num($capital - ($mens-$int), 'MT');
|
||||
|
||||
|
||||
print '<tr>';
|
||||
print '<td align="center" id="n'.$i.'"><input type="hidden" name="hi_rowid' .$i .'" id ="hi_rowid' .$i .'" value="' . $line->id . '">' . $i .'</td>';
|
||||
print '<td align="center" id ="date' .$i .'"><input type="hidden" name="hi_date' .$i .'" id ="hi_date' .$i .'" value="' . $line->datep . '">' . dol_print_date($line->datep, 'day') . '</td>';
|
||||
print '<td align="center" id="insurance'.$i.'">'.price($insu, 0, '', 1).' €</td><input type="hidden" name="hi_insurance' .$i .'" id ="hi_insurance' .$i .'" value="' . $insu . '">';
|
||||
print '<td align="center" id="interets'.$i.'">'.price($int, 0, '', 1).' €</td><input type="hidden" name="hi_interets' .$i .'" id ="hi_interets' .$i .'" value="' . $int . '">';
|
||||
print '<td class="center" id="n'.$i.'"><input type="hidden" name="hi_rowid' .$i .'" id ="hi_rowid' .$i .'" value="' . $line->id . '">' . $i .'</td>';
|
||||
print '<td class="center" id ="date' .$i .'"><input type="hidden" name="hi_date' .$i .'" id ="hi_date' .$i .'" value="' . $line->datep . '">' . dol_print_date($line->datep, 'day') . '</td>';
|
||||
print '<td class="center" id="insurance'.$i.'">'.price($insu, 0, '', 1).' €</td><input type="hidden" name="hi_insurance' .$i .'" id ="hi_insurance' .$i .'" value="' . $insu . '">';
|
||||
print '<td class="center" id="interets'.$i.'">'.price($int, 0, '', 1).' €</td><input type="hidden" name="hi_interets' .$i .'" id ="hi_interets' .$i .'" value="' . $int . '">';
|
||||
if($line->datep > dol_now() && empty($line->fk_bank)){
|
||||
print '<td align="center"><input name="mens'.$i.'" id="mens'.$i.'" size="5" value="'.$mens.'" ech="'.$i.'"> €</td>';
|
||||
print '<td class="center"><input name="mens'.$i.'" id="mens'.$i.'" size="5" value="'.$mens.'" ech="'.$i.'"> €</td>';
|
||||
}else{
|
||||
print '<td align="center">' . price($mens) . ' €</td><input type="hidden" name="mens' .$i .'" id ="mens' .$i .'" value="' . $mens . '">';
|
||||
print '<td class="center">' . price($mens) . ' €</td><input type="hidden" name="mens' .$i .'" id ="mens' .$i .'" value="' . $mens . '">';
|
||||
}
|
||||
|
||||
print '<td align="center" id="capital'.$i.'">'.price($cap_rest).' €</td><input type="hidden" name="hi_capital' .$i .'" id ="hi_capital' .$i .'" value="' . $cap_rest . '">';
|
||||
print '<td align="center">';
|
||||
|
||||
print '<td class="center" id="capital'.$i.'">'.price($cap_rest).' €</td><input type="hidden" name="hi_capital' .$i .'" id ="hi_capital' .$i .'" value="' . $cap_rest . '">';
|
||||
print '<td class="center">';
|
||||
if (!empty($line->fk_bank)) print $langs->trans('Paid');
|
||||
elseif (!$printed)
|
||||
{
|
||||
@ -243,7 +243,7 @@ print '</br>';
|
||||
print '</br>';
|
||||
if (count($echeance->lines)==0) $label = $langs->trans("Create");
|
||||
else $label = $langs->trans("Save");
|
||||
print '<div align="center"><input class="button" type="submit" value="'.$label.'"></div>';
|
||||
print '<div class="center"><input class="button" type="submit" value="'.$label.'"></div>';
|
||||
print '</form>';
|
||||
|
||||
// End of page
|
||||
|
||||
@ -122,7 +122,7 @@ print load_fiche_titre($langs->trans("MemberMainOptions"), '', '');
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td width=300>'.$langs->trans("Description").'</td>';
|
||||
print '<td colspan="2" align="center">'.$langs->trans("Value").'</td>'."\n";
|
||||
print '<td colspan="2" class="center">'.$langs->trans("Value").'</td>'."\n";
|
||||
print '<td class="left">'.$langs->trans("Description").'</td>'."\n";
|
||||
print '</tr>';
|
||||
|
||||
@ -162,7 +162,7 @@ print '</form>';
|
||||
// DISPLAY MARGIN RATES
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("DisplayMarginRates").'</td>';
|
||||
print '<td colspan="2" align="center">';
|
||||
print '<td colspan="2" class="center">';
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
{
|
||||
print ajax_constantonoff('DISPLAY_MARGIN_RATES');
|
||||
@ -185,7 +185,7 @@ print '</tr>';
|
||||
// DISPLAY MARK RATES
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("DisplayMarkRates").'</td>';
|
||||
print '<td colspan="2" align="center">';
|
||||
print '<td colspan="2" class="center">';
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
{
|
||||
print ajax_constantonoff('DISPLAY_MARK_RATES');
|
||||
@ -208,7 +208,7 @@ print '</tr>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("ForceBuyingPriceIfNull").'</td>';
|
||||
print '<td colspan="2" align="center">';
|
||||
print '<td colspan="2" class="center">';
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
{
|
||||
print ajax_constantonoff('ForceBuyingPriceIfNull');
|
||||
|
||||
@ -212,13 +212,13 @@ if ($result)
|
||||
else
|
||||
print_liste_field_titre("SalesRepresentative", $_SERVER["PHP_SELF"], "u.lastname", "", $param, '', $sortfield, $sortorder);
|
||||
|
||||
print_liste_field_titre("SellingPrice", $_SERVER["PHP_SELF"], "selling_price", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($labelcostprice, $_SERVER["PHP_SELF"], "buying_price", "", $param, ' align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Margin", $_SERVER["PHP_SELF"], "marge", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("SellingPrice", $_SERVER["PHP_SELF"], "selling_price", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre($labelcostprice, $_SERVER["PHP_SELF"], "buying_price", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Margin", $_SERVER["PHP_SELF"], "marge", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
||||
print_liste_field_titre("MarginRate", $_SERVER["PHP_SELF"], "", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("MarginRate", $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
||||
print_liste_field_titre("MarkRate", $_SERVER["PHP_SELF"], "", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("MarkRate", $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print "</tr>\n";
|
||||
|
||||
$rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT);
|
||||
@ -289,13 +289,13 @@ if ($result)
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$group_array['htmlname']."</td>\n";
|
||||
print "<td align=\"right\">".price($pv, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td align=\"right\">".price($pa, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td align=\"right\">".price($marge, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".price($pv, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".price($pa, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".price($marge, null, null, null, null, $rounding)."</td>\n";
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
||||
print "<td align=\"right\">".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print "<td class=\"right\">".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
||||
print "<td align=\"right\">".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print "<td class=\"right\">".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
|
||||
@ -286,16 +286,16 @@ if ($result) {
|
||||
print $objp->description;
|
||||
}
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
print price($objp->subprice);
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
print '<input type="text" name="buyingprice_' . $objp->invoicedetid . '" id="buyingprice_' . $objp->invoicedetid . '" size="6" value="' . price($objp->buy_price_ht) . '" class="right flat">';
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
print $objp->qty;
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
print price($objp->total_ht);
|
||||
print '</td>';
|
||||
print '<td></td>';
|
||||
|
||||
@ -307,7 +307,7 @@ if ($result)
|
||||
$invoicestatic->ref=$objp->ref;
|
||||
print $invoicestatic->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
print "<td align=\"center\">";
|
||||
print "<td class=\"center\">";
|
||||
print dol_print_date($db->jdate($objp->datef), 'day')."</td>";
|
||||
}
|
||||
else {
|
||||
@ -317,13 +317,13 @@ if ($result)
|
||||
print "<td>".$companystatic->getNomUrl(1, 'margin')."</td>\n";
|
||||
}
|
||||
|
||||
print "<td align=\"right\">".price($pv, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td align=\"right\">".price($pa, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td align=\"right\">".price($marge, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".price($pv, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".price($pa, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".price($marge, null, null, null, null, $rounding)."</td>\n";
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
||||
print "<td align=\"right\">".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print "<td class=\"right\">".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
||||
print "<td align=\"right\">".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print "<td class=\"right\">".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
$i++;
|
||||
@ -352,13 +352,13 @@ if ($result)
|
||||
else
|
||||
print '<td>';
|
||||
print $langs->trans('TotalMargin')."</td>";
|
||||
print "<td align=\"right\">".price($cumul_vente, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td align=\"right\">".price($cumul_achat, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td align=\"right\">".price($totalMargin, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".price($cumul_vente, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".price($cumul_achat, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".price($totalMargin, null, null, null, null, $rounding)."</td>\n";
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
||||
print "<td align=\"right\">".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print "<td class=\"right\">".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
||||
print "<td align=\"right\">".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print "<td class=\"right\">".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
print "</table>";
|
||||
|
||||
@ -280,7 +280,7 @@ if ($result)
|
||||
$invoicestatic->ref=$objp->ref;
|
||||
print $invoicestatic->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
print "<td align=\"center\">";
|
||||
print "<td class=\"center\">";
|
||||
print dol_print_date($db->jdate($objp->datef), 'day')."</td>";
|
||||
}
|
||||
else {
|
||||
@ -302,13 +302,13 @@ if ($result)
|
||||
print "</td>\n";
|
||||
//print "<td>".$product_static->getNomUrl(1)."</td>\n";
|
||||
}
|
||||
print "<td align=\"right\">".price($pv, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td align=\"right\">".price($pa, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td align=\"right\">".price($marge, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".price($pv, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".price($pa, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".price($marge, null, null, null, null, $rounding)."</td>\n";
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
||||
print "<td align=\"right\">".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print "<td class=\"right\">".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
||||
print "<td align=\"right\">".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print "<td class=\"right\">".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
$i++;
|
||||
@ -330,13 +330,13 @@ if ($result)
|
||||
else
|
||||
print '<td>';
|
||||
print $langs->trans('TotalMargin')."</td>";
|
||||
print "<td align=\"right\">".price($cumul_vente, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td align=\"right\">".price($cumul_achat, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td align=\"right\">".price($totalMargin, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".price($cumul_vente, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".price($cumul_achat, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".price($totalMargin, null, null, null, null, $rounding)."</td>\n";
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
||||
print "<td align=\"right\">".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print "<td class=\"right\">".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
||||
print "<td align=\"right\">".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print "<td class=\"right\">".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
print "</table>";
|
||||
|
||||
@ -172,16 +172,16 @@ if ($id > 0 || ! empty($ref))
|
||||
print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.ref", "", "&id=".$object->id, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", "", "&id=".$object->id, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("CustomerCode", $_SERVER["PHP_SELF"], "s.code_client", "", "&id=".$object->id, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("DateInvoice", $_SERVER["PHP_SELF"], "f.datef", "", "&id=".$object->id, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("SellingPrice", $_SERVER["PHP_SELF"], "selling_price", "", "&id=".$object->id, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("BuyingPrice", $_SERVER["PHP_SELF"], "buying_price", "", "&id=".$object->id, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "d.qty", "", "&id=".$object->id, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Margin", $_SERVER["PHP_SELF"], "marge", "", "&id=".$object->id, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("DateInvoice", $_SERVER["PHP_SELF"], "f.datef", "", "&id=".$object->id, '', $sortfield, $sortorder, 'left ');
|
||||
print_liste_field_titre("SellingPrice", $_SERVER["PHP_SELF"], "selling_price", "", "&id=".$object->id, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("BuyingPrice", $_SERVER["PHP_SELF"], "buying_price", "", "&id=".$object->id, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "d.qty", "", "&id=".$object->id, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Margin", $_SERVER["PHP_SELF"], "marge", "", "&id=".$object->id, '', $sortfield, $sortorder, 'right ');
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
||||
print_liste_field_titre("MarginRate", $_SERVER["PHP_SELF"], "", "", "&id=".$object->id, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("MarginRate", $_SERVER["PHP_SELF"], "", "", "&id=".$object->id, '', $sortfield, $sortorder, 'right ');
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
||||
print_liste_field_titre("MarkRate", $_SERVER["PHP_SELF"], "", "", "&id=".$object->id, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "f.paye,f.fk_statut", "", "&id=".$object->id, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("MarkRate", $_SERVER["PHP_SELF"], "", "", "&id=".$object->id, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "f.paye,f.fk_statut", "", "&id=".$object->id, '', $sortfield, $sortorder, 'right ');
|
||||
print "</tr>\n";
|
||||
|
||||
$cumul_achat = 0;
|
||||
@ -204,17 +204,17 @@ if ($id > 0 || ! empty($ref))
|
||||
print "</td>\n";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"), "company").' '.dol_trunc($objp->name, 44).'</a></td>';
|
||||
print "<td>".$objp->code_client."</td>\n";
|
||||
print "<td align=\"center\">";
|
||||
print "<td class=\"center\">";
|
||||
print dol_print_date($db->jdate($objp->datef), 'day')."</td>";
|
||||
print "<td align=\"right\">".price($objp->selling_price, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td align=\"right\">".price($objp->buying_price, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td align=\"right\">".price($objp->qty, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td align=\"right\">".price($objp->marge, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".price($objp->selling_price, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".price($objp->buying_price, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".price($objp->qty, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".price($objp->marge, null, null, null, null, $rounding)."</td>\n";
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
||||
print "<td align=\"right\">".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print "<td class=\"right\">".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
||||
print "<td align=\"right\">".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print '<td align="right">'.$invoicestatic->LibStatut($objp->paye, $objp->statut, 5).'</td>';
|
||||
print "<td class=\"right\">".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print '<td class="right">'.$invoicestatic->LibStatut($objp->paye, $objp->statut, 5).'</td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
$cumul_achat += $objp->buying_price;
|
||||
@ -238,15 +238,15 @@ if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
print '<tr class="liste_total">';
|
||||
print '<td colspan=4>'.$langs->trans('TotalMargin')."</td>";
|
||||
print '<td align="right">'.price($cumul_vente, null, null, null, null, $rounding)."</td>\n";
|
||||
print '<td align="right">'.price($cumul_achat, null, null, null, null, $rounding)."</td>\n";
|
||||
print '<td align="right">'.price($cumul_qty, null, null, null, null, $rounding)."</td>\n";
|
||||
print '<td align="right">'.price($totalMargin, null, null, null, null, $rounding)."</td>\n";
|
||||
print '<td class="right">'.price($cumul_vente, null, null, null, null, $rounding)."</td>\n";
|
||||
print '<td class="right">'.price($cumul_achat, null, null, null, null, $rounding)."</td>\n";
|
||||
print '<td class="right">'.price($cumul_qty, null, null, null, null, $rounding)."</td>\n";
|
||||
print '<td class="right">'.price($totalMargin, null, null, null, null, $rounding)."</td>\n";
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
||||
print '<td align="right">'.(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print '<td class="right">'.(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
||||
print "<td align=\"right\">".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print '<td align="right"> </td>';
|
||||
print "<td class=\"right\">".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print '<td class="right"> </td>';
|
||||
print "</tr>\n";
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
|
||||
@ -178,15 +178,15 @@ if ($socid > 0)
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.ref", "", "&socid=".$_REQUEST["socid"], '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("DateInvoice", $_SERVER["PHP_SELF"], "f.datef", "", "&socid=".$_REQUEST["socid"], 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("SoldAmount", $_SERVER["PHP_SELF"], "selling_price", "", "&socid=".$_REQUEST["socid"], 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("PurchasedAmount", $_SERVER["PHP_SELF"], "buying_price", "", "&socid=".$_REQUEST["socid"], 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Margin", $_SERVER["PHP_SELF"], "marge", "", "&socid=".$_REQUEST["socid"], 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("DateInvoice", $_SERVER["PHP_SELF"], "f.datef", "", "&socid=".$_REQUEST["socid"], '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("SoldAmount", $_SERVER["PHP_SELF"], "selling_price", "", "&socid=".$_REQUEST["socid"], '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("PurchasedAmount", $_SERVER["PHP_SELF"], "buying_price", "", "&socid=".$_REQUEST["socid"], '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Margin", $_SERVER["PHP_SELF"], "marge", "", "&socid=".$_REQUEST["socid"], '', $sortfield, $sortorder, 'right ');
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
||||
print_liste_field_titre("MarginRate", $_SERVER["PHP_SELF"], "", "", "&socid=".$_REQUEST["socid"], 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("MarginRate", $_SERVER["PHP_SELF"], "", "", "&socid=".$_REQUEST["socid"], '', $sortfield, $sortorder, 'right ');
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
||||
print_liste_field_titre("MarkRate", $_SERVER["PHP_SELF"], "", "", "&socid=".$_REQUEST["socid"], 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "f.paye,f.fk_statut", "", "&socid=".$_REQUEST["socid"], 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("MarkRate", $_SERVER["PHP_SELF"], "", "", "&socid=".$_REQUEST["socid"], '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "f.paye,f.fk_statut", "", "&socid=".$_REQUEST["socid"], '', $sortfield, $sortorder, 'right ');
|
||||
print "</tr>\n";
|
||||
|
||||
$cumul_achat = 0;
|
||||
@ -214,16 +214,16 @@ if ($socid > 0)
|
||||
$invoicestatic->ref=$objp->ref;
|
||||
print $invoicestatic->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
print "<td align=\"center\">";
|
||||
print "<td class=\"center\">";
|
||||
print dol_print_date($db->jdate($objp->datef), 'day')."</td>";
|
||||
print "<td align=\"right\">".price($objp->selling_price, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td align=\"right\">".price(($objp->type == 2 ? -1 : 1) * $objp->buying_price, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td align=\"right\">".$sign.price($objp->marge, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".price($objp->selling_price, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".price(($objp->type == 2 ? -1 : 1) * $objp->buying_price, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".$sign.price($objp->marge, null, null, null, null, $rounding)."</td>\n";
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
||||
print "<td align=\"right\">".(($marginRate === '')?'n/a':$sign.price($marginRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print "<td class=\"right\">".(($marginRate === '')?'n/a':$sign.price($marginRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
||||
print "<td align=\"right\">".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print '<td align="right">'.$invoicestatic->LibStatut($objp->paye, $objp->statut, 5).'</td>';
|
||||
print "<td class=\"right\">".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print '<td class="right">'.$invoicestatic->LibStatut($objp->paye, $objp->statut, 5).'</td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
$cumul_vente += $objp->selling_price;
|
||||
@ -248,14 +248,14 @@ if ($socid > 0)
|
||||
// Total
|
||||
print '<tr class="liste_total">';
|
||||
print '<td colspan=2>'.$langs->trans('TotalMargin')."</td>";
|
||||
print "<td align=\"right\">".price($cumul_vente, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td align=\"right\">".price($cumul_achat, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td align=\"right\">".price($totalMargin, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".price($cumul_vente, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".price($cumul_achat, null, null, null, null, $rounding)."</td>\n";
|
||||
print "<td class=\"right\">".price($totalMargin, null, null, null, null, $rounding)."</td>\n";
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
||||
print "<td align=\"right\">".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print "<td class=\"right\">".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
||||
print "<td align=\"right\">".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print '<td align="right"> </td>';
|
||||
print "<td class=\"right\">".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||
print '<td class="right"> </td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
else
|
||||
|
||||
@ -114,7 +114,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("UseAboutPage") . '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MODULEBUILDER_USE_ABOUT');
|
||||
} else {
|
||||
@ -128,7 +128,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("UseDocFolder") . '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MODULEBUILDER_USE_DOCFOLDER');
|
||||
} else {
|
||||
|
||||
@ -1766,7 +1766,7 @@ elseif (! empty($module))
|
||||
print '<td class="center"><input class="text" size="2" name="propisameasure" value="'.dol_escape_htmltag(GETPOST('propisameasure', 'alpha')).'"></td>';
|
||||
print '<td class="center"><input class="text" size="2" name="propsearchall" value="'.dol_escape_htmltag(GETPOST('propsearchall', 'alpha')).'"></td>';
|
||||
print '<td><input class="text maxwidth100" name="propcomment" value="'.dol_escape_htmltag(GETPOST('propcomment', 'alpha')).'"></td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<input class="button" type="submit" name="add" value="'.$langs->trans("Add").'">';
|
||||
print '</td></tr>';
|
||||
|
||||
@ -1812,8 +1812,7 @@ elseif (! empty($module))
|
||||
print $proptype;
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if ($proparrayofkeyval)
|
||||
{
|
||||
if ($proparrayofkeyval) {
|
||||
print json_encode($proparrayofkeyval);
|
||||
}
|
||||
print '</td>';
|
||||
@ -1826,7 +1825,7 @@ elseif (! empty($module))
|
||||
print '<td class="center">';
|
||||
print $propindex?'1':'';
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
print $propposition;
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
|
||||
@ -134,14 +134,14 @@ if (! empty($conf->mymodule->enabled) && $user->rights->mymodule->read)
|
||||
$companystatic->canvas=$obj->canvas;
|
||||
print $companystatic->getNomUrl(1,'customer',16);
|
||||
print '</td>';
|
||||
print '<td align="right" class="nowrap">'.price($obj->total_ttc).'</td></tr>';
|
||||
print '<td class="right" class="nowrap">'.price($obj->total_ttc).'</td></tr>';
|
||||
$i++;
|
||||
$total += $obj->total_ttc;
|
||||
}
|
||||
if ($total>0)
|
||||
{
|
||||
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" align="right">'.price($total)."</td></tr>";
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" class="right">'.price($total)."</td></tr>";
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -195,7 +195,7 @@ if (! empty($conf->mymodule->enabled) && $user->rights->mymodule->read)
|
||||
else if (! empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print $langs->trans("BoxTitleLastModifiedProspects",$max);
|
||||
else print $langs->trans("BoxTitleLastModifiedCustomers",$max);
|
||||
print '</th>';
|
||||
print '<th align="right">'.$langs->trans("DateModificationShort").'</th>';
|
||||
print '<th class="right">'.$langs->trans("DateModificationShort").'</th>';
|
||||
print '</tr>';
|
||||
if ($num)
|
||||
{
|
||||
@ -210,10 +210,10 @@ if (! empty($conf->mymodule->enabled) && $user->rights->mymodule->read)
|
||||
$companystatic->canvas=$objp->canvas;
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nowrap">'.$companystatic->getNomUrl(1,'customer',48).'</td>';
|
||||
print '<td align="right" nowrap>';
|
||||
print '<td class="right nowrap">';
|
||||
print $companystatic->getLibCustProspStatut();
|
||||
print "</td>";
|
||||
print '<td align="right" nowrap>'.dol_print_date($db->jdate($objp->tms),'day')."</td>";
|
||||
print '<td class="right nowrap">'.dol_print_date($db->jdate($objp->tms),'day')."</td>";
|
||||
print '</tr>';
|
||||
$i++;
|
||||
|
||||
|
||||
@ -420,7 +420,7 @@ $parameters=array('arrayfields'=>$arrayfields);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Action column
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@ -448,7 +448,7 @@ $parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sort
|
||||
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Action column
|
||||
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ')."\n";
|
||||
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
|
||||
print '</tr>'."\n";
|
||||
|
||||
|
||||
@ -516,7 +516,7 @@ while ($i < min($num, $limit))
|
||||
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Action column
|
||||
print '<td class="nowrap" align="center">';
|
||||
print '<td class="nowrap center">';
|
||||
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
{
|
||||
$selected=0;
|
||||
@ -539,7 +539,7 @@ if (isset($totalarray['pos']))
|
||||
while ($i < $totalarray['nbfield'])
|
||||
{
|
||||
$i++;
|
||||
if (! empty($totalarray['pos'][$i])) print '<td align="right">'.price($totalarray['val'][$totalarray['pos'][$i]]).'</td>';
|
||||
if (! empty($totalarray['pos'][$i])) print '<td class="right">'.price($totalarray['val'][$totalarray['pos'][$i]]).'</td>';
|
||||
else
|
||||
{
|
||||
if ($i == 1)
|
||||
|
||||
@ -797,7 +797,7 @@ if ($resql)
|
||||
// Label
|
||||
if (! empty($arrayfields['p.label']['checked']))
|
||||
{
|
||||
print '<td class="tdoverflowmax200">'.dol_trunc($obj->label, 40).'</td>';
|
||||
print '<td class="tdoverflowmax200">'.dol_trunc($obj->label, 70).'</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
|
||||
@ -60,9 +60,16 @@ if (GETPOST('action', 'alpha') == 'set')
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_BAR_RESTAURANT", GETPOST('TAKEPOS_BAR_RESTAURANT', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_PRINT_SERVER", GETPOST('TAKEPOS_PRINT_SERVER', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_ORDER_PRINTERS", GETPOST('TAKEPOS_ORDER_PRINTERS', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_ORDER_NOTES", GETPOST('TAKEPOS_ORDER_NOTES', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_HEADER", GETPOST('TAKEPOS_HEADER', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_FOOTER", GETPOST('TAKEPOS_FOOTER', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_NUMPAD", GETPOST('TAKEPOS_NUMPAD', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if ($conf->global->TAKEPOS_ORDER_NOTES==1)
|
||||
{
|
||||
$extrafields = new ExtraFields($db);
|
||||
$extrafields->addExtraField('order_notes', 'Order notes', 'varchar', 0, 255, 'facturedet', 0, 0, '', '', 0, '', 0, 1);
|
||||
}
|
||||
|
||||
dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha'));
|
||||
|
||||
@ -142,6 +149,12 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT && $conf->global->TAKEPOSCONNECTOR){
|
||||
print '<td colspan="2">';
|
||||
print $form->selectyesno("TAKEPOS_ORDER_PRINTERS", $conf->global->TAKEPOS_ORDER_PRINTERS, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven value"><td>';
|
||||
print $langs->trans("OrderNotes");
|
||||
print '<td colspan="2">';
|
||||
print $form->selectyesno("TAKEPOS_ORDER_NOTES", $conf->global->TAKEPOS_ORDER_NOTES, 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Payment numpad
|
||||
|
||||
@ -30,7 +30,8 @@ require '../main.inc.php'; // Load $user and permissions
|
||||
$langs->loadLangs(array("bills", "cashdesk"));
|
||||
|
||||
$place = GETPOST('place', 'int');
|
||||
|
||||
$idline = GETPOST('idline', 'int');
|
||||
$action = GETPOST('action');
|
||||
|
||||
/*
|
||||
* View
|
||||
@ -41,16 +42,23 @@ top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
|
||||
?>
|
||||
<script>
|
||||
function Save(){
|
||||
$.get( "invoice.php", { action: "freezone", place: "<?php echo $place;?>", desc:$('#desc').val(), number:$('#price').val()} );
|
||||
$.get( "invoice.php", { action: "<?php echo $action;?>", place: "<?php echo $place;?>", desc:$('#desc').val(), number:$('#number').val()} );
|
||||
parent.$.colorbox.close();
|
||||
}
|
||||
|
||||
$( document ).ready(function() {
|
||||
$('#desc').focus()
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<br>
|
||||
<center>
|
||||
<input type="text" id="desc" name="desc" style="width:40%;font-size: 200%;" placeholder="<?php echo $langs->trans('Description');?>">
|
||||
<input type="text" id="price" name="price" style="width:15%;font-size: 200%;" placeholder="<?php echo $langs->trans('Price');?>">
|
||||
<?php
|
||||
if ($action=="freezone") echo '<input type="text" id="number" name="number" style="width:15%;font-size: 200%;" placeholder="'.$langs->trans('Price').'">';
|
||||
if ($action=="addnote") echo '<input type="hidden" id="number" name="number" value="'.$idline.'">';
|
||||
?>
|
||||
<input type="hidden" name="place" value="<?php echo $place;?>">
|
||||
<input type="button" style="width:15%;font-size: 200%;" value="OK" onclick="Save();">
|
||||
</center>
|
||||
|
||||
@ -38,9 +38,6 @@ $query= GETPOST('query', 'alpha');
|
||||
* View
|
||||
*/
|
||||
|
||||
header('Cache-Control: max-age=604800, public, must-revalidate');
|
||||
header('Pragma: cache');
|
||||
|
||||
if ($query=="cat")
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
@ -63,7 +60,7 @@ if ($query=="cat")
|
||||
{
|
||||
$filename=$obj['photo'];
|
||||
}
|
||||
$file=DOL_URL_ROOT.'/viewimage.php?modulepart=category&entity='.$object->entity.'&file='.urlencode($pdir.$filename);
|
||||
$file=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=category&entity='.$object->entity.'&file='.urlencode($pdir.$filename);
|
||||
header('Location: '.$file);
|
||||
exit;
|
||||
}
|
||||
@ -80,7 +77,7 @@ elseif ($query=="pro")
|
||||
preg_match('@src="([^"]+)"@', $image, $match);
|
||||
$file = array_pop($match);
|
||||
if ($file=="") header('Location: ../../public/theme/common/nophoto.png');
|
||||
else header('Location: '.$file);
|
||||
else header('Location: '.$file.'&cache=1');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -120,6 +120,18 @@ if ($action == "freezone") {
|
||||
$invoice->fetch($placeid);
|
||||
}
|
||||
|
||||
if ($action == "addnote") {
|
||||
foreach($invoice->lines as $line)
|
||||
{
|
||||
if ($line->id == $number)
|
||||
{
|
||||
$line->array_options['order_notes'] = $desc;
|
||||
$result = $invoice->updateline($line->id, $line->desc, $line->subprice, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit);
|
||||
}
|
||||
}
|
||||
$invoice->fetch($placeid);
|
||||
}
|
||||
|
||||
if ($action == "deleteline") {
|
||||
if ($idline > 0 and $placeid > 0) { //If exist invoice and line, to avoid errors if deleted from other device or no line selected
|
||||
$invoice->deleteline($idline);
|
||||
@ -185,7 +197,9 @@ if ($action == "order" and $placeid != 0) {
|
||||
if ($count > 0) {
|
||||
$sql = "UPDATE " . MAIN_DB_PREFIX . "facturedet set special_code='3' where rowid=$line->rowid";
|
||||
$db->query($sql);
|
||||
$order_receipt_printer1.= '<tr>' . $line->product_label . '<td align="right">' . $line->qty . '</td></tr>';
|
||||
$order_receipt_printer1.= '<tr>' . $line->product_label . '<td align="right">' . $line->qty;
|
||||
if (!empty($line->array_options['options_order_notes'])) $order_receipt_printer1.="<br>(".$line->array_options['options_order_notes'].")";
|
||||
$order_receipt_printer1.='</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -200,7 +214,9 @@ if ($action == "order" and $placeid != 0) {
|
||||
if ($count > 0) {
|
||||
$sql = "UPDATE " . MAIN_DB_PREFIX . "facturedet set special_code='3' where rowid=$line->rowid";
|
||||
$db->query($sql);
|
||||
$order_receipt_printer2.= '<tr>' . $line->product_label . '<td align="right">' . $line->qty . '</td></tr>';
|
||||
$order_receipt_printer2.= '<tr>' . $line->product_label . '<td align="right">' . $line->qty;
|
||||
if (!empty($line->array_options['options_order_notes'])) $order_receipt_printer2.="<br>(".$line->array_options['options_order_notes'].")";
|
||||
$order_receipt_printer2.='</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -325,7 +341,9 @@ if ($placeid > 0) {
|
||||
print ' order';
|
||||
}
|
||||
print '" id="' . $line->rowid . '">';
|
||||
print '<td align="left">' . $line->product_label . $line->desc . '</td>';
|
||||
print '<td align="left">' . $line->product_label . $line->desc;
|
||||
if (!empty($line->array_options['options_order_notes'])) echo "<br>(".$line->array_options['options_order_notes'].")";
|
||||
print '</td>';
|
||||
print '<td align="right">' . $line->qty . '</td>';
|
||||
print '<td align="right">' . price($line->total_ttc) . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -246,7 +246,11 @@ function Floors(){
|
||||
}
|
||||
|
||||
function FreeZone(){
|
||||
$.colorbox({href:"freezone.php?place="+place, onClosed: function () { Refresh(); },width:"80%", height:"30%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("FreeZone");?>"});
|
||||
$.colorbox({href:"freezone.php?action=freezone&place="+place, onClosed: function () { Refresh(); },width:"80%", height:"30%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("FreeZone");?>"});
|
||||
}
|
||||
|
||||
function TakeposOrderNotes(){
|
||||
$.colorbox({href:"freezone.php?action=addnote&place="+place+"&idline="+selectedline, onClosed: function () { Refresh(); },width:"80%", height:"30%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("OrderNotes");?>"});
|
||||
}
|
||||
|
||||
function Refresh(){
|
||||
@ -457,6 +461,10 @@ if($conf->global->TAKEPOS_BAR_RESTAURANT){
|
||||
if ($conf->global->TAKEPOSCONNECTOR) $menus[$r++]=array('title'=>$langs->trans("Receipt"),'action'=>'TakeposPrinting(placeid);');
|
||||
else $menus[$r++]=array('title'=>$langs->trans("Receipt"),'action'=>'Print(placeid);');
|
||||
}
|
||||
if ($conf->global->TAKEPOSCONNECTOR && $conf->global->TAKEPOS_ORDER_NOTES==1){
|
||||
$menus[$r++]=array('title'=>$langs->trans("OrderNotes"),
|
||||
'action'=>'TakeposOrderNotes();');
|
||||
}
|
||||
}
|
||||
|
||||
if ($conf->global->TAKEPOSCONNECTOR){
|
||||
|
||||
Loading…
Reference in New Issue
Block a user