Merge pull request #10669 from frederic34/html5fix

replace by html5 in ticket supplier_proposal, stripe, societe
This commit is contained in:
Laurent Destailleur 2019-02-24 20:36:24 +01:00 committed by GitHub
commit 3fa2680859
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
158 changed files with 1951 additions and 1850 deletions

View File

@ -151,14 +151,14 @@ print "<table class=\"noborder\" width=\"100%\">";
print "<tr class=\"liste_titre\">"; print "<tr class=\"liste_titre\">";
print '<td>'.$langs->trans("Parameter")."</td>"; print '<td>'.$langs->trans("Parameter")."</td>";
print '<td align="center">'.$langs->trans("Value")."</td>"; print '<td class="center">'.$langs->trans("Value")."</td>";
print "</tr>"; print "</tr>";
// Show external agenda // Show external agenda
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print "<td>".$langs->trans("ExtSitesEnableThisTool")."</td>"; print "<td>".$langs->trans("ExtSitesEnableThisTool")."</td>";
print '<td align="center">'; print '<td class="center">';
if ($conf->use_javascript_ajax) if ($conf->use_javascript_ajax)
{ {
print ajax_constantonoff('AGENDA_DISABLE_EXT', array('enabled'=>array(0=>'.hideifnotset')), null, 1); print ajax_constantonoff('AGENDA_DISABLE_EXT', array('enabled'=>array(0=>'.hideifnotset')), null, 1);
@ -181,7 +181,7 @@ print "</tr>";
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print "<td>".$langs->trans("ExtSitesNbOfAgenda")."</td>"; print "<td>".$langs->trans("ExtSitesNbOfAgenda")."</td>";
print '<td align="center">'; print '<td class="center">';
print '<input class="flat hideifnotset" type="text" size="2" id="AGENDA_EXT_NB" name="AGENDA_EXT_NB" value="'.$conf->global->AGENDA_EXT_NB.'">'; print '<input class="flat hideifnotset" type="text" size="2" id="AGENDA_EXT_NB" name="AGENDA_EXT_NB" value="'.$conf->global->AGENDA_EXT_NB.'">';
print "</td>"; print "</td>";
print "</tr>"; print "</tr>";

View File

@ -225,10 +225,10 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
print '<tr class="liste_titre">'."\n"; print '<tr class="liste_titre">'."\n";
print '<td width="100">'.$langs->trans("Name").'</td>'."\n"; print '<td width="100">'.$langs->trans("Name").'</td>'."\n";
print '<td>'.$langs->trans("Description").'</td>'."\n"; print '<td>'.$langs->trans("Description").'</td>'."\n";
print '<td align="center" width="60">'.$langs->trans("Status").'</td>'."\n"; print '<td class="center" width="60">'.$langs->trans("Status").'</td>'."\n";
print '<td align="center" width="60">'.$langs->trans("Default").'</td>'."\n"; print '<td class="center" width="60">'.$langs->trans("Default").'</td>'."\n";
print '<td align="center" width="40">'.$langs->trans("ShortInfo").'</td>'; print '<td class="center" width="40">'.$langs->trans("ShortInfo").'</td>';
print '<td align="center" width="40">'.$langs->trans("Preview").'</td>'; print '<td class="center" width="40">'.$langs->trans("Preview").'</td>';
print '</tr>'."\n"; print '</tr>'."\n";
clearstatcache(); clearstatcache();
@ -269,7 +269,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
if (in_array($name, $def)) if (in_array($name, $def))
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
if ($conf->global->ACTION_EVENT_ADDON_PDF != "$name") if ($conf->global->ACTION_EVENT_ADDON_PDF != "$name")
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'&amp;type=action">'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'&amp;type=action">';
@ -284,13 +284,13 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
} }
else else
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmodel&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'&amp;type=action">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmodel&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'&amp;type=action">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
print "</td>"; print "</td>";
} }
// Default // Default
print '<td align="center">'; print '<td class="center">';
if ($conf->global->ACTION_EVENT_ADDON_PDF == "$name") if ($conf->global->ACTION_EVENT_ADDON_PDF == "$name")
{ {
print img_picto($langs->trans("Default"), 'on'); print img_picto($langs->trans("Default"), 'on');
@ -307,10 +307,10 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
$htmltooltip.='<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; $htmltooltip.='<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
$htmltooltip.='<br><br><u>'.$langs->trans("FeaturesSupported").':</u>'; $htmltooltip.='<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
$htmltooltip.='<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1); $htmltooltip.='<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&amp;module='.$name.'">'.img_object($langs->trans("Preview"), 'order').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&amp;module='.$name.'">'.img_object($langs->trans("Preview"), 'order').'</a>';
print '</td>'; print '</td>';
@ -330,7 +330,7 @@ print '<input type="hidden" name="action" value="set">';
print '<table class="noborder allwidth">'."\n"; print '<table class="noborder allwidth">'."\n";
print '<tr class="liste_titre">'."\n"; print '<tr class="liste_titre">'."\n";
print '<td>'.$langs->trans("Parameters").'</td>'."\n"; print '<td>'.$langs->trans("Parameters").'</td>'."\n";
print '<td align="center">&nbsp;</td>'."\n"; print '<td class="center">&nbsp;</td>'."\n";
print '<td class="right">'.$langs->trans("Value").'</td>'."\n"; print '<td class="right">'.$langs->trans("Value").'</td>'."\n";
print '</tr>'."\n"; print '</tr>'."\n";
@ -338,7 +338,7 @@ print '</tr>'."\n";
print '<tr class="oddeven">'."\n"; print '<tr class="oddeven">'."\n";
print '<td>'.$langs->trans("AGENDA_USE_EVENT_TYPE").'</td>'."\n"; print '<td>'.$langs->trans("AGENDA_USE_EVENT_TYPE").'</td>'."\n";
print '<td align="center">&nbsp;</td>'."\n"; print '<td class="center">&nbsp;</td>'."\n";
print '<td class="right">'."\n"; print '<td class="right">'."\n";
//print ajax_constantonoff('AGENDA_USE_EVENT_TYPE'); Do not use ajax here, we need to reload page to change other combo list //print ajax_constantonoff('AGENDA_USE_EVENT_TYPE'); Do not use ajax here, we need to reload page to change other combo list
if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) if (empty($conf->global->AGENDA_USE_EVENT_TYPE))
@ -355,7 +355,7 @@ print '</td></tr>'."\n";
print '<tr class="oddeven">'."\n"; print '<tr class="oddeven">'."\n";
$htmltext=$langs->trans("ThisValueCanOverwrittenOnUserLevel", $langs->transnoentitiesnoconv("UserGUISetup")); $htmltext=$langs->trans("ThisValueCanOverwrittenOnUserLevel", $langs->transnoentitiesnoconv("UserGUISetup"));
print '<td>'.$form->textwithpicto($langs->trans("AGENDA_DEFAULT_VIEW"), $htmltext).'</td>'."\n"; print '<td>'.$form->textwithpicto($langs->trans("AGENDA_DEFAULT_VIEW"), $htmltext).'</td>'."\n";
print '<td align="center">&nbsp;</td>'."\n"; print '<td class="center">&nbsp;</td>'."\n";
print '<td class="right">'."\n"; print '<td class="right">'."\n";
$tmplist=array(''=>'&nbsp;', 'show_list'=>$langs->trans("ViewList"), 'show_month'=>$langs->trans("ViewCal"), 'show_week'=>$langs->trans("ViewWeek"), 'show_day'=>$langs->trans("ViewDay"), 'show_peruser'=>$langs->trans("ViewPerUser")); $tmplist=array(''=>'&nbsp;', 'show_list'=>$langs->trans("ViewList"), 'show_month'=>$langs->trans("ViewCal"), 'show_week'=>$langs->trans("ViewWeek"), 'show_day'=>$langs->trans("ViewDay"), 'show_peruser'=>$langs->trans("ViewPerUser"));
print $form->selectarray('AGENDA_DEFAULT_VIEW', $tmplist, $conf->global->AGENDA_DEFAULT_VIEW); print $form->selectarray('AGENDA_DEFAULT_VIEW', $tmplist, $conf->global->AGENDA_DEFAULT_VIEW);
@ -367,8 +367,8 @@ if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
print '<!-- AGENDA_USE_EVENT_TYPE_DEFAULT -->'; print '<!-- AGENDA_USE_EVENT_TYPE_DEFAULT -->';
print '<tr class="oddeven">'."\n"; print '<tr class="oddeven">'."\n";
print '<td>'.$langs->trans("AGENDA_USE_EVENT_TYPE_DEFAULT").'</td>'."\n"; print '<td>'.$langs->trans("AGENDA_USE_EVENT_TYPE_DEFAULT").'</td>'."\n";
print '<td align="center">&nbsp;</td>'."\n"; print '<td class="center">&nbsp;</td>'."\n";
print '<td class="right" class="nowrap">'."\n"; print '<td class="right nowrap">'."\n";
$formactions->select_type_actions($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT, "AGENDA_USE_EVENT_TYPE_DEFAULT", 'systemauto', 0, 1); $formactions->select_type_actions($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT, "AGENDA_USE_EVENT_TYPE_DEFAULT", 'systemauto', 0, 1);
print '</td></tr>'."\n"; print '</td></tr>'."\n";
} }
@ -376,8 +376,8 @@ if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
// AGENDA_DEFAULT_FILTER_TYPE // AGENDA_DEFAULT_FILTER_TYPE
print '<tr class="oddeven">'."\n"; print '<tr class="oddeven">'."\n";
print '<td>'.$langs->trans("AGENDA_DEFAULT_FILTER_TYPE").'</td>'."\n"; print '<td>'.$langs->trans("AGENDA_DEFAULT_FILTER_TYPE").'</td>'."\n";
print '<td align="center">&nbsp;</td>'."\n"; print '<td class="center">&nbsp;</td>'."\n";
print '<td class="right" class="nowrap">'."\n"; print '<td class="right nowrap">'."\n";
$formactions->select_type_actions($conf->global->AGENDA_DEFAULT_FILTER_TYPE, "AGENDA_DEFAULT_FILTER_TYPE", '', (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 1); $formactions->select_type_actions($conf->global->AGENDA_DEFAULT_FILTER_TYPE, "AGENDA_DEFAULT_FILTER_TYPE", '', (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 1);
print '</td></tr>'."\n"; print '</td></tr>'."\n";
@ -385,7 +385,7 @@ print '</td></tr>'."\n";
// TODO Remove to use the default generic feature // TODO Remove to use the default generic feature
print '<tr class="oddeven">'."\n"; print '<tr class="oddeven">'."\n";
print '<td>'.$langs->trans("AGENDA_DEFAULT_FILTER_STATUS").'</td>'."\n"; print '<td>'.$langs->trans("AGENDA_DEFAULT_FILTER_STATUS").'</td>'."\n";
print '<td align="center">&nbsp;</td>'."\n"; print '<td class="center">&nbsp;</td>'."\n";
print '<td class="right">'."\n"; print '<td class="right">'."\n";
$formactions->form_select_status_action('agenda', $conf->global->AGENDA_DEFAULT_FILTER_STATUS, 1, 'AGENDA_DEFAULT_FILTER_STATUS', 1, 2, 'minwidth100'); $formactions->form_select_status_action('agenda', $conf->global->AGENDA_DEFAULT_FILTER_STATUS, 1, 'AGENDA_DEFAULT_FILTER_STATUS', 1, 2, 'minwidth100');
print '</td></tr>'."\n"; print '</td></tr>'."\n";

View File

@ -185,7 +185,7 @@ print '<input type="hidden" name="action" value="set">';
print '<table class="noborder allwidth">'."\n"; print '<table class="noborder allwidth">'."\n";
print '<tr class="liste_titre">'."\n"; print '<tr class="liste_titre">'."\n";
print '<td>'.$langs->trans("Parameters").'</td>'."\n"; print '<td>'.$langs->trans("Parameters").'</td>'."\n";
print '<td align="center">&nbsp;</td>'."\n"; print '<td class="center">&nbsp;</td>'."\n";
print '<td class="right">'.$langs->trans("Value").'</td>'."\n"; print '<td class="right">'.$langs->trans("Value").'</td>'."\n";
print '</tr>'."\n"; print '</tr>'."\n";
@ -195,7 +195,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL == 2)
{ {
print '<tr class="oddeven">'."\n"; print '<tr class="oddeven">'."\n";
print '<td>'.$langs->trans('AGENDA_REMINDER_EMAIL', $langs->transnoentities("Module2300Name")).'</td>'."\n"; print '<td>'.$langs->trans('AGENDA_REMINDER_EMAIL', $langs->transnoentities("Module2300Name")).'</td>'."\n";
print '<td align="center">&nbsp;</td>'."\n"; print '<td class="center">&nbsp;</td>'."\n";
print '<td class="right">'."\n"; print '<td class="right">'."\n";
if (empty($conf->global->AGENDA_REMINDER_EMAIL)) { if (empty($conf->global->AGENDA_REMINDER_EMAIL)) {
@ -212,7 +212,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL == 2)
{ {
print '<tr class="oddeven">'."\n"; print '<tr class="oddeven">'."\n";
print '<td>'.$langs->trans('AGENDA_REMINDER_BROWSER').'</td>'."\n"; print '<td>'.$langs->trans('AGENDA_REMINDER_BROWSER').'</td>'."\n";
print '<td align="center">&nbsp;</td>'."\n"; print '<td class="center">&nbsp;</td>'."\n";
print '<td class="right">'."\n"; print '<td class="right">'."\n";
if (empty($conf->global->AGENDA_REMINDER_BROWSER)) { if (empty($conf->global->AGENDA_REMINDER_BROWSER)) {
@ -224,7 +224,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL == 2)
print '<tr class="oddeven">'."\n"; print '<tr class="oddeven">'."\n";
print '<td>'.$langs->trans('AGENDA_REMINDER_BROWSER_SOUND').'</td>'."\n"; print '<td>'.$langs->trans('AGENDA_REMINDER_BROWSER_SOUND').'</td>'."\n";
print '<td align="center">&nbsp;</td>'."\n"; print '<td class="center">&nbsp;</td>'."\n";
print '<td class="right">'."\n"; print '<td class="right">'."\n";
if (empty($conf->global->AGENDA_REMINDER_BROWSER_SOUND)) { if (empty($conf->global->AGENDA_REMINDER_BROWSER_SOUND)) {

View File

@ -183,8 +183,8 @@ print '<tr class="liste_titre">';
print '<td width="140">' . $langs->trans("Name") . '</td>'; print '<td width="140">' . $langs->trans("Name") . '</td>';
print '<td>' . $langs->trans("Description") . '</td>'; print '<td>' . $langs->trans("Description") . '</td>';
print '<td>' . $langs->trans("Example") . '</td>'; print '<td>' . $langs->trans("Example") . '</td>';
print '<td align="center">' . $langs->trans("Status") . '</td>'; print '<td class="center">' . $langs->trans("Status") . '</td>';
print '<td align="center" width="60">&nbsp;</td>'; print '<td class="center" width="60">&nbsp;</td>';
print "</tr>\n"; print "</tr>\n";
$bankorder[0][0] = $langs->trans("BankOrderGlobal"); $bankorder[0][0] = $langs->trans("BankOrderGlobal");
@ -213,12 +213,12 @@ while ($i < $nbofbank) {
print "</td>\n"; print "</td>\n";
if ($conf->global->BANK_SHOW_ORDER_OPTION == $i) { if ($conf->global->BANK_SHOW_ORDER_OPTION == $i) {
print '<td align="center">'; print '<td class="center">';
print img_picto($langs->trans("Activated"), 'on'); print img_picto($langs->trans("Activated"), 'on');
print '</td>'; print '</td>';
} }
else { else {
print '<td align="center"><a href="' . $_SERVER['PHP_SELF'] . '?action=setbankorder&amp;value=' . $i . '">'; print '<td class="center"><a href="' . $_SERVER['PHP_SELF'] . '?action=setbankorder&amp;value=' . $i . '">';
print img_picto($langs->trans("Disabled"), 'off'); print img_picto($langs->trans("Disabled"), 'off');
print '</a></td>'; print '</a></td>';
} }
@ -263,10 +263,10 @@ print "<table class=\"noborder\" width=\"100%\">\n";
print "<tr class=\"liste_titre\">\n"; print "<tr class=\"liste_titre\">\n";
print '<td>' . $langs->trans("Name") . '</td>'; print '<td>' . $langs->trans("Name") . '</td>';
print '<td>' . $langs->trans("Description") . '</td>'; print '<td>' . $langs->trans("Description") . '</td>';
print '<td align="center" width="60">' . $langs->trans("Status") . "</td>\n"; print '<td class="center" width="60">' . $langs->trans("Status") . "</td>\n";
print '<td align="center" width="60">' . $langs->trans("Default") . "</td>\n"; print '<td class="center" width="60">' . $langs->trans("Default") . "</td>\n";
print '<td align="center" width="38">' . $langs->trans("ShortInfo") . '</td>'; print '<td class="center" width="38">' . $langs->trans("ShortInfo") . '</td>';
print '<td align="center" width="38">' . $langs->trans("Preview") . '</td>'; print '<td class="center" width="38">' . $langs->trans("Preview") . '</td>';
print "</tr>\n"; print "</tr>\n";
clearstatcache(); clearstatcache();
@ -315,7 +315,7 @@ foreach ($dirmodels as $reldir) {
// Active // Active
if (in_array($name, $def)) { if (in_array($name, $def)) {
print '<td align="center">' . "\n"; print '<td class="center">' . "\n";
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=del&value=' . $name . '">'; print '<a href="' . $_SERVER["PHP_SELF"] . '?action=del&value=' . $name . '">';
print img_picto($langs->trans("Enabled"), print img_picto($langs->trans("Enabled"),
'switch_on'); 'switch_on');
@ -323,14 +323,14 @@ foreach ($dirmodels as $reldir) {
print '</td>'; print '</td>';
} }
else { else {
print '<td align="center">' . "\n"; print '<td class="center">' . "\n";
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=set&value=' . $name . '&amp;scan_dir=' . $module->scandir . '&amp;label=' . urlencode($module->name) . '">' . img_picto($langs->trans("Disabled"), print '<a href="' . $_SERVER["PHP_SELF"] . '?action=set&value=' . $name . '&amp;scan_dir=' . $module->scandir . '&amp;label=' . urlencode($module->name) . '">' . img_picto($langs->trans("Disabled"),
'switch_off') . '</a>'; 'switch_off') . '</a>';
print "</td>"; print "</td>";
} }
// Default // Default
print '<td align="center">'; print '<td class="center">';
if ($conf->global->BANKADDON_PDF == $name) { if ($conf->global->BANKADDON_PDF == $name) {
print img_picto($langs->trans("Default"), print img_picto($langs->trans("Default"),
'on'); 'on');
@ -358,13 +358,13 @@ foreach ($dirmodels as $reldir) {
// $htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1); // $htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1);
//$htmltooltip .= '<br>' . $langs->trans("WatermarkOnDraftOrders") . ': ' . yn($module->option_draft_watermark, 1, 1); //$htmltooltip .= '<br>' . $langs->trans("WatermarkOnDraftOrders") . ': ' . yn($module->option_draft_watermark, 1, 1);
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, print $form->textwithpicto('', $htmltooltip, 1,
0); 0);
print '</td>'; print '</td>';
// Preview // Preview
print '<td align="center">'; print '<td class="center">';
if ($module->type == 'pdf') { if ($module->type == 'pdf') {
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=specimen&module=' . $name . '">' . img_object($langs->trans("Preview"), print '<a href="' . $_SERVER["PHP_SELF"] . '?action=specimen&module=' . $name . '">' . img_object($langs->trans("Preview"),
'bill') . '</a>'; 'bill') . '</a>';
@ -404,7 +404,7 @@ print "<table class=\"noborder\" width=\"100%\">\n";
print "<tr class=\"liste_titre\">\n"; print "<tr class=\"liste_titre\">\n";
print '<td>' . $langs->trans("Name") . '</td>'; print '<td>' . $langs->trans("Name") . '</td>';
print '<td>' . $langs->trans("Description") . '</td>'; print '<td>' . $langs->trans("Description") . '</td>';
print '<td align="center" width="60">' . $langs->trans("Status") . "</td>\n"; print '<td class="center" width="60">' . $langs->trans("Status") . "</td>\n";
print "</tr>\n"; print "</tr>\n";
print '<tr class="oddeven"><td width="100">'; print '<tr class="oddeven"><td width="100">';
@ -414,7 +414,7 @@ print $langs->trans('AutoReportLastAccountStatement');
print '</td>'; print '</td>';
// Active // Active
if ($conf->global->BANK_REPORT_LAST_NUM_RELEVE) { if ($conf->global->BANK_REPORT_LAST_NUM_RELEVE) {
print '<td align="center">' . "\n"; print '<td class="center">' . "\n";
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=unsetreportlastnumreleve">'; print '<a href="' . $_SERVER["PHP_SELF"] . '?action=unsetreportlastnumreleve">';
print img_picto($langs->trans("Enabled"), 'switch_on'); print img_picto($langs->trans("Enabled"), 'switch_on');
print '</a>'; print '</a>';
@ -422,7 +422,7 @@ if ($conf->global->BANK_REPORT_LAST_NUM_RELEVE) {
} }
else else
{ {
print '<td align="center">' . "\n"; print '<td class="center">' . "\n";
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setreportlastnumreleve">' . img_picto($langs->trans("Disabled"), print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setreportlastnumreleve">' . img_picto($langs->trans("Disabled"),
'switch_off') . '</a>'; 'switch_off') . '</a>';
print "</td>"; print "</td>";

View File

@ -199,8 +199,8 @@ print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Name").'</td>'; print '<td>'.$langs->trans("Name").'</td>';
print '<td>'.$langs->trans("Description").'</td>'; print '<td>'.$langs->trans("Description").'</td>';
print '<td width="200" align="center">'.$langs->trans("Example").'</td>'; print '<td width="200" class="center">'.$langs->trans("Example").'</td>';
print '<td align="center" width="60">'.$langs->trans("CodeBarGenerator").'</td>'; print '<td class="center" width="60">'.$langs->trans("CodeBarGenerator").'</td>';
print "</tr>\n"; print "</tr>\n";
$sql = "SELECT rowid, code as encoding, libelle, coder, example"; $sql = "SELECT rowid, code as encoding, libelle, coder, example";
@ -229,7 +229,7 @@ if ($resql)
print '</td>'; print '</td>';
// Show example // Show example
print '<td align="center">'; print '<td class="center">';
if ($obj->coder && $obj->coder != -1) if ($obj->coder && $obj->coder != -1)
{ {
$result=0; $result=0;
@ -277,7 +277,7 @@ if ($resql)
} }
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print $formbarcode->setBarcodeEncoder($obj->coder, $barcodelist, $obj->rowid, 'form'.$i); print $formbarcode->setBarcodeEncoder($obj->coder, $barcodelist, $obj->rowid, 'form'.$i);
print "</td></tr>\n"; print "</td></tr>\n";
@ -307,7 +307,7 @@ print "<input type=\"hidden\" name=\"action\" value=\"update\">";
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameter").'</td>'; print '<td>'.$langs->trans("Parameter").'</td>';
print '<td width="60" align="center">'.$langs->trans("Value").'</td>'; print '<td width="60" class="center">'.$langs->trans("Value").'</td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '</tr>'; print '</tr>';
@ -317,7 +317,7 @@ if (! isset($_SERVER['WINDIR']))
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.$langs->trans("GenbarcodeLocation").'</td>'; print '<td>'.$langs->trans("GenbarcodeLocation").'</td>';
print '<td width="60" align="center">'; print '<td width="60" class="center">';
print '<input type="text" size="40" name="GENBARCODE_LOCATION" value="'.$conf->global->GENBARCODE_LOCATION.'">'; print '<input type="text" size="40" name="GENBARCODE_LOCATION" value="'.$conf->global->GENBARCODE_LOCATION.'">';
if (! empty($conf->global->GENBARCODE_LOCATION) && ! @file_exists($conf->global->GENBARCODE_LOCATION)) if (! empty($conf->global->GENBARCODE_LOCATION) && ! @file_exists($conf->global->GENBARCODE_LOCATION))
{ {
@ -369,8 +369,8 @@ if ($conf->produit->enabled)
print '<td width="140">'.$langs->trans("Name").'</td>'; print '<td width="140">'.$langs->trans("Name").'</td>';
print '<td>'.$langs->trans("Description").'</td>'; print '<td>'.$langs->trans("Description").'</td>';
print '<td>'.$langs->trans("Example").'</td>'; print '<td>'.$langs->trans("Example").'</td>';
print '<td align="center" width="80">'.$langs->trans("Status").'</td>'; print '<td class="center" width="80">'.$langs->trans("Status").'</td>';
print '<td align="center" width="60">'.$langs->trans("ShortInfo").'</td>'; print '<td class="center" width="60">'.$langs->trans("ShortInfo").'</td>';
print "</tr>\n"; print "</tr>\n";
$dirbarcodenum=array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']); $dirbarcodenum=array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']);
@ -406,17 +406,17 @@ if ($conf->produit->enabled)
if ($conf->global->BARCODE_PRODUCT_ADDON_NUM == "$file") if ($conf->global->BARCODE_PRODUCT_ADDON_NUM == "$file")
{ {
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproductoff&amp;value='.$file.'">'; print '<td class="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproductoff&amp;value='.$file.'">';
print img_picto($langs->trans("Activated"), 'switch_on'); print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>'; print '</a></td>';
} }
else else
{ {
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproducton&amp;value='.$file.'">'; print '<td class="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproducton&amp;value='.$file.'">';
print img_picto($langs->trans("Disabled"), 'switch_off'); print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>'; print '</a></td>';
} }
print '<td align="center">'; print '<td class="center">';
$s=$modBarCode->getToolTip($langs, null, -1); $s=$modBarCode->getToolTip($langs, null, -1);
print $form->textwithpicto('', $s, 1); print $form->textwithpicto('', $s, 1);
print '</td>'; print '</td>';

View File

@ -337,7 +337,7 @@ print '<tr class="liste_titre">';
print '<td width="300">'.$langs->trans("Box").'</td>'; print '<td width="300">'.$langs->trans("Box").'</td>';
print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>'; print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>';
print '<td>'.$langs->trans("SourceFile").'</td>'; print '<td>'.$langs->trans("SourceFile").'</td>';
print '<td width="160" align="center">'.$langs->trans("ActivateOn").'</td>'; print '<td width="160" class="center">'.$langs->trans("ActivateOn").'</td>';
print "</tr>\n"; print "</tr>\n";
foreach($boxtoadd as $box) foreach($boxtoadd as $box)
@ -398,9 +398,9 @@ print '<table class="tagtable liste">'."\n";
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td width="300">'.$langs->trans("Box").'</td>'; print '<td width="300">'.$langs->trans("Box").'</td>';
print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>'; print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>';
print '<td align="center" width="160">'.$langs->trans("ActiveOn").'</td>'; print '<td class="center" width="160">'.$langs->trans("ActiveOn").'</td>';
print '<td align="center" width="60" colspan="2">'.$langs->trans("PositionByDefault").'</td>'; print '<td class="center" width="60" colspan="2">'.$langs->trans("PositionByDefault").'</td>';
print '<td align="center" width="80">'.$langs->trans("Disable").'</td>'; print '<td class="center" width="80">'.$langs->trans("Disable").'</td>';
print '</tr>'."\n"; print '</tr>'."\n";
$box_order=1; $box_order=1;
@ -429,15 +429,15 @@ foreach($boxactivated as $key => $box)
} }
else print ($box->note?$box->note:'&nbsp;'); else print ($box->note?$box->note:'&nbsp;');
print '</td>'; print '</td>';
print '<td align="center">' . (empty($pos_name[$box->position])?'':$langs->trans($pos_name[$box->position])) . '</td>'; print '<td class="center">' . (empty($pos_name[$box->position])?'':$langs->trans($pos_name[$box->position])) . '</td>';
$hasnext=($key < (count($boxactivated)-1)); $hasnext=($key < (count($boxactivated)-1));
$hasprevious=($key != 0); $hasprevious=($key != 0);
print '<td align="center">'.($key+1).'</td>'; print '<td class="center">'.($key+1).'</td>';
print '<td align="center">'; print '<td class="center">';
print ($hasnext?'<a href="boxes.php?action=switch&amp;switchfrom='.$box->rowid.'&amp;switchto='.$boxactivated[$key+1]->rowid.'">'.img_down().'</a>&nbsp;':''); print ($hasnext?'<a href="boxes.php?action=switch&amp;switchfrom='.$box->rowid.'&amp;switchto='.$boxactivated[$key+1]->rowid.'">'.img_down().'</a>&nbsp;':'');
print ($hasprevious?'<a href="boxes.php?action=switch&amp;switchfrom='.$box->rowid.'&amp;switchto='.$boxactivated[$key-1]->rowid.'">'.img_up().'</a>':''); print ($hasprevious?'<a href="boxes.php?action=switch&amp;switchfrom='.$box->rowid.'&amp;switchto='.$boxactivated[$key-1]->rowid.'">'.img_up().'</a>':'');
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print '<a href="boxes.php?rowid='.$box->rowid.'&amp;action=delete">'.img_delete().'</a>'; print '<a href="boxes.php?rowid='.$box->rowid.'&amp;action=delete">'.img_delete().'</a>';
print '</td>'; print '</td>';

View File

@ -116,8 +116,8 @@ print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Name").'</td>'; print '<td>'.$langs->trans("Name").'</td>';
print '<td>'.$langs->trans("Description").'</td>'; print '<td>'.$langs->trans("Description").'</td>';
print '<td class="nowrap">'.$langs->trans("Example").'</td>'; print '<td class="nowrap">'.$langs->trans("Example").'</td>';
print '<td align="center" width="60">'.$langs->trans("Status").'</td>'; print '<td class="center" width="60">'.$langs->trans("Status").'</td>';
print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>'; print '<td class="center" width="16">'.$langs->trans("ShortInfo").'</td>';
print '</tr>'."\n"; print '</tr>'."\n";
clearstatcache(); clearstatcache();
@ -177,7 +177,7 @@ foreach ($dirmodels as $reldir)
else print $tmp; else print $tmp;
print '</td>'."\n"; print '</td>'."\n";
print '<td align="center">'; print '<td class="center">';
if ($conf->global->CHEQUERECEIPTS_ADDON == $file || $conf->global->CHEQUERECEIPTS_ADDON.'.php' == $file) if ($conf->global->CHEQUERECEIPTS_ADDON == $file || $conf->global->CHEQUERECEIPTS_ADDON.'.php' == $file)
{ {
print img_picto($langs->trans("Activated"), 'switch_on'); print img_picto($langs->trans("Activated"), 'switch_on');
@ -206,7 +206,7 @@ foreach ($dirmodels as $reldir)
} }
} }
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
if ($conf->global->CHEQUERECEIPTS_ADDON.'.php' == $file) // If module is the one used, we show existing errors if ($conf->global->CHEQUERECEIPTS_ADDON.'.php' == $file) // If module is the one used, we show existing errors
@ -244,7 +244,7 @@ print '<input type="hidden" name="action" value="set_BANK_CHEQUERECEIPT_FREE_TEX
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameters").'</td>'; print '<td>'.$langs->trans("Parameters").'</td>';
print '<td align="center" width="60">&nbsp;</td>'; print '<td class="center" width="60">&nbsp;</td>';
print '<td width="80">&nbsp;</td>'; print '<td width="80">&nbsp;</td>';
print "</tr>\n"; print "</tr>\n";

View File

@ -267,8 +267,8 @@ print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Name").'</td>'; print '<td>'.$langs->trans("Name").'</td>';
print '<td>'.$langs->trans("Description").'</td>'; print '<td>'.$langs->trans("Description").'</td>';
print '<td class="nowrap">'.$langs->trans("Example").'</td>'; print '<td class="nowrap">'.$langs->trans("Example").'</td>';
print '<td align="center" width="60">'.$langs->trans("Status").'</td>'; print '<td class="center" width="60">'.$langs->trans("Status").'</td>';
print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>'; print '<td class="center" width="16">'.$langs->trans("ShortInfo").'</td>';
print '</tr>'."\n"; print '</tr>'."\n";
clearstatcache(); clearstatcache();
@ -312,7 +312,7 @@ foreach ($dirmodels as $reldir)
else print $tmp; else print $tmp;
print '</td>'."\n"; print '</td>'."\n";
print '<td align="center">'; print '<td class="center">';
if ($conf->global->COMMANDE_ADDON == $file) if ($conf->global->COMMANDE_ADDON == $file)
{ {
print img_picto($langs->trans("Activated"), 'switch_on'); print img_picto($langs->trans("Activated"), 'switch_on');
@ -344,7 +344,7 @@ foreach ($dirmodels as $reldir)
} }
} }
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>'; print '</td>';
@ -393,10 +393,10 @@ print "<table class=\"noborder\" width=\"100%\">\n";
print "<tr class=\"liste_titre\">\n"; print "<tr class=\"liste_titre\">\n";
print '<td>'.$langs->trans("Name").'</td>'; print '<td>'.$langs->trans("Name").'</td>';
print '<td>'.$langs->trans("Description").'</td>'; print '<td>'.$langs->trans("Description").'</td>';
print '<td align="center" width="60">'.$langs->trans("Status")."</td>\n"; print '<td class="center" width="60">'.$langs->trans("Status")."</td>\n";
print '<td align="center" width="60">'.$langs->trans("Default")."</td>\n"; print '<td class="center" width="60">'.$langs->trans("Default")."</td>\n";
print '<td align="center" width="38">'.$langs->trans("ShortInfo").'</td>'; print '<td class="center" width="38">'.$langs->trans("ShortInfo").'</td>';
print '<td align="center" width="38">'.$langs->trans("Preview").'</td>'; print '<td class="center" width="38">'.$langs->trans("Preview").'</td>';
print "</tr>\n"; print "</tr>\n";
clearstatcache(); clearstatcache();
@ -449,7 +449,7 @@ foreach ($dirmodels as $reldir)
// Active // Active
if (in_array($name, $def)) if (in_array($name, $def))
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
print img_picto($langs->trans("Enabled"), 'switch_on'); print img_picto($langs->trans("Enabled"), 'switch_on');
print '</a>'; print '</a>';
@ -457,13 +457,13 @@ foreach ($dirmodels as $reldir)
} }
else else
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
print "</td>"; print "</td>";
} }
// Default // Default
print '<td align="center">'; print '<td class="center">';
if ($conf->global->COMMANDE_ADDON_PDF == $name) if ($conf->global->COMMANDE_ADDON_PDF == $name)
{ {
print img_picto($langs->trans("Default"), 'on'); print img_picto($langs->trans("Default"), 'on');
@ -491,12 +491,12 @@ foreach ($dirmodels as $reldir)
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1); $htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>'; print '</td>';
// Preview // Preview
print '<td align="center">'; print '<td class="center">';
if ($module->type == 'pdf') if ($module->type == 'pdf')
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'bill').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'bill').'</a>';
@ -528,7 +528,7 @@ print load_fiche_titre($langs->trans("OtherOptions"), '', '');
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameter").'</td>'; print '<td>'.$langs->trans("Parameter").'</td>';
print '<td align="center" width="60">'.$langs->trans("Value").'</td>'; print '<td class="center" width="60">'.$langs->trans("Value").'</td>';
print "<td>&nbsp;</td>\n"; print "<td>&nbsp;</td>\n";
print "</tr>\n"; print "</tr>\n";
@ -580,7 +580,7 @@ Whet is definition of "shippable" according to all different STOCK_CALCULATE_...
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.$langs->trans("ShippableOrderIconInList").'</td>'; print '<td>'.$langs->trans("ShippableOrderIconInList").'</td>';
print '<td>&nbsp</td>'; print '<td>&nbsp</td>';
print '<td align="center">'; print '<td class="center">';
if (!empty($conf->global->SHIPPABLE_ORDER_ICON_IN_LIST)) { if (!empty($conf->global->SHIPPABLE_ORDER_ICON_IN_LIST)) {
print '<a href="'.$_SERVER['PHP_SELF'].'?action=setshippableiconinlist&value=0">'; print '<a href="'.$_SERVER['PHP_SELF'].'?action=setshippableiconinlist&value=0">';
print img_picto($langs->trans("Activated"),'switch_on'); print img_picto($langs->trans("Activated"),'switch_on');
@ -598,7 +598,7 @@ if ($conf->banque->enabled)
{ {
print '<tr class="oddeven"><td>'; print '<tr class="oddeven"><td>';
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ORDER").'</td><td>&nbsp</td><td align="center">'; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ORDER").'</td><td>&nbsp</td><td class="center">';
if (! empty($conf->use_javascript_ajax)) if (! empty($conf->use_javascript_ajax))
{ {
print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_ORDER'); print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_ORDER');
@ -620,7 +620,7 @@ else
{ {
print '<tr class="oddeven"><td>'; print '<tr class="oddeven"><td>';
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ORDER").'</td><td>&nbsp;</td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>'; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ORDER").'</td><td>&nbsp;</td><td class="center">'.$langs->trans('NotAvailable').'</td></tr>';
} }
// Ask for warehouse during order // Ask for warehouse during order
@ -628,7 +628,7 @@ if ($conf->stock->enabled)
{ {
print '<tr class="oddeven"><td>'; print '<tr class="oddeven"><td>';
print $langs->trans("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER").'</td><td>&nbsp</td><td align="center">'; print $langs->trans("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER").'</td><td>&nbsp</td><td class="center">';
if (! empty($conf->use_javascript_ajax)) if (! empty($conf->use_javascript_ajax))
{ {
print ajax_constantonoff('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER'); print ajax_constantonoff('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER');
@ -650,7 +650,7 @@ else
{ {
print '<tr class="oddeven"><td>'; print '<tr class="oddeven"><td>';
print $langs->trans("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER").'</td><td>&nbsp;</td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>'; print $langs->trans("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER").'</td><td>&nbsp;</td><td class="center">'.$langs->trans('NotAvailable').'</td></tr>';
} }
*/ */
@ -666,7 +666,7 @@ print load_fiche_titre($langs->trans("Notifications"), '', '');
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameter").'</td>'; print '<td>'.$langs->trans("Parameter").'</td>';
print '<td align="center" width="60"></td>'; print '<td class="center" width="60"></td>';
print '<td width="80">&nbsp;</td>'; print '<td width="80">&nbsp;</td>';
print "</tr>\n"; print "</tr>\n";

View File

@ -190,7 +190,7 @@ print '<td>'.$langs->trans("Name").'</td>';
print '<td>'.$langs->trans("Value").'</td>'; print '<td>'.$langs->trans("Value").'</td>';
print '<td>'.$langs->trans("Comment").'</td>'; print '<td>'.$langs->trans("Comment").'</td>';
if (! empty($conf->multicompany->enabled) && !$user->entity) print '<td>'.$langs->trans("Entity").'</td>'; if (! empty($conf->multicompany->enabled) && !$user->entity) print '<td>'.$langs->trans("Entity").'</td>';
print '<td align="center">'.$langs->trans("Action").'</td>'; print '<td class="center">'.$langs->trans("Action").'</td>';
print "</tr>\n"; print "</tr>\n";
@ -210,11 +210,11 @@ if (! empty($conf->multicompany->enabled) && !$user->entity)
print '<td>'; print '<td>';
print '<input type="text" class="flat" size="1" name="entity" value="'.$conf->entity.'">'; print '<input type="text" class="flat" size="1" name="entity" value="'.$conf->entity.'">';
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
} }
else else
{ {
print '<td align="center">'; print '<td class="center">';
print '<input type="hidden" name="entity" value="'.$conf->entity.'">'; print '<input type="hidden" name="entity" value="'.$conf->entity.'">';
} }
print '<input type="submit" class="button" value="'.$langs->trans("Add").'" name="add">'; print '<input type="submit" class="button" value="'.$langs->trans("Add").'" name="add">';
@ -273,11 +273,11 @@ if ($result)
print '<td>'; print '<td>';
print '<input type="text" class="flat" size="1" name="const['.$i.'][entity]" value="'.$obj->entity.'">'; print '<input type="text" class="flat" size="1" name="const['.$i.'][entity]" value="'.$obj->entity.'">';
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
} }
else else
{ {
print '<td align="center">'; print '<td class="center">';
print '<input type="hidden" name="const['.$i.'][entity]" value="'.$obj->entity.'">'; print '<input type="hidden" name="const['.$i.'][entity]" value="'.$obj->entity.'">';
} }

View File

@ -204,8 +204,8 @@ print '<tr class="liste_titre">';
print '<td width="100">'.$langs->trans("Name").'</td>'; print '<td width="100">'.$langs->trans("Name").'</td>';
print '<td>'.$langs->trans("Description").'</td>'; print '<td>'.$langs->trans("Description").'</td>';
print '<td>'.$langs->trans("Example").'</td>'; print '<td>'.$langs->trans("Example").'</td>';
print '<td align="center" width="60">'.$langs->trans("Status").'</td>'; print '<td class="center" width="60">'.$langs->trans("Status").'</td>';
print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>'; print '<td class="center" width="16">'.$langs->trans("ShortInfo").'</td>';
print "</tr>\n"; print "</tr>\n";
clearstatcache(); clearstatcache();
@ -249,7 +249,7 @@ foreach ($dirmodels as $reldir)
else print $tmp; else print $tmp;
print '</td>'."\n"; print '</td>'."\n";
print '<td align="center">'; print '<td class="center">';
if ($conf->global->CONTRACT_ADDON == "$file") if ($conf->global->CONTRACT_ADDON == "$file")
{ {
print img_picto($langs->trans("Activated"), 'switch_on'); print img_picto($langs->trans("Activated"), 'switch_on');
@ -280,7 +280,7 @@ foreach ($dirmodels as $reldir)
} }
} }
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>'; print '</td>';
@ -329,10 +329,10 @@ print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Name").'</td>'; print '<td>'.$langs->trans("Name").'</td>';
print '<td>'.$langs->trans("Description").'</td>'; print '<td>'.$langs->trans("Description").'</td>';
print '<td align="center" width="60">'.$langs->trans("Status")."</td>\n"; print '<td class="center" width="60">'.$langs->trans("Status")."</td>\n";
print '<td align="center" width="60">'.$langs->trans("Default")."</td>\n"; print '<td class="center" width="60">'.$langs->trans("Default")."</td>\n";
print '<td align="center" width="80">'.$langs->trans("ShortInfo").'</td>'; print '<td class="center" width="80">'.$langs->trans("ShortInfo").'</td>';
print '<td align="center" width="80">'.$langs->trans("Preview").'</td>'; print '<td class="center" width="80">'.$langs->trans("Preview").'</td>';
print "</tr>\n"; print "</tr>\n";
clearstatcache(); clearstatcache();
@ -384,7 +384,7 @@ foreach ($dirmodels as $reldir)
// Active // Active
if (in_array($name, $def)) if (in_array($name, $def))
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
print img_picto($langs->trans("Enabled"), 'switch_on'); print img_picto($langs->trans("Enabled"), 'switch_on');
print '</a>'; print '</a>';
@ -392,13 +392,13 @@ foreach ($dirmodels as $reldir)
} }
else else
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
print "</td>"; print "</td>";
} }
// Defaut // Defaut
print '<td align="center">'; print '<td class="center">';
if ($conf->global->CONTRACT_ADDON_PDF == $name) if ($conf->global->CONTRACT_ADDON_PDF == $name)
{ {
print img_picto($langs->trans("Default"), 'on'); print img_picto($langs->trans("Default"), 'on');
@ -424,12 +424,12 @@ foreach ($dirmodels as $reldir)
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1); $htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>'; print '</td>';
// Preview // Preview
print '<td align="center">'; print '<td class="center">';
if ($module->type == 'pdf') if ($module->type == 'pdf')
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'contract').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'contract').'</a>';
@ -466,7 +466,7 @@ print load_fiche_titre($langs->trans("OtherOptions"), '', '');
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameter").'</td>'; print '<td>'.$langs->trans("Parameter").'</td>';
print '<td align="center" width="60">'.$langs->trans("Value").'</td>'; print '<td class="center" width="60">'.$langs->trans("Value").'</td>';
print "</tr>\n"; print "</tr>\n";
$substitutionarray=pdf_getSubstitutionArray($langs, array('objectamount'), null, 2); $substitutionarray=pdf_getSubstitutionArray($langs, array('objectamount'), null, 2);

View File

@ -322,11 +322,11 @@ if (! empty($conf->multicompany->enabled) && !$user->entity)
} }
else else
{ {
print '<td align="center">'; print '<td class="center">';
print '<input type="hidden" name="entity" value="'.$conf->entity.'">'; print '<input type="hidden" name="entity" value="'.$conf->entity.'">';
print '</td>'; print '</td>';
} }
print '<td align="center">'; print '<td class="center">';
$disabled=''; $disabled='';
if (empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES)) $disabled=' disabled="disabled"'; if (empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES)) $disabled=' disabled="disabled"';
print '<input type="submit" class="button"'.$disabled.' value="'.$langs->trans("Add").'" name="add">'; print '<input type="submit" class="button"'.$disabled.' value="'.$langs->trans("Add").'" name="add">';
@ -385,7 +385,7 @@ if ($result)
print '<td></td>'; print '<td></td>';
// Actions // Actions
print '<td align="center">'; print '<td class="center">';
if ($action != 'edit' || GETPOST('rowid') != $obj->rowid) if ($action != 'edit' || GETPOST('rowid') != $obj->rowid)
{ {
print '<a href="'.$_SERVER['PHP_SELF'].'?rowid='.$obj->rowid.'&entity='.$obj->entity.'&mode='.$mode.'&action=edit'.((empty($user->entity) && $debug)?'&debug=1':'').'">'.img_edit().'</a>'; print '<a href="'.$_SERVER['PHP_SELF'].'?rowid='.$obj->rowid.'&entity='.$obj->entity.'&mode='.$mode.'&action=edit'.((empty($user->entity) && $debug)?'&debug=1':'').'">'.img_edit().'</a>';

View File

@ -1180,7 +1180,7 @@ if ($id)
} }
if ($id == 4) print '<td></td>'; if ($id == 4) print '<td></td>';
print '<td colspan="3" align="center">'; print '<td colspan="3" class="center">';
if ($action != 'edit') if ($action != 'edit')
{ {
print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">'; print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">';

View File

@ -77,8 +77,8 @@ print '<br>';
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Description").'</td>'; print '<td>'.$langs->trans("Description").'</td>';
print '<td align="center" width="20">&nbsp;</td>'; print '<td class="center" width="20">&nbsp;</td>';
print '<td align="center" width="100">'.$langs->trans("Value").'</td>'."\n"; print '<td class="center" width="100">'.$langs->trans("Value").'</td>'."\n";
print '</tr>'; print '</tr>';
$form = new Form($db); $form = new Form($db);
@ -87,9 +87,9 @@ $form = new Form($db);
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.$langs->trans("ECMAutoTree").'</td>'; print '<td>'.$langs->trans("ECMAutoTree").'</td>';
print '<td align="center" width="20">&nbsp;</td>'; print '<td class="center" width="20">&nbsp;</td>';
print '<td align="center" width="100">'; print '<td class="center" width="100">';
if ($conf->use_javascript_ajax) if ($conf->use_javascript_ajax)
{ {
print ajax_constantonoff('ECM_AUTO_TREE_ENABLED'); print ajax_constantonoff('ECM_AUTO_TREE_ENABLED');

View File

@ -412,7 +412,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder); $parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint; print $hookmanager->resPrint;
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"; print '</tr>'."\n";
@ -450,10 +450,10 @@ while ($i < min($num, $limit))
$cssforfield=''; $cssforfield='';
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center'; if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
elseif ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center'; elseif ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap'; if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
elseif ($key == 'ref') $cssforfield.=($cssforfield?' ':'').'nowrap'; elseif ($key == 'ref') $cssforfield.=($cssforfield?' ':'').'nowrap';
if (! empty($arrayfields['t.'.$key]['checked'])) if (! empty($arrayfields['t.'.$key]['checked']))
{ {
print '<td'; print '<td';
@ -480,7 +480,7 @@ while ($i < min($num, $limit))
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint; print $hookmanager->resPrint;
// Action column // 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 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; $selected=0;

View File

@ -106,7 +106,7 @@ if ($action != 'edit')
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>&nbsp;</td><td><input name="label" type="text" size="45"></td>'; print '<td>&nbsp;</td><td><input name="label" type="text" size="45"></td>';
print '<td align="center"><input type="submit" name="add" class="button" value="'.$langs->trans("Add").'"></td>'; print '<td class="center"><input type="submit" name="add" class="button" value="'.$langs->trans("Add").'"></td>';
print '</tr>'; print '</tr>';
} }

View File

@ -832,12 +832,12 @@ if ($mode == 'standard')
$link="<a href='".$_SERVER["PHP_SELF"]."?account=".$account.($_GET["option"]!='all'?'':'&option=all')."&year=".$prevyear."&month=".$prevmonth."'>".img_previous('', 'class="valignbottom"')."</a> ".$langs->trans("Month")." <a href='".$_SERVER["PHP_SELF"]."?account=".$account."&year=".$nextyear."&month=".$nextmonth."'>".img_next('', 'class="valignbottom"')."</a>"; $link="<a href='".$_SERVER["PHP_SELF"]."?account=".$account.($_GET["option"]!='all'?'':'&option=all')."&year=".$prevyear."&month=".$prevmonth."'>".img_previous('', 'class="valignbottom"')."</a> ".$langs->trans("Month")." <a href='".$_SERVER["PHP_SELF"]."?account=".$account."&year=".$nextyear."&month=".$nextmonth."'>".img_next('', 'class="valignbottom"')."</a>";
print '<tr><td class="right">'.$link.'</td></tr>'; print '<tr><td class="right">'.$link.'</td></tr>';
print '<tr><td align="center">'; print '<tr><td class="center">';
$file = "movement".$account."-".$year.$month.".png"; $file = "movement".$account."-".$year.$month.".png";
print $show4; print $show4;
print '</td></tr>'; print '</td></tr>';
print '<tr><td align="center">'; print '<tr><td class="center">';
print $show1; print $show1;
print '</td></tr>'; print '</td></tr>';
@ -846,18 +846,18 @@ if ($mode == 'standard')
$link="<a href='".$_SERVER["PHP_SELF"]."?account=".$account.($_GET["option"]!='all'?'':'&option=all')."&year=".($prevyear)."'>".img_previous('', 'class="valignbottom"')."</a> ".$langs->trans("Year")." <a href='".$_SERVER["PHP_SELF"]."?account=".$account."&year=".($nextyear)."'>".img_next('', 'class="valignbottom"')."</a>"; $link="<a href='".$_SERVER["PHP_SELF"]."?account=".$account.($_GET["option"]!='all'?'':'&option=all')."&year=".($prevyear)."'>".img_previous('', 'class="valignbottom"')."</a> ".$langs->trans("Year")." <a href='".$_SERVER["PHP_SELF"]."?account=".$account."&year=".($nextyear)."'>".img_next('', 'class="valignbottom"')."</a>";
print '<tr><td class="right">'.$link.'</td></tr>'; print '<tr><td class="right">'.$link.'</td></tr>';
print '<tr><td align="center">'; print '<tr><td class="center">';
print $show5; print $show5;
print '</td></tr>'; print '</td></tr>';
print '<tr><td align="center">'; print '<tr><td class="center">';
print $show2; print $show2;
print '</td></tr>'; print '</td></tr>';
} }
if ($mode == 'showalltime') if ($mode == 'showalltime')
{ {
print '<tr><td align="center">'; print '<tr><td class="center">';
print $show3; print $show3;
print '</td></tr>'; print '</td></tr>';
} }

View File

@ -369,7 +369,7 @@ if (! empty($arrayfields['balance']['checked']))
print '<td class="liste_titre"></td>'; print '<td class="liste_titre"></td>';
} }
// Action column // Action column
print '<td class="liste_titre" align="middle">'; print '<td class="liste_titre valignmiddle">';
$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1); $searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
print $searchpicto; print $searchpicto;
print '</td>'; print '</td>';
@ -383,19 +383,19 @@ if (! empty($arrayfields['accountype']['checked'])) print_liste_field_titr
if (! empty($arrayfields['b.number']['checked'])) print_liste_field_titre($arrayfields['b.number']['label'], $_SERVER["PHP_SELF"], 'b.number', '', $param, '', $sortfield, $sortorder); if (! empty($arrayfields['b.number']['checked'])) print_liste_field_titre($arrayfields['b.number']['label'], $_SERVER["PHP_SELF"], 'b.number', '', $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['b.account_number']['checked'])) print_liste_field_titre($arrayfields['b.account_number']['label'], $_SERVER["PHP_SELF"], 'b.account_number', '', $param, '', $sortfield, $sortorder); if (! empty($arrayfields['b.account_number']['checked'])) print_liste_field_titre($arrayfields['b.account_number']['label'], $_SERVER["PHP_SELF"], 'b.account_number', '', $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['b.fk_accountancy_journal']['checked'])) print_liste_field_titre($arrayfields['b.fk_accountancy_journal']['label'], $_SERVER["PHP_SELF"], 'b.fk_accountancy_journal', '', $param, '', $sortfield, $sortorder); if (! empty($arrayfields['b.fk_accountancy_journal']['checked'])) print_liste_field_titre($arrayfields['b.fk_accountancy_journal']['label'], $_SERVER["PHP_SELF"], 'b.fk_accountancy_journal', '', $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['b.currency_code']['checked'])) print_liste_field_titre($arrayfields['b.currency_code']['label'], $_SERVER["PHP_SELF"], 'b.currency_code', '', $param, 'align="center"', $sortfield, $sortorder); if (! empty($arrayfields['b.currency_code']['checked'])) print_liste_field_titre($arrayfields['b.currency_code']['label'], $_SERVER["PHP_SELF"], 'b.currency_code', '', $param, '', $sortfield, $sortorder, 'center ');
if (! empty($arrayfields['toreconcile']['checked'])) print_liste_field_titre($arrayfields['toreconcile']['label'], $_SERVER["PHP_SELF"], '', '', $param, 'align="center"', $sortfield, $sortorder); if (! empty($arrayfields['toreconcile']['checked'])) print_liste_field_titre($arrayfields['toreconcile']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ');
// Extra fields // Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields // Hook fields
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder); $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 $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint; print $hookmanager->resPrint;
if (! empty($arrayfields['b.datec']['checked'])) print_liste_field_titre($arrayfields['b.datec']['label'], $_SERVER["PHP_SELF"], "b.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); if (! empty($arrayfields['b.datec']['checked'])) print_liste_field_titre($arrayfields['b.datec']['label'], $_SERVER["PHP_SELF"], "b.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
if (! empty($arrayfields['b.tms']['checked'])) print_liste_field_titre($arrayfields['b.tms']['label'], $_SERVER["PHP_SELF"], "b.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); if (! empty($arrayfields['b.tms']['checked'])) print_liste_field_titre($arrayfields['b.tms']['label'], $_SERVER["PHP_SELF"], "b.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
if (! empty($arrayfields['b.clos']['checked'])) print_liste_field_titre($arrayfields['b.clos']['label'], $_SERVER["PHP_SELF"], 'b.clos', '', $param, 'align="center"', $sortfield, $sortorder); if (! empty($arrayfields['b.clos']['checked'])) print_liste_field_titre($arrayfields['b.clos']['label'], $_SERVER["PHP_SELF"], 'b.clos', '', $param, '', $sortfield, $sortorder, 'center ');
if (! empty($arrayfields['balance']['checked'])) print_liste_field_titre($arrayfields['balance']['label'], $_SERVER["PHP_SELF"], '', '', $param, 'class="right"', $sortfield, $sortorder); if (! empty($arrayfields['balance']['checked'])) print_liste_field_titre($arrayfields['balance']['label'], $_SERVER["PHP_SELF"], '', '', $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>\n";
@ -492,7 +492,7 @@ foreach ($accounts as $key=>$type)
// Currency // Currency
if (! empty($arrayfields['b.currency_code']['checked'])) if (! empty($arrayfields['b.currency_code']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
print $obj->currency_code; print $obj->currency_code;
print '</td>'; print '</td>';
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;
@ -501,7 +501,7 @@ foreach ($accounts as $key=>$type)
// Transactions to reconcile // Transactions to reconcile
if (! empty($arrayfields['toreconcile']['checked'])) if (! empty($arrayfields['toreconcile']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
if ($obj->rappro) if ($obj->rappro)
{ {
$result=$obj->load_board($user, $obj->id); $result=$obj->load_board($user, $obj->id);
@ -526,7 +526,7 @@ foreach ($accounts as $key=>$type)
// Date creation // Date creation
if (! empty($arrayfields['b.datec']['checked'])) if (! empty($arrayfields['b.datec']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
print dol_print_date($obj->date_creation, 'dayhour'); print dol_print_date($obj->date_creation, 'dayhour');
print '</td>'; print '</td>';
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;
@ -534,7 +534,7 @@ foreach ($accounts as $key=>$type)
// Date modification // Date modification
if (! empty($arrayfields['b.tms']['checked'])) if (! empty($arrayfields['b.tms']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
print dol_print_date($obj->date_update, 'dayhour'); print dol_print_date($obj->date_update, 'dayhour');
print '</td>'; print '</td>';
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;
@ -543,7 +543,7 @@ foreach ($accounts as $key=>$type)
// Status // Status
if (! empty($arrayfields['b.clos']['checked'])) if (! empty($arrayfields['b.clos']['checked']))
{ {
print '<td align="center">'.$obj->getLibStatut(5).'</td>'; print '<td class="center">'.$obj->getLibStatut(5).'</td>';
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;
} }
@ -559,7 +559,7 @@ foreach ($accounts as $key=>$type)
} }
// Action column // 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 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; $selected=0;

View File

@ -496,7 +496,7 @@ if (empty($numref))
} }
print '<td class="right">'.price(($balancestart[$objp->numr]+$content[$objp->numr]), '', $langs, 1, -1, -1, $conf->currency).'</td>'; print '<td class="right">'.price(($balancestart[$objp->numr]+$content[$objp->numr]), '', $langs, 1, -1, -1, $conf->currency).'</td>';
print '<td align="center">'; print '<td class="center">';
if ($user->rights->banque->consolidate && $action != 'editbankreceipt') { if ($user->rights->banque->consolidate && $action != 'editbankreceipt') {
print '<a href="'.$_SERVER["PHP_SELF"].'?account='.$object->id.'&action=editbankreceipt&brref='.$objp->numr.'">'.img_edit().'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?account='.$object->id.'&action=editbankreceipt&brref='.$objp->numr.'">'.img_edit().'</a>';
} }
@ -540,10 +540,10 @@ else
print '<input type="hidden" name="action" value="add">'; print '<input type="hidden" name="action" value="add">';
print '<div class="div-table-responsive">'; print '<div class="div-table-responsive">';
print '<table class="noborder" width="100%">'; print '<table class="noborder centpercent">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td align="center">'.$langs->trans("DateOperationShort").'</td>'; print '<td class="center">'.$langs->trans("DateOperationShort").'</td>';
print '<td align="center">'.$langs->trans("DateValueShort").'</td>'; print '<td class="center">'.$langs->trans("DateValueShort").'</td>';
print '<td>'.$langs->trans("Type").'</td>'; print '<td>'.$langs->trans("Type").'</td>';
print '<td>'.$langs->trans("Description").'</td>'; print '<td>'.$langs->trans("Description").'</td>';
print '<td class="right" width="60">'.$langs->trans("Debit").'</td>'; print '<td class="right" width="60">'.$langs->trans("Debit").'</td>';
@ -589,10 +589,10 @@ else
print '<tr class="oddeven">'; print '<tr class="oddeven">';
// Date operation // Date operation
print '<td class="nowrap" align="center">'.dol_print_date($db->jdate($objp->do), "day").'</td>'; print '<td class="nowrap center">'.dol_print_date($db->jdate($objp->do), "day").'</td>';
// Date de valeur // Date de valeur
print '<td align="center" valign="center" class="nowrap">'; print '<td valign="center" class="center nowrap">';
print dol_print_date($db->jdate($objp->dv), "day") .' '; print dol_print_date($db->jdate($objp->dv), "day") .' ';
print '<a href="releve.php?action=dvprev&amp;num='.$numref.'&amp;account='.$object->id.'&amp;dvid='.$objp->rowid.'">'; print '<a href="releve.php?action=dvprev&amp;num='.$numref.'&amp;account='.$object->id.'&amp;dvid='.$objp->rowid.'">';
print img_edit_remove() . "</a> "; print img_edit_remove() . "</a> ";
@ -778,13 +778,13 @@ else
if ($user->rights->banque->modifier || $user->rights->banque->consolidate) if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
{ {
print '<td align="center"><a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$objp->rowid.'&account='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?account='.$object->id.'&num='.$numref).'">'; print '<td class="center"><a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$objp->rowid.'&account='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?account='.$object->id.'&num='.$numref).'">';
print img_edit(); print img_edit();
print "</a></td>"; print "</a></td>";
} }
else else
{ {
print "<td align=\"center\">&nbsp;</td>"; print "<td class=\"center\">&nbsp;</td>";
} }
print "</tr>"; print "</tr>";
$i++; $i++;
@ -793,11 +793,11 @@ else
} }
// Line Total // Line Total
print "\n".'<tr class="liste_total"><td class="right" colspan="4">'.$langs->trans("Total")." :</td><td align=\"right\">".price($totald)."</td><td align=\"right\">".price($totalc)."</td><td>&nbsp;</td><td>&nbsp;</td></tr>"; print "\n".'<tr class="liste_total"><td class="right" colspan="4">'.$langs->trans("Total")." :</td><td class=\"right\">".price($totald)."</td><td class=\"right\">".price($totalc)."</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
// Line Balance // Line Balance
print "\n<tr>"; print "\n<tr>";
print "<td align=\"right\" colspan=\"3\">&nbsp;</td><td colspan=\"3\"><b>".$langs->trans("EndBankBalance")." :</b></td>"; print "<td class=\"right\" colspan=\"3\">&nbsp;</td><td colspan=\"3\"><b>".$langs->trans("EndBankBalance")." :</b></td>";
print '<td class="right"><b>'.price(price2num($total, 'MT'))."</b></td><td>&nbsp;</td>"; print '<td class="right"><b>'.price(price2num($total, 'MT'))."</b></td><td>&nbsp;</td>";
print "</tr>\n"; print "</tr>\n";
print "</table>"; print "</table>";

View File

@ -180,7 +180,7 @@ if ($result)
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
// Ref // Ref
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '<input class="flat" type="text" size="3" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">'; print '<input class="flat" type="text" size="3" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
print '</td>'; print '</td>';
@ -195,7 +195,7 @@ if ($result)
print '</td>'; print '</td>';
// Type // Type
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
$form->select_types_paiements($typeid, 'typeid', '', 0, 1, 1, 16); $form->select_types_paiements($typeid, 'typeid', '', 0, 1, 1, 16);
print '</td>'; print '</td>';
@ -233,13 +233,13 @@ if ($result)
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "v.rowid", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "v.rowid", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "v.label", "", $param, 'align="left"', $sortfield, $sortorder); print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "v.label", "", $param, '', $sortfield, $sortorder, 'left ');
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "v.datep", "", $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "v.datep", "", $param, '', $sortfield, $sortorder, 'center ');
print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "type", "", $param, 'align="left"', $sortfield, $sortorder); print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "type", "", $param, '', $sortfield, $sortorder, 'left ');
if (! empty($conf->banque->enabled)) print_liste_field_titre("BankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder); if (! empty($conf->banque->enabled)) print_liste_field_titre("BankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
if (! empty($conf->accounting->enabled)) print_liste_field_titre("AccountAccounting", $_SERVER["PHP_SELF"], "v.accountancy_code", "", $param, 'align="left"', $sortfield, $sortorder); if (! empty($conf->accounting->enabled)) print_liste_field_titre("AccountAccounting", $_SERVER["PHP_SELF"], "v.accountancy_code", "", $param, '', $sortfield, $sortorder, 'left ');
print_liste_field_titre("Debit", $_SERVER["PHP_SELF"], "v.amount", "", $param, 'class="right"', $sortfield, $sortorder); print_liste_field_titre("Debit", $_SERVER["PHP_SELF"], "v.amount", "", $param, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("Credit", $_SERVER["PHP_SELF"], "v.amount", "", $param, 'class="right"', $sortfield, $sortorder); print_liste_field_titre("Credit", $_SERVER["PHP_SELF"], "v.amount", "", $param, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch '); print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
print "</tr>\n"; print "</tr>\n";
@ -300,7 +300,7 @@ if ($result)
} }
// Debit // Debit
print "<td align=\"right\">"; print "<td class=\"right\">";
if ($obj->sens == 0) if ($obj->sens == 0)
{ {
print price($obj->amount); print price($obj->amount);
@ -309,7 +309,7 @@ if ($result)
print "</td>"; print "</td>";
// Credit // Credit
print "<td align=\"right\">"; print "<td class=\"right\">";
if ($obj->sens == 1) if ($obj->sens == 1)
{ {
print price($obj->amount); print price($obj->amount);

View File

@ -126,11 +126,11 @@ echo $this->control->tpl['ajax_selectcountry']; ?>
</tr> </tr>
<tr> <tr>
<td align="center" colspan="4"><input type="submit" class="button" value="<?php echo $langs->trans("Add"); ?>"></td> <td class="center" colspan="4"><input type="submit" class="button" value="<?php echo $langs->trans("Add"); ?>"></td>
</tr> </tr>
</table><br> </table><br>
</form> </form>
<!-- END PHP TEMPLATE --> <!-- END PHP TEMPLATE -->

View File

@ -149,7 +149,7 @@ echo $this->control->tpl['ajax_selectcountry'];
</tr> </tr>
<tr> <tr>
<td colspan="4" align="center"> <td colspan="4" class="center">
<input type="submit" class="button" name="save" value="<?php echo $langs->trans("Save"); ?>">&nbsp; <input type="submit" class="button" name="save" value="<?php echo $langs->trans("Save"); ?>">&nbsp;
<input type="submit" class="button" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>"> <input type="submit" class="button" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>">
</td> </td>
@ -159,4 +159,4 @@ echo $this->control->tpl['ajax_selectcountry'];
</form> </form>
<!-- END PHP TEMPLATE --> <!-- END PHP TEMPLATE -->

View File

@ -588,7 +588,7 @@ else
$rowspan=3; $rowspan=3;
if (empty($conf->global->SOCIETE_DISABLE_STATE)) $rowspan++; if (empty($conf->global->SOCIETE_DISABLE_STATE)) $rowspan++;
print '<td valign="middle" align="center" rowspan="'.$rowspan.'">'; print '<td class="valignmiddle center" rowspan="'.$rowspan.'">';
print '<a href="#" id="copyaddressfromsoc">'.$langs->trans('CopyAddressFromSoc').'</a>'; print '<a href="#" id="copyaddressfromsoc">'.$langs->trans('CopyAddressFromSoc').'</a>';
print '</td>'; print '</td>';
} }

View File

@ -379,16 +379,16 @@ if ($sql_select)
print $formother->select_month($month?$month:-1, 'month', 1, 0, 'valignmiddle'); print $formother->select_month($month?$month:-1, 'month', 1, 0, 'valignmiddle');
$formother->select_year($year?$year:-1, 'year', 1, 20, 1); $formother->select_year($year?$year:-1, 'year', 1, 20, 1);
print '</td>'; print '</td>';
print '<td class="liste_titre" align="center">'; print '<td class="liste_titre center">';
print '</td>'; print '</td>';
print '<td class="liste_titre left">'; print '<td class="liste_titre left">';
print '<input class="flat" type="text" name="sprod_fulldescr" size="15" value="'.dol_escape_htmltag($sprod_fulldescr).'">'; print '<input class="flat" type="text" name="sprod_fulldescr" size="15" value="'.dol_escape_htmltag($sprod_fulldescr).'">';
print '</td>'; print '</td>';
print '<td class="liste_titre" align="center">'; // TODO: Add filters ! print '<td class="liste_titre center">'; // TODO: Add filters !
print '</td>'; print '</td>';
print '<td class="liste_titre" align="center">'; print '<td class="liste_titre center">';
print '</td>'; print '</td>';
print '<td class="liste_titre" align="center">'; print '<td class="liste_titre center">';
print '</td>'; print '</td>';
print '<td class="liste_titre right">'; print '<td class="liste_titre right">';
$searchpicto=$form->showFilterAndCheckAddButtons(0); $searchpicto=$form->showFilterAndCheckAddButtons(0);
@ -399,8 +399,8 @@ if ($sql_select)
// Titles with sort buttons // Titles with sort buttons
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print_liste_field_titre('Ref', $_SERVER['PHP_SELF'], 'doc_number', '', $param, '', $sortfield, $sortorder, 'left '); print_liste_field_titre('Ref', $_SERVER['PHP_SELF'], 'doc_number', '', $param, '', $sortfield, $sortorder, 'left ');
print_liste_field_titre('Date', $_SERVER['PHP_SELF'], 'dateprint', '', $param, 'align="center" width="150"', $sortfield, $sortorder); print_liste_field_titre('Date', $_SERVER['PHP_SELF'], 'dateprint', '', $param, 'width="150"', $sortfield, $sortorder, 'center ');
print_liste_field_titre('Status', $_SERVER['PHP_SELF'], 'fk_statut', '', $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre('Status', $_SERVER['PHP_SELF'], 'fk_statut', '', $param, '', $sortfield, $sortorder, 'center ');
print_liste_field_titre('Product', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'left '); print_liste_field_titre('Product', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'left ');
print_liste_field_titre('ContactType', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'left '); print_liste_field_titre('ContactType', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'left ');
print_liste_field_titre('Quantity', $_SERVER['PHP_SELF'], 'prod_qty', '', $param, '', $sortfield, $sortorder, 'right '); print_liste_field_titre('Quantity', $_SERVER['PHP_SELF'], 'prod_qty', '', $param, '', $sortfield, $sortorder, 'right ');
@ -427,10 +427,10 @@ if ($sql_select)
print '<td class="nobordernopadding nowrap" width="100">'; print '<td class="nobordernopadding nowrap" width="100">';
print $documentstatic->getNomUrl(1); print $documentstatic->getNomUrl(1);
print '</td>'; print '</td>';
print '<td align="center" width="80">'.dol_print_date($db->jdate($objp->dateprint), 'day').'</td>'; print '<td class="center" width="80">'.dol_print_date($db->jdate($objp->dateprint), 'day').'</td>';
// Status // Status
print '<td align="center">'; print '<td class="center">';
if ($type_element == 'contract') if ($type_element == 'contract')
{ {
print $documentstaticline->getLibStatut(2); print $documentstaticline->getLibStatut(2);
@ -616,17 +616,15 @@ if ($sql_select)
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num); print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num);
} }
$db->free($resql); $db->free($resql);
} } elseif (empty($type_element) || $type_element == -1) {
elseif (empty($type_element) || $type_element == -1)
{
print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', ''); print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', '');
print '<table class="liste" width="100%">'."\n"; print '<table class="liste" width="100%">'."\n";
// Titles with sort buttons // Titles with sort buttons
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print_liste_field_titre('Ref', $_SERVER['PHP_SELF'], 'doc_number', '', $param, '', $sortfield, $sortorder, 'left '); print_liste_field_titre('Ref', $_SERVER['PHP_SELF'], 'doc_number', '', $param, '', $sortfield, $sortorder, 'left ');
print_liste_field_titre('Date', $_SERVER['PHP_SELF'], 'dateprint', '', $param, 'align="center" width="150"', $sortfield, $sortorder); print_liste_field_titre('Date', $_SERVER['PHP_SELF'], 'dateprint', '', $param, 'width="150"', $sortfield, $sortorder, 'center ');
print_liste_field_titre('Status', $_SERVER['PHP_SELF'], 'fk_status', '', $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre('Status', $_SERVER['PHP_SELF'], 'fk_status', '', $param, '', $sortfield, $sortorder, 'center ');
print_liste_field_titre('Product', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'left '); print_liste_field_titre('Product', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'left ');
print_liste_field_titre('Quantity', $_SERVER['PHP_SELF'], 'prod_qty', '', $param, '', $sortfield, $sortorder, 'right '); print_liste_field_titre('Quantity', $_SERVER['PHP_SELF'], 'prod_qty', '', $param, '', $sortfield, $sortorder, 'right ');
print "</tr>\n"; print "</tr>\n";
@ -634,8 +632,7 @@ elseif (empty($type_element) || $type_element == -1)
print '<tr class="oddeven"><td class="opacitymedium" colspan="5">'.$langs->trans("SelectElementAndClick", $langs->transnoentitiesnoconv("Search")).'</td></tr>'; print '<tr class="oddeven"><td class="opacitymedium" colspan="5">'.$langs->trans("SelectElementAndClick", $langs->transnoentitiesnoconv("Search")).'</td></tr>';
print "</table>"; print "</table>";
} } else {
else {
print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', ''); print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', '');
print '<table class="liste" width="100%">'."\n"; print '<table class="liste" width="100%">'."\n";

View File

@ -688,7 +688,9 @@ if (! empty($arrayfields['p.zip']['checked'])) print_liste_field
if (! empty($arrayfields['p.town']['checked'])) print_liste_field_titre($arrayfields['p.town']['label'], $_SERVER["PHP_SELF"], "p.town", $begin, $param, '', $sortfield, $sortorder); if (! empty($arrayfields['p.town']['checked'])) print_liste_field_titre($arrayfields['p.town']['label'], $_SERVER["PHP_SELF"], "p.town", $begin, $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['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'],$_SERVER["PHP_SELF"],"state.nom","",$param,'',$sortfield,$sortorder);
//if (! empty($arrayfields['region.nom']['checked'])) print_liste_field_titre($arrayfields['region.nom']['label'],$_SERVER["PHP_SELF"],"region.nom","",$param,'',$sortfield,$sortorder); //if (! empty($arrayfields['region.nom']['checked'])) print_liste_field_titre($arrayfields['region.nom']['label'],$_SERVER["PHP_SELF"],"region.nom","",$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "co.code_iso", "", $param, 'align="center"', $sortfield, $sortorder); if (! empty($arrayfields['country.code_iso']['checked'])) {
print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "co.code_iso", "", $param, '', $sortfield, $sortorder, 'center ');
}
if (! empty($arrayfields['p.phone']['checked'])) print_liste_field_titre($arrayfields['p.phone']['label'], $_SERVER["PHP_SELF"], "p.phone", $begin, $param, '', $sortfield, $sortorder); if (! empty($arrayfields['p.phone']['checked'])) print_liste_field_titre($arrayfields['p.phone']['label'], $_SERVER["PHP_SELF"], "p.phone", $begin, $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['p.phone_perso']['checked'])) print_liste_field_titre($arrayfields['p.phone_perso']['label'], $_SERVER["PHP_SELF"], "p.phone_perso", $begin, $param, '', $sortfield, $sortorder); if (! empty($arrayfields['p.phone_perso']['checked'])) print_liste_field_titre($arrayfields['p.phone_perso']['label'], $_SERVER["PHP_SELF"], "p.phone_perso", $begin, $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['p.phone_mobile']['checked'])) print_liste_field_titre($arrayfields['p.phone_mobile']['label'], $_SERVER["PHP_SELF"], "p.phone_mobile", $begin, $param, '', $sortfield, $sortorder); if (! empty($arrayfields['p.phone_mobile']['checked'])) print_liste_field_titre($arrayfields['p.phone_mobile']['label'], $_SERVER["PHP_SELF"], "p.phone_mobile", $begin, $param, '', $sortfield, $sortorder);
@ -702,14 +704,27 @@ if (! empty($arrayfields['p.priv']['checked'])) print_liste_field
// Extra fields // Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields // Hook fields
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder); $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 $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint; print $hookmanager->resPrint;
if (! empty($arrayfields['p.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap '); if (! empty($arrayfields['p.datec']['checked'])) {
if (! empty($arrayfields['p.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
if (! empty($arrayfields['p.statut']['checked'])) print_liste_field_titre($arrayfields['p.statut']['label'], $_SERVER["PHP_SELF"], "p.statut", "", $param, '', $sortfield, $sortorder, 'center '); }
if (! empty($arrayfields['p.import_key']['checked'])) print_liste_field_titre($arrayfields['p.import_key']['label'], $_SERVER["PHP_SELF"], "p.import_key", "", $param, '', $sortfield, $sortorder, 'center '); if (! empty($arrayfields['p.tms']['checked'])) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
}
if (! empty($arrayfields['p.statut']['checked'])) {
print_liste_field_titre($arrayfields['p.statut']['label'], $_SERVER["PHP_SELF"], "p.statut", "", $param, '', $sortfield, $sortorder, 'center ');
}
if (! empty($arrayfields['p.import_key']['checked'])) {
print_liste_field_titre($arrayfields['p.import_key']['label'], $_SERVER["PHP_SELF"], "p.import_key", "", $param, '', $sortfield, $sortorder, 'center ');
}
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
print "</tr>\n"; print "</tr>\n";

View File

@ -157,13 +157,13 @@ if ($action == 'edit')
print '</td>'; print '</td>';
// Photo // Photo
print '<td align="center" class="hideonsmartphone" valign="middle" rowspan="6">'; print '<td class="center hideonsmartphone valignmiddle" rowspan="6">';
print $form->showphoto('contact', $object)."\n"; print $form->showphoto('contact', $object)."\n";
if ($object->photo) print "<br>\n"; if ($object->photo) print "<br>\n";
print '<table class="nobordernopadding">'; print '<table class="nobordernopadding">';
if ($object->photo) print '<tr><td align="center"><input type="checkbox" class="flat photodelete" name="deletephoto" id="photodelete"> '.$langs->trans("Delete").'<br><br></td></tr>'; if ($object->photo) print '<tr><td class="center"><input type="checkbox" class="flat photodelete" name="deletephoto" id="photodelete"> '.$langs->trans("Delete").'<br><br></td></tr>';
print '<tr><td>'.$langs->trans("PhotoFile").'</td></tr>'; print '<tr><td>'.$langs->trans("PhotoFile").'</td></tr>';
print '<tr><td><input type="file" class="flat" name="photo" id="photoinput"></td></tr>'; print '<tr><td><input type="file" class="flat" name="photo" id="photoinput"></td></tr>';
print '</table>'; print '</table>';

View File

@ -28,18 +28,18 @@ include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php';
*/ */
class box_graph_orders_supplier_permonth extends ModeleBoxes class box_graph_orders_supplier_permonth extends ModeleBoxes
{ {
var $boxcode="orderssupplierpermonth"; public $boxcode="orderssupplierpermonth";
var $boximg="object_order"; public $boximg="object_order";
var $boxlabel="BoxSuppliersOrdersPerMonth"; public $boxlabel="BoxSuppliersOrdersPerMonth";
var $depends = array("fournisseur"); public $depends = array("fournisseur");
/** /**
* @var DoliDB Database handler. * @var DoliDB Database handler.
*/ */
public $db; public $db;
var $info_box_head = array(); public $info_box_head = array();
var $info_box_contents = array(); public $info_box_contents = array();
/** /**

View File

@ -936,7 +936,7 @@ class DolGraph
$tag=dol_escape_htmltag(dol_string_unaccent(dol_string_nospecial(basename($file), '_', array('-','.')))); $tag=dol_escape_htmltag(dol_string_unaccent(dol_string_nospecial(basename($file), '_', array('-','.'))));
$this->stringtoshow ='<!-- Build using '.$this->_library.' -->'."\n"; $this->stringtoshow ='<!-- Build using '.$this->_library.' -->'."\n";
if (! empty($this->title)) $this->stringtoshow.='<div align="center" class="dolgraphtitle'.(empty($this->cssprefix)?'':' dolgraphtitle'.$this->cssprefix).'">'.$this->title.'</div>'; if (! empty($this->title)) $this->stringtoshow.='<div class="center" class="dolgraphtitle'.(empty($this->cssprefix)?'':' dolgraphtitle'.$this->cssprefix).'">'.$this->title.'</div>';
if (! empty($this->shownographyet)) if (! empty($this->shownographyet))
{ {
$this->stringtoshow.='<div style="width:'.$this->width.'px;height:'.$this->height.'px;" class="nographyet"></div>'; $this->stringtoshow.='<div style="width:'.$this->width.'px;height:'.$this->height.'px;" class="nographyet"></div>';

View File

@ -2017,30 +2017,30 @@ function cleanCorruptedTree($db, $tabletocleantree, $fieldfkparent)
/** /**
* Get an array with properties of an element * Get an array with properties of an element
* *
* @param string $element_type Element type: 'action', 'facture', 'project_task' or 'object@modulext'... * @param string $element_type Element type: 'action', 'facture', 'project_task' or 'object@modulext'...
* @return array (module, classpath, element, subelement, classfile, classname) * @return array (module, classpath, element, subelement, classfile, classname)
*/ */
function getElementProperties($element_type) function getElementProperties($element_type)
{ {
// Parse element/subelement (ex: project_task) // Parse element/subelement (ex: project_task)
$module = $element = $subelement = $element_type; $module = $element_type;
$element = $element_type;
$subelement = $element_type;
// If we ask an resource form external module (instead of default path) // If we ask an resource form external module (instead of default path)
if (preg_match('/^([^@]+)@([^@]+)$/i', $element_type, $regs)) if (preg_match('/^([^@]+)@([^@]+)$/i', $element_type, $regs)) {
{
$element = $subelement = $regs[1]; $element = $subelement = $regs[1];
$module = $regs[2]; $module = $regs[2];
} }
//print '<br>1. element : '.$element.' - module : '.$module .'<br>'; //print '<br>1. element : '.$element.' - module : '.$module .'<br>';
if ( preg_match('/^([^_]+)_([^_]+)/i', $element, $regs)) if ( preg_match('/^([^_]+)_([^_]+)/i', $element, $regs)) {
{
$module = $element = $regs[1]; $module = $element = $regs[1];
$subelement = $regs[2]; $subelement = $regs[2];
} }
// For compat // For compat
if($element_type == "action") { if ($element_type == "action") {
$classpath = 'comm/action/class'; $classpath = 'comm/action/class';
$subelement = 'Actioncomm'; $subelement = 'Actioncomm';
$module = 'agenda'; $module = 'agenda';
@ -2049,13 +2049,13 @@ function getElementProperties($element_type)
// To work with non standard path // To work with non standard path
if ($element_type == 'facture' || $element_type == 'invoice') { if ($element_type == 'facture' || $element_type == 'invoice') {
$classpath = 'compta/facture/class'; $classpath = 'compta/facture/class';
$module='facture'; $module ='facture';
$subelement='facture'; $subelement = 'facture';
} }
if ($element_type == 'commande' || $element_type == 'order') { if ($element_type == 'commande' || $element_type == 'order') {
$classpath = 'commande/class'; $classpath = 'commande/class';
$module='commande'; $module = 'commande';
$subelement='commande'; $subelement = 'commande';
} }
if ($element_type == 'propal') { if ($element_type == 'propal') {
$classpath = 'comm/propal/class'; $classpath = 'comm/propal/class';
@ -2142,8 +2142,7 @@ function getElementProperties($element_type)
*/ */
function fetchObjectByElement($element_id, $element_type, $element_ref = '') function fetchObjectByElement($element_id, $element_type, $element_ref = '')
{ {
global $conf; global $conf, $db;
global $db,$conf;
$element_prop = getElementProperties($element_type); $element_prop = getElementProperties($element_type);
if (is_array($element_prop) && $conf->{$element_prop['module']}->enabled) if (is_array($element_prop) && $conf->{$element_prop['module']}->enabled)
@ -2270,7 +2269,7 @@ function getModuleDirForApiClass($module)
$moduledirforclass = 'commande'; $moduledirforclass = 'commande';
} }
elseif ($module == 'shipments') { elseif ($module == 'shipments') {
$moduledirforclass = 'expedition'; $moduledirforclass = 'expedition';
} }
elseif ($module == 'facture' || $module == 'invoice' || $module == 'invoices') { elseif ($module == 'facture' || $module == 'invoice' || $module == 'invoices') {
$moduledirforclass = 'compta/facture'; $moduledirforclass = 'compta/facture';

View File

@ -36,14 +36,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
class pdf_ban extends ModeleBankAccountDoc class pdf_ban extends ModeleBankAccountDoc
{ {
/** /**
* Issuer * @var Societe Issuer
* @var Societe
*/ */
public $emetteur; public $emetteur;
/** /**
* Dolibarr version of the loaded document * @var string Dolibarr version of the loaded document
* @public string
*/ */
public $version = 'development'; public $version = 'development';

View File

@ -53,8 +53,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * @var string Dolibarr version of the loaded document
* @public string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';

View File

@ -45,14 +45,14 @@ class doc_generic_contract_odt extends ModelePDFContract
public $emetteur; public $emetteur;
/** /**
* @var array() Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @var string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';

View File

@ -47,14 +47,14 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
public $emetteur; public $emetteur;
/** /**
* @var array() Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @var string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';

View File

@ -61,14 +61,14 @@ class pdf_standard extends ModeleExpenseReport
public $type; public $type;
/** /**
* @var array() Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @var string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';

View File

@ -46,14 +46,14 @@ class doc_generic_invoice_odt extends ModelePDFFactures
public $emetteur; public $emetteur;
/** /**
* @var array() Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @var string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';

View File

@ -69,14 +69,14 @@ class pdf_crabe extends ModelePDFFactures
public $type; public $type;
/** /**
* @var array() Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @var string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';

View File

@ -76,7 +76,7 @@ class pdf_sponge extends ModelePDFFactures
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @var string
*/ */
public $version = 'development'; public $version = 'development';

View File

@ -59,14 +59,14 @@ class pdf_soleil extends ModelePDFFicheinter
public $type; public $type;
/** /**
* @var array() Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @var string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';

View File

@ -60,14 +60,14 @@ class pdf_typhon extends ModelePDFDeliveryOrder
public $type; public $type;
/** /**
* @var array() Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @var string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';

View File

@ -44,14 +44,14 @@ class doc_generic_product_odt extends ModelePDFProduct
public $emetteur; public $emetteur;
/** /**
* @var array() Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @var string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';

View File

@ -57,14 +57,14 @@ class pdf_standard extends ModelePDFProduct
public $type; public $type;
/** /**
* @var array() Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @var string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';

View File

@ -61,14 +61,14 @@ class doc_generic_project_odt extends ModelePDFProjects
public $emetteur; public $emetteur;
/** /**
* @var array() Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @var string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';

View File

@ -59,14 +59,14 @@ class pdf_baleine extends ModelePDFProjects
public $type; public $type;
/** /**
* @var array() Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @var string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';

View File

@ -38,23 +38,21 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
*/ */
class doc_generic_proposal_odt extends ModelePDFPropales class doc_generic_proposal_odt extends ModelePDFPropales
{ {
/** /**
* Issuer * @var Company Issuer object that emits
* @var Company object that emits
*/
public $emetteur;
/**
* @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
*/ */
public $version = 'dolibarr'; public $emetteur;
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* @var string Dolibarr version of the loaded document
*/
public $version = 'dolibarr';
/** /**
@ -369,7 +367,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
// Open and load template // Open and load template
require_once ODTPHP_PATH.'odf.php'; require_once ODTPHP_PATH.'odf.php';
try { try {
$odfHandler = new odf( $odfHandler = new odf(
$srctemplatepath, $srctemplatepath,
array( array(
'PATH_TO_TMP' => $conf->propal->multidir_temp[$object->entity], 'PATH_TO_TMP' => $conf->propal->multidir_temp[$object->entity],

View File

@ -67,14 +67,14 @@ class pdf_azur extends ModelePDFPropales
public $type; public $type;
/** /**
* @var array() Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @var string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';

View File

@ -41,22 +41,25 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
*/ */
class pdf_cyan extends ModelePDFPropales class pdf_cyan extends ModelePDFPropales
{ {
public $db; /**
* @var DoliDb Database handler
*/
public $db;
public $name; public $name;
public $description; public $description;
public $update_main_doc_field; // Save the name of generated file as the main doc when generating a doc with this template public $update_main_doc_field; // Save the name of generated file as the main doc when generating a doc with this template
public $type; public $type;
public $phpmin = array(4,3,0); // Minimum version of PHP required by module public $phpmin = array(5, 4); // Minimum version of PHP required by module
public $version = 'development'; public $version = 'development';
public $page_largeur; public $page_largeur;
public $page_hauteur; public $page_hauteur;
public $format; public $format;
public $marge_gauche; public $marge_gauche;
public $marge_droite; public $marge_droite;
public $marge_haute; public $marge_haute;
public $marge_basse; public $marge_basse;
public $emetteur; // Objet societe qui emet public $emetteur; // Objet societe qui emet

View File

@ -1,20 +1,21 @@
<?php <?php
/* Copyright (C) 2018 Quentin Vial-Gouteyron <quentin.vial-gouteyron@atm-consulting.fr> /* Copyright (C) 2018 Quentin Vial-Gouteyron <quentin.vial-gouteyron@atm-consulting.fr>
* * Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * This program is free software; you can redistribute it and/or modify
* the Free Software Foundation; either version 3 of the License, or * it under the terms of the GNU General Public License as published by
* (at your option) any later version. * the Free Software Foundation; either version 3 of the License, or
* * (at your option) any later version.
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * This program is distributed in the hope that it will be useful,
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * but WITHOUT ANY WARRANTY; without even the implied warranty of
* GNU General Public License for more details. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* * GNU General Public License for more details.
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. * You should have received a copy of the GNU General Public License
* or see http://www.gnu.org/ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ * or see http://www.gnu.org/
*/
/** /**
* \file htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php * \file htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php
@ -35,10 +36,21 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
*/ */
class doc_generic_reception_odt extends ModelePdfReception class doc_generic_reception_odt extends ModelePdfReception
{ {
var $emetteur; // Objet societe qui emet /**
* @var Company Issuer object that emits
*/
public $emetteur; // Objet societe qui emet
var $phpmin = array(5,2,0); // Minimum version of PHP required by module /**
var $version = 'dolibarr'; * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4); // Minimum version of PHP required by module
/**
* @var string Dolibarr version of the loaded document
*/
public $version = 'dolibarr';
/** /**
@ -318,7 +330,7 @@ class doc_generic_reception_odt extends ModelePdfReception
// Open and load template // Open and load template
require_once ODTPHP_PATH.'odf.php'; require_once ODTPHP_PATH.'odf.php';
try { try {
$odfHandler = new odf( $odfHandler = new odf(
$srctemplatepath, $srctemplatepath,
array( array(
'PATH_TO_TMP' => $conf->reception->dir_temp, 'PATH_TO_TMP' => $conf->reception->dir_temp,
@ -343,10 +355,9 @@ class doc_generic_reception_odt extends ModelePdfReception
// Make substitutions into odt of freetext // Make substitutions into odt of freetext
try { try {
$odfHandler->setVars('free_text', $newfreetext, true, 'UTF-8'); $odfHandler->setVars('free_text', $newfreetext, true, 'UTF-8');
} } catch(OdfException $e) {
catch(OdfException $e) dol_syslog($e->getMessage(), LOG_INFO);
{ }
}
// Make substitutions into odt of user info // Make substitutions into odt of user info
$tmparray=$this->get_substitutionarray_user($user, $outputlangs); $tmparray=$this->get_substitutionarray_user($user, $outputlangs);
@ -364,9 +375,8 @@ class doc_generic_reception_odt extends ModelePdfReception
{ {
$odfHandler->setVars($key, $value, true, 'UTF-8'); $odfHandler->setVars($key, $value, true, 'UTF-8');
} }
} } catch(OdfException $e) {
catch(OdfException $e) dol_syslog($e->getMessage(), LOG_INFO);
{
} }
} }
// Make substitutions into odt of mysoc // Make substitutions into odt of mysoc
@ -385,9 +395,8 @@ class doc_generic_reception_odt extends ModelePdfReception
{ {
$odfHandler->setVars($key, $value, true, 'UTF-8'); $odfHandler->setVars($key, $value, true, 'UTF-8');
} }
} } catch(OdfException $e) {
catch(OdfException $e) dol_syslog($e->getMessage(), LOG_INFO);
{
} }
} }
// Make substitutions into odt of thirdparty // Make substitutions into odt of thirdparty
@ -404,9 +413,8 @@ class doc_generic_reception_odt extends ModelePdfReception
{ {
$odfHandler->setVars($key, $value, true, 'UTF-8'); $odfHandler->setVars($key, $value, true, 'UTF-8');
} }
} } catch(OdfException $e) {
catch(OdfException $e) dol_syslog($e->getMessage(), LOG_INFO);
{
} }
} }
// Replace tags of object + external modules // Replace tags of object + external modules
@ -427,9 +435,8 @@ class doc_generic_reception_odt extends ModelePdfReception
{ {
$odfHandler->setVars($key, $value, true, 'UTF-8'); $odfHandler->setVars($key, $value, true, 'UTF-8');
} }
} } catch(OdfException $e) {
catch(OdfException $e) dol_syslog($e->getMessage(), LOG_INFO);
{
} }
} }
// Replace tags of lines // Replace tags of lines
@ -445,15 +452,12 @@ class doc_generic_reception_odt extends ModelePdfReception
$reshook=$hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks $reshook=$hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
foreach($tmparray as $key => $val) foreach($tmparray as $key => $val)
{ {
try try {
{
$listlines->setVars($key, $val, true, 'UTF-8'); $listlines->setVars($key, $val, true, 'UTF-8');
} } catch(OdfException $e) {
catch(OdfException $e) dol_syslog($e->getMessage(), LOG_INFO);
{ } catch(SegmentException $e) {
} dol_syslog($e->getMessage(), LOG_INFO);
catch(SegmentException $e)
{
} }
} }
$listlines->merge(); $listlines->merge();
@ -473,9 +477,8 @@ class doc_generic_reception_odt extends ModelePdfReception
{ {
try { try {
$odfHandler->setVars($key, $value, true, 'UTF-8'); $odfHandler->setVars($key, $value, true, 'UTF-8');
} } catch(OdfException $e) {
catch(OdfException $e) dol_syslog($e->getMessage(), LOG_INFO);
{
} }
} }
@ -487,7 +490,7 @@ class doc_generic_reception_odt extends ModelePdfReception
if (!empty($conf->global->MAIN_ODT_AS_PDF)) { if (!empty($conf->global->MAIN_ODT_AS_PDF)) {
try { try {
$odfHandler->exportAsAttachedPDF($file); $odfHandler->exportAsAttachedPDF($file);
}catch (Exception $e){ } catch (Exception $e){
$this->error=$e->getMessage(); $this->error=$e->getMessage();
return -1; return -1;
} }
@ -495,7 +498,7 @@ class doc_generic_reception_odt extends ModelePdfReception
else { else {
try { try {
$odfHandler->saveToDisk($file); $odfHandler->saveToDisk($file);
}catch (Exception $e){ } catch (Exception $e){
$this->error=$e->getMessage(); $this->error=$e->getMessage();
return -1; return -1;
} }

View File

@ -29,7 +29,7 @@
*/ */
abstract class ModelePdfReception extends CommonDocGenerator abstract class ModelePdfReception extends CommonDocGenerator
{ {
var $error=''; public $error='';
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps

View File

@ -43,7 +43,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
public $emetteur; public $emetteur;
/** /**
* @var array() Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);

View File

@ -43,15 +43,15 @@ class doc_generic_stock_odt extends ModelePDFStock
*/ */
public $emetteur; public $emetteur;
/** /**
* @var array() Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @var string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';

View File

@ -57,14 +57,14 @@ class pdf_standard extends ModelePDFStock
public $type; public $type;
/** /**
* @var array() Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @var string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';

View File

@ -58,14 +58,14 @@ class pdf_stdmovement extends ModelePDFMovement
public $type; public $type;
/** /**
* @var array() Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @var string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';
@ -105,8 +105,7 @@ class pdf_stdmovement extends ModelePDFMovement
public $marge_basse; public $marge_basse;
/** /**
* Issuer * @var Societe Issuer
* @var Societe
*/ */
public $emetteur; public $emetteur;

View File

@ -58,14 +58,14 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
public $type; public $type;
/** /**
* @var array() Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @var string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';

View File

@ -62,14 +62,14 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
public $type; public $type;
/** /**
* @var array() Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @var string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';

View File

@ -59,14 +59,14 @@ class pdf_standard extends ModelePDFSuppliersPayments
public $type; public $type;
/** /**
* @var array() Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @var string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';

View File

@ -45,14 +45,14 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
public $emetteur; public $emetteur;
/** /**
* @var array() Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @var string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';

View File

@ -59,14 +59,14 @@ class pdf_aurore extends ModelePDFSupplierProposal
public $type; public $type;
/** /**
* @var array() Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @var string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';

View File

@ -37,21 +37,20 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
class doc_generic_user_odt extends ModelePDFUser class doc_generic_user_odt extends ModelePDFUser
{ {
/** /**
* Issuer * @var Societe Issuer
* @var Societe
*/ */
public $emetteur; public $emetteur;
/** /**
* @var array() Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @var string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';

View File

@ -45,14 +45,14 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
public $emetteur; public $emetteur;
/** /**
* @var array() Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @var string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';
@ -67,7 +67,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
global $conf, $langs, $mysoc; global $conf, $langs, $mysoc;
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array("main","companies")); $langs->loadLangs(array("main","companies"));
$this->db = $db; $this->db = $db;
$this->name = "ODT templates"; $this->name = "ODT templates";

View File

@ -541,7 +541,7 @@ print '<script type="text/javascript" language="javascript">
print load_fiche_titre($langs->trans("ToClearAllRecipientsClickHere")); print load_fiche_titre($langs->trans("ToClearAllRecipientsClickHere"));
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td class="liste_titre" align="right"><input type="submit" class="button" value="' . $langs->trans("TargetsReset") . '"></td>'; print '<td class="liste_titre right"><input type="submit" class="button" value="' . $langs->trans("TargetsReset") . '"></td>';
print '</tr>'; print '</tr>';
print '</table>'; print '</table>';
print '</form>'; print '</form>';

View File

@ -48,7 +48,7 @@ print $doleditor->Create(1);
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">'; print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
print '</td></tr>'; print '</td></tr>';
print '</table></form>'; print '</table></form>';

View File

@ -175,11 +175,11 @@ if ($permission) {
?> ?>
<form class="tagtr oddeven <?php echo ($var?'impair':'pair') ?>"> <form class="tagtr oddeven <?php echo ($var?'impair':'pair') ?>">
<div class="tagtd" align="left"> <div class="tagtd left">
<?php if ($tab[$i]['source']=='internal') echo $langs->trans("User"); ?> <?php if ($tab[$i]['source']=='internal') echo $langs->trans("User"); ?>
<?php if ($tab[$i]['source']=='external') echo $langs->trans("ThirdPartyContact"); ?> <?php if ($tab[$i]['source']=='external') echo $langs->trans("ThirdPartyContact"); ?>
</div> </div>
<div class="tagtd" align="left"> <div class="tagtd left">
<?php <?php
if ($tab[$i]['socid'] > 0) if ($tab[$i]['socid'] > 0)
{ {

View File

@ -20,7 +20,7 @@ if (! empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_
{ {
$align=$extrafields->getAlignFlag($key, $extrafieldsobjectkey); $align=$extrafields->getAlignFlag($key, $extrafieldsobjectkey);
print '<td'; print '<td';
if ($align) print ' align="'.$align.'"'; if ($align) print ' class="'.$align.'"';
print '>'; print '>';
$tmpkey='options_'.$key; $tmpkey='options_'.$key;
if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$key], array('date', 'datetime', 'timestamp')) && !is_numeric($obj->$tmpkey)) if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$key], array('date', 'datetime', 'timestamp')) && !is_numeric($obj->$tmpkey))

View File

@ -10,10 +10,10 @@ if (empty($conf) || ! is_object($conf))
// Loop to complete $param for extrafields // Loop to complete $param for extrafields
if (! empty($search_array_options)) // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ... if (! empty($search_array_options)) // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ...
{ {
foreach ($search_array_options as $key => $val) foreach ($search_array_options as $key => $val)
{ {
$crit=$val; $crit=$val;
$tmpkey=preg_replace('/search_options_/', '', $key); $tmpkey=preg_replace('/search_options_/', '', $key);
if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val); if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val);
} }
} }

View File

@ -122,7 +122,7 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
{ {
$fieldid='id'; $fieldid='id';
if ($object->table_element == 'societe') $fieldid='socid'; if ($object->table_element == 'societe') $fieldid='socid';
print '<td align="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?'.$fieldid.'=' . $object->id . '&action=edit_extras&attribute=' . $key . '">' . img_edit().'</a></td>'; print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?'.$fieldid.'=' . $object->id . '&action=edit_extras&attribute=' . $key . '">' . img_edit().'</a></td>';
} }
print '</tr></table>'; print '</tr></table>';
print '</td>'; print '</td>';

View File

@ -149,7 +149,7 @@ if (empty($action) || $action == 'editfile' || $action == 'file_manager' || preg
print '<!-- Title for manual directories -->'."\n"; print '<!-- Title for manual directories -->'."\n";
print '<tr class="liste_titre">'."\n"; print '<tr class="liste_titre">'."\n";
print '<th class="liste_titre" align="left">'; print '<th class="liste_titre left">';
print '&nbsp;'.$langs->trans("ECMSections"); print '&nbsp;'.$langs->trans("ECMSections");
print '</th></tr>'; print '</th></tr>';

View File

@ -143,7 +143,7 @@ $coldisplay=-1; // We remove first td
$coldisplay++; $coldisplay++;
if ($line->fk_prev_id == null) { if ($line->fk_prev_id == null) {
print '<td align="right">' . $form->load_tva('tva_tx', $line->tva_tx.($line->vat_src_code?(' ('.$line->vat_src_code.')'):''), $seller, $buyer, 0, $line->info_bits, $line->product_type, false, 1) . '</td>'; print '<td class="right">' . $form->load_tva('tva_tx', $line->tva_tx.($line->vat_src_code?(' ('.$line->vat_src_code.')'):''), $seller, $buyer, 0, $line->info_bits, $line->product_type, false, 1) . '</td>';
} else { } else {
print '<td class="right"><input size="1" type="text" class="flat right" name="tva_tx" value="' . price($line->tva_tx) . '" readonly />%</td>'; print '<td class="right"><input size="1" type="text" class="flat right" name="tva_tx" value="' . price($line->tva_tx) . '" readonly />%</td>';
} }

View File

@ -30,16 +30,16 @@ if (empty($conf) || ! is_object($conf))
print '<tr class="oddeven'.(empty($this->tpl['strike'])?'':' strikefordisabled').'">'; print '<tr class="oddeven'.(empty($this->tpl['strike'])?'':' strikefordisabled').'">';
print '<td>'.$this->tpl['label'].'</td>'; print '<td>'.$this->tpl['label'].'</td>';
print '<td>'.$this->tpl['description'].'</td>'; print '<td>'.$this->tpl['description'].'</td>';
print '<td align="right">'.$this->tpl['vat_rate'].'</td>'; print '<td class="right">'.$this->tpl['vat_rate'].'</td>';
print '<td align="right">'.$this->tpl['price'].'</td>'; print '<td class="right">'.$this->tpl['price'].'</td>';
if (!empty($conf->multicurrency->enabled)) if (!empty($conf->multicurrency->enabled))
print '<td align="right">'.$this->tpl['multicurrency_price'].'</td>'; print '<td class="right">'.$this->tpl['multicurrency_price'].'</td>';
print '<td align="right">'.$this->tpl['qty'].'</td>'; print '<td class="right">'.$this->tpl['qty'].'</td>';
if($conf->global->PRODUCT_USE_UNITS) if($conf->global->PRODUCT_USE_UNITS)
print '<td class="left">'.$langs->trans($this->tpl['unit']).'</td>'; print '<td class="left">'.$langs->trans($this->tpl['unit']).'</td>';
print '<td align="right">'.$this->tpl['remise_percent'].'</td>'; print '<td class="right">'.$this->tpl['remise_percent'].'</td>';
print '</tr>'."\n"; print '</tr>'."\n";
?> ?>
<!-- END PHP TEMPLATE originproductline.tpl.php --> <!-- END PHP TEMPLATE originproductline.tpl.php -->

View File

@ -165,7 +165,7 @@ if (! empty($morelogincontent)) {
<br><input type="submit" <?php echo $disabled; ?> class="button" name="button_password" value="<?php echo $langs->trans('SendNewPassword'); ?>" tabindex="4" /> <br><input type="submit" <?php echo $disabled; ?> class="button" name="button_password" value="<?php echo $langs->trans('SendNewPassword'); ?>" tabindex="4" />
<br> <br>
<div align="center" style="margin-top: 15px;"> <div class="center" style="margin-top: 15px;">
<?php <?php
$moreparam=''; $moreparam='';
if (! empty($conf->dol_hide_topmenu)) $moreparam.=(strpos($moreparam, '?')===false?'?':'&').'dol_hide_topmenu='.$conf->dol_hide_topmenu; if (! empty($conf->dol_hide_topmenu)) $moreparam.=(strpos($moreparam, '?')===false?'?':'&').'dol_hide_topmenu='.$conf->dol_hide_topmenu;

View File

@ -34,7 +34,7 @@ $out .= '</div>';
$out .= '<div class="tagtd"><label>'.$langs->trans('Busy').'</label> '.$form->selectyesno('busy', (isset($_POST['busy'])?$_POST['busy']:1), 1).'</div>'; $out .= '<div class="tagtd"><label>'.$langs->trans('Busy').'</label> '.$form->selectyesno('busy', (isset($_POST['busy'])?$_POST['busy']:1), 1).'</div>';
$out .= '<div class="tagtd"><label>'.$langs->trans('Mandatory').'</label> '.$form->selectyesno('mandatory', (isset($_POST['mandatory'])?$_POST['mandatory']:0), 1).'</div>'; $out .= '<div class="tagtd"><label>'.$langs->trans('Mandatory').'</label> '.$form->selectyesno('mandatory', (isset($_POST['mandatory'])?$_POST['mandatory']:0), 1).'</div>';
$out .= '<div class="tagtd" align="right">'; $out .= '<div class="tagtd right">';
$out .='<input type="submit" id="add-resource-place" class="button" value="'.$langs->trans("Add").'"/>'; $out .='<input type="submit" id="add-resource-place" class="button" value="'.$langs->trans("Add").'"/>';
$out .= '</div>'; $out .= '</div>';

View File

@ -18,8 +18,8 @@ if($mode == 'edit' )
print '<form class="tagtr liste_titre">'; print '<form class="tagtr liste_titre">';
print '<div class="tagtd liste_titre">'.$langs->trans('Resource').'</div>'; print '<div class="tagtd liste_titre">'.$langs->trans('Resource').'</div>';
print '<div class="tagtd liste_titre">'.$langs->trans('Type').'</div>'; print '<div class="tagtd liste_titre">'.$langs->trans('Type').'</div>';
print '<div class="tagtd liste_titre" align="center">'.$langs->trans('Busy').'</div>'; print '<div class="tagtd liste_titre center">'.$langs->trans('Busy').'</div>';
print '<div class="tagtd liste_titre" align="center">'.$langs->trans('Mandatory').'</div>'; print '<div class="tagtd liste_titre center">'.$langs->trans('Mandatory').'</div>';
print '<div class="tagtd liste_titre"></div>'; print '<div class="tagtd liste_titre"></div>';
print '</form>'; print '</form>';
} }
@ -28,8 +28,8 @@ else
print '<form class="tagtr liste_titre">'; print '<form class="tagtr liste_titre">';
print '<div class="tagtd liste_titre">'.$langs->trans('Resource').'</div>'; print '<div class="tagtd liste_titre">'.$langs->trans('Resource').'</div>';
print '<div class="tagtd liste_titre">'.$langs->trans('Type').'</div>'; print '<div class="tagtd liste_titre">'.$langs->trans('Type').'</div>';
print '<div class="tagtd liste_titre" align="center">'.$langs->trans('Busy').'</div>'; print '<div class="tagtd liste_titre center">'.$langs->trans('Busy').'</div>';
print '<div class="tagtd liste_titre" align="center">'.$langs->trans('Mandatory').'</div>'; print '<div class="tagtd liste_titre center">'.$langs->trans('Mandatory').'</div>';
print '<div class="tagtd liste_titre"></div>'; print '<div class="tagtd liste_titre"></div>';
print '</form>'; print '</form>';
} }
@ -56,9 +56,9 @@ if( (array) $linked_resources && count($linked_resources) > 0)
print '<div class="tagtd">'.$object_resource->getNomUrl(1).'</div>'; print '<div class="tagtd">'.$object_resource->getNomUrl(1).'</div>';
print '<div class="tagtd">'.$object_resource->type_label.'</div>'; print '<div class="tagtd">'.$object_resource->type_label.'</div>';
print '<div class="tagtd" align="center">'.$form->selectyesno('busy', $linked_resource['busy']?1:0, 1).'</div>'; print '<div class="tagtd center">'.$form->selectyesno('busy', $linked_resource['busy']?1:0, 1).'</div>';
print '<div class="tagtd" align="center">'.$form->selectyesno('mandatory', $linked_resource['mandatory']?1:0, 1).'</div>'; print '<div class="tagtd center">'.$form->selectyesno('mandatory', $linked_resource['mandatory']?1:0, 1).'</div>';
print '<div class="tagtd" align="right"><input type="submit" class="button" value="'.$langs->trans("Update").'"></div>'; print '<div class="tagtd right"><input type="submit" class="button" value="'.$langs->trans("Update").'"></div>';
print '</form>'; print '</form>';
} }
else else
@ -77,15 +77,15 @@ if( (array) $linked_resources && count($linked_resources) > 0)
print $object_resource->type_label; print $object_resource->type_label;
print '</div>'; print '</div>';
print '<div class="tagtd" align="center">'; print '<div class="tagtd center">';
print yn($linked_resource['busy']); print yn($linked_resource['busy']);
print '</div>'; print '</div>';
print '<div class="tagtd" align="center">'; print '<div class="tagtd center">';
print yn($linked_resource['mandatory']); print yn($linked_resource['mandatory']);
print '</div>'; print '</div>';
print '<div class="tagtd" align="right">'; print '<div class="tagtd right">';
print '<a href="'.$_SERVER['PHP_SELF'].'?mode=edit&resource_type='.$linked_resource['resource_type'].'&element='.$element.'&element_id='.$element_id.'&lineid='.$linked_resource['rowid'].'">'; print '<a href="'.$_SERVER['PHP_SELF'].'?mode=edit&resource_type='.$linked_resource['resource_type'].'&element='.$element.'&element_id='.$element_id.'&lineid='.$linked_resource['rowid'].'">';
print img_edit(); print img_edit();
print '</a>'; print '</a>';

View File

@ -17,7 +17,7 @@
*/ */
/** /**
* \file datapolicy/admin/setup.php * \file htdocs/datapolicy/admin/setup.php
* \ingroup datapolicy * \ingroup datapolicy
* \brief datapolicy setup page. * \brief datapolicy setup page.
*/ */
@ -25,7 +25,6 @@
require '../../main.inc.php'; require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . "/core/lib/admin.lib.php"; require_once DOL_DOCUMENT_ROOT . "/core/lib/admin.lib.php";
require_once '../lib/datapolicy.lib.php'; require_once '../lib/datapolicy.lib.php';
//require_once "../class/myclass.class.php";
// Translations // Translations
$langs->load('admin'); $langs->load('admin');
@ -61,22 +60,22 @@ $arrayofparameters=array(
include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
if (DOL_VERSION < '7' && $action == 'update') { // if (DOL_VERSION < '7' && $action == 'update') {
foreach ($arrayofparameters as $k => $v) { // foreach ($arrayofparameters as $k => $v) {
$res = dolibarr_set_const($db, $k, GETPOST($k), 'chaine', 0, '', $conf->entity); // $res = dolibarr_set_const($db, $k, GETPOST($k), 'chaine', 0, '', $conf->entity);
if (! $res > 0) $error++; // if (! $res > 0) $error++;
} // }
if (! $error) // if (! $error)
{ // {
$db->commit(); // $db->commit();
if (empty($nomessageinsetmoduleoptions)) setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); // if (empty($nomessageinsetmoduleoptions)) setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} // }
else // else
{ // {
$db->rollback(); // $db->rollback();
if (empty($nomessageinsetmoduleoptions)) setEventMessages($langs->trans("SetupNotSaved"), null, 'errors'); // if (empty($nomessageinsetmoduleoptions)) setEventMessages($langs->trans("SetupNotSaved"), null, 'errors');
} // }
} // }
$arrayofparameters=array( $arrayofparameters=array(
@ -108,8 +107,8 @@ $valTab = array(
'48' => $langs->trans('NB_YEARS', 4), '48' => $langs->trans('NB_YEARS', 4),
'60' => $langs->trans('NB_YEARS', 5), '60' => $langs->trans('NB_YEARS', 5),
'120' => $langs->trans('NB_YEARS', 10), '120' => $langs->trans('NB_YEARS', 10),
'180' => $langs->trans('NB_YEARS', 15), '180' => $langs->trans('NB_YEARS', 15),
'240' => $langs->trans('NB_YEARS', 20), '240' => $langs->trans('NB_YEARS', 20),
); );
@ -135,15 +134,15 @@ echo '<span class="opacitymedium">'.$langs->trans("datapolicySetupPage").'</span
if ($action == 'edit') if ($action == 'edit')
{ {
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="action" value="update">';
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>'; print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
foreach($arrayofparameters as $title => $tab) foreach($arrayofparameters as $title => $tab)
{ {
print '<tr class="liste_titre"><td class="titlefield" colspan="2">'.$langs->trans($title).'</td></tr>'; print '<tr class="liste_titre"><td class="titlefield" colspan="2">'.$langs->trans($title).'</td></tr>';
foreach($tab as $key => $val) foreach($tab as $key => $val)
{ {
@ -159,21 +158,19 @@ if ($action == 'edit')
print '</select>'; print '</select>';
print '</td></tr>'; print '</td></tr>';
} }
} }
print '</table>'; print '</table>';
print '<br><div class="center">'; print '<br><div class="center">';
print '<input class="button" type="submit" value="'.$langs->trans("Save").'">'; print '<input class="button" type="submit" value="'.$langs->trans("Save").'">';
print '</div>'; print '</div>';
print '</form>'; print '</form>';
print '<br>'; print '<br>';
} } else {
else print '<table class="noborder" width="100%">';
{ print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
foreach($arrayofparameters as $title => $tab) foreach($arrayofparameters as $title => $tab)
{ {
@ -186,11 +183,11 @@ else
} }
} }
print '</table>'; print '</table>';
print '<div class="tabsAction">'; print '<div class="tabsAction">';
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>'; print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>';
print '</div>'; print '</div>';
} }

View File

@ -293,12 +293,12 @@ class ActionsDatapolicy
/** /**
* Execute action * Execute action
* *
* @param array $parameters Array of parameters * @param array $parameters Array of parameters
* @param Object $object Object output on PDF * @param Object $object Object output on PDF
* @param string $action 'add', 'update', 'view' * @param string $action 'add', 'update', 'view'
* @return int <0 if KO, * @return int <0 if KO,
* =0 if OK but we want to process standard actions too, * =0 if OK but we want to process standard actions too,
* >0 if OK and we want to replace standard actions. * >0 if OK and we want to replace standard actions.
*/ */
function beforePDFCreation($parameters, &$object, &$action) function beforePDFCreation($parameters, &$object, &$action)
{ {
@ -336,46 +336,46 @@ class ActionsDatapolicy
if (! empty($conf->global->DATAPOLICIES_ENABLE_EMAILS)) if (! empty($conf->global->DATAPOLICIES_ENABLE_EMAILS))
{ {
$dialog = '<div id="dialogdatapolicy" style="display:none;" title="' . $langs->trans('DATAPOLICIES_PORTABILITE_TITLE') . '">'; $dialog = '<div id="dialogdatapolicy" style="display:none;" title="' . $langs->trans('DATAPOLICIES_PORTABILITE_TITLE') . '">';
$dialog .= '<div class="confirmmessage">' . img_help('', '') . ' ' . $langs->trans('DATAPOLICIES_PORTABILITE_CONFIRMATION') . '</div>'; $dialog .= '<div class="confirmmessage">' . img_help('', '') . ' ' . $langs->trans('DATAPOLICIES_PORTABILITE_CONFIRMATION') . '</div>';
$dialog .= "</div>"; $dialog .= "</div>";
$dialog .= '<script> $dialog .= '<script>
$( function() { $( function() {
$("#rpgpdbtn").on("click", function(){ $("#rpgpdbtn").on("click", function(){
var href = $(this).attr("href"); var href = $(this).attr("href");
$( "#dialogdatapolicy" ).dialog({ $( "#dialogdatapolicy" ).dialog({
modal: true, modal: true,
buttons: { buttons: {
"OK": function() { "OK": function() {
window.open(href); window.open(href);
$( this ).dialog( "close" ); $( this ).dialog( "close" );
}, },
"' . $langs->trans('Cancel') . '": function() { "' . $langs->trans('Cancel') . '": function() {
$( this ).dialog( "close" ); $( this ).dialog( "close" );
} }
} }
}); });
return false; return false;
}); });
} ); } );
</script>'; </script>';
echo $dialog; echo $dialog;
if ($parameters['currentcontext'] == 'thirdpartycard' && in_array($object->forme_juridique_code, array(11, 12, 13, 15, 17, 18, 19, 35, 60, 200, 311, 312, 316, 401, 600, 700, 1005)) || $object->typent_id == 8) { if ($parameters['currentcontext'] == 'thirdpartycard' && in_array($object->forme_juridique_code, array(11, 12, 13, 15, 17, 18, 19, 35, 60, 200, 311, 312, 316, 401, 600, 700, 1005)) || $object->typent_id == 8) {
echo '<div class="inline-block divButAction"><a target="_blank" id="rpgpdbtn" class="butAction" href="' . $_SERVER["PHP_SELF"] . "?socid=" . $object->id . '&action=datapolicy_portabilite" title="' . $langs->trans('DATAPOLICIES_PORTABILITE_TITLE') . '">' . $langs->trans("DATAPOLICIES_PORTABILITE") . '</a></div>'; echo '<div class="inline-block divButAction"><a target="_blank" id="rpgpdbtn" class="butAction" href="' . $_SERVER["PHP_SELF"] . "?socid=" . $object->id . '&action=datapolicy_portabilite" title="' . $langs->trans('DATAPOLICIES_PORTABILITE_TITLE') . '">' . $langs->trans("DATAPOLICIES_PORTABILITE") . '</a></div>';
} elseif ($parameters['currentcontext'] == 'membercard') { } elseif ($parameters['currentcontext'] == 'membercard') {
echo '<div class="inline-block divButAction"><a target="_blank" id="rpgpdbtn" class="butAction" href="' . $_SERVER["PHP_SELF"] . "?rowid=" . $object->id . '&action=datapolicy_portabilite" title="' . $langs->trans('DATAPOLICIES_PORTABILITE_TITLE') . '">' . $langs->trans("DATAPOLICIES_PORTABILITE") . '</a></div>'; echo '<div class="inline-block divButAction"><a target="_blank" id="rpgpdbtn" class="butAction" href="' . $_SERVER["PHP_SELF"] . "?rowid=" . $object->id . '&action=datapolicy_portabilite" title="' . $langs->trans('DATAPOLICIES_PORTABILITE_TITLE') . '">' . $langs->trans("DATAPOLICIES_PORTABILITE") . '</a></div>';
} elseif ($parameters['currentcontext'] == 'contactcard') { } elseif ($parameters['currentcontext'] == 'contactcard') {
echo '<div class="inline-block divButAction"><a target="_blank" id="rpgpdbtn" class="butAction" href="' . $_SERVER["PHP_SELF"] . "?id=" . $object->id . '&action=datapolicy_portabilite" title="' . $langs->trans('DATAPOLICIES_PORTABILITE_TITLE') . '">' . $langs->trans("DATAPOLICIES_PORTABILITE") . '</a></div>'; echo '<div class="inline-block divButAction"><a target="_blank" id="rpgpdbtn" class="butAction" href="' . $_SERVER["PHP_SELF"] . "?id=" . $object->id . '&action=datapolicy_portabilite" title="' . $langs->trans('DATAPOLICIES_PORTABILITE_TITLE') . '">' . $langs->trans("DATAPOLICIES_PORTABILITE") . '</a></div>';
} }
if (!empty($object->mail) && empty($object->array_options['options_datapolicy_send']) && $parameters['currentcontext'] == 'thirdpartycard' && in_array($object->forme_juridique_code, array(11, 12, 13, 15, 17, 18, 19, 35, 60, 200, 311, 312, 316, 401, 600, 700, 1005)) || $object->typent_id == 8) { if (!empty($object->mail) && empty($object->array_options['options_datapolicy_send']) && $parameters['currentcontext'] == 'thirdpartycard' && in_array($object->forme_juridique_code, array(11, 12, 13, 15, 17, 18, 19, 35, 60, 200, 311, 312, 316, 401, 600, 700, 1005)) || $object->typent_id == 8) {
echo '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . "?socid=" . $object->id . '&action=send_datapolicy" title="' . $langs->trans('DATAPOLICIES_SEND') . '">' . $langs->trans("DATAPOLICIES_SEND") . '</a></div>'; echo '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . "?socid=" . $object->id . '&action=send_datapolicy" title="' . $langs->trans('DATAPOLICIES_SEND') . '">' . $langs->trans("DATAPOLICIES_SEND") . '</a></div>';
} elseif (!empty($object->mail) && empty($object->array_options['options_datapolicy_send']) && $parameters['currentcontext'] == 'membercard') { } elseif (!empty($object->mail) && empty($object->array_options['options_datapolicy_send']) && $parameters['currentcontext'] == 'membercard') {
echo '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . "?rowid=" . $object->id . '&action=send_datapolicy" title="' . $langs->trans('DATAPOLICIES_SEND') . '">' . $langs->trans("DATAPOLICIES_SEND") . '</a></div>'; echo '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . "?rowid=" . $object->id . '&action=send_datapolicy" title="' . $langs->trans('DATAPOLICIES_SEND') . '">' . $langs->trans("DATAPOLICIES_SEND") . '</a></div>';
} elseif (!empty($object->mail) && empty($object->array_options['options_datapolicy_send']) && $parameters['currentcontext'] == 'contactcard') { } elseif (!empty($object->mail) && empty($object->array_options['options_datapolicy_send']) && $parameters['currentcontext'] == 'contactcard') {
echo '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . "?id=" . $object->id . '&action=send_datapolicy" title="' . $langs->trans('DATAPOLICIES_SEND') . '">' . $langs->trans("DATAPOLICIES_SEND") . '</a></div>'; echo '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . "?id=" . $object->id . '&action=send_datapolicy" title="' . $langs->trans('DATAPOLICIES_SEND') . '">' . $langs->trans("DATAPOLICIES_SEND") . '</a></div>';
} }
} }
} }

View File

@ -30,11 +30,11 @@ include_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
*/ */
Class DataPolicy Class DataPolicy
{ {
/** /**
* getAllContactNotInformed * getAllContactNotInformed
* *
* @return number * @return number
*/ */
function getAllContactNotInformed() function getAllContactNotInformed()
{ {
global $langs, $conf, $db, $user; global $langs, $conf, $db, $user;
@ -144,71 +144,71 @@ Class DataPolicy
*/ */
function sendMailDataPolicyContact($contact) function sendMailDataPolicyContact($contact)
{ {
global $langs, $conf, $db, $user; global $langs, $conf, $db, $user;
$error = 0; $error = 0;
$from = $user->getFullName($langs) . ' <' . $user->email . '>'; $from = $user->getFullName($langs) . ' <' . $user->email . '>';
$sendto = $contact->email; $sendto = $contact->email;
$code= md5($contact->email); $code= md5($contact->email);
if (!empty($contact->default_lang)) { if (!empty($contact->default_lang)) {
$l = $contact->default_lang; $l = $contact->default_lang;
} else { } else {
$l = $langs->defaultlang; $l = $langs->defaultlang;
} }
$s = "DATAPOLICIESSUBJECT_" . $l; $s = "DATAPOLICIESSUBJECT_" . $l;
$ma = "DATAPOLICIESCONTENT_" . $l; $ma = "DATAPOLICIESCONTENT_" . $l;
$la = 'TXTLINKDATAPOLICIESACCEPT_' . $l; $la = 'TXTLINKDATAPOLICIESACCEPT_' . $l;
$lr = 'TXTLINKDATAPOLICIESREFUSE_' . $l; $lr = 'TXTLINKDATAPOLICIESREFUSE_' . $l;
$subject = $conf->global->$s; $subject = $conf->global->$s;
$message = $conf->global->$ma; $message = $conf->global->$ma;
$linka = $conf->global->$la; $linka = $conf->global->$la;
$linkr = $conf->global->$lr; $linkr = $conf->global->$lr;
$sendtocc = $sendtobcc = ''; $sendtocc = $sendtobcc = '';
$filepath = $mimetype = $filename = array(); $filepath = $mimetype = $filename = array();
$deliveryreceipt = 0; $deliveryreceipt = 0;
$substitutionarray = array( $substitutionarray = array(
'__LINKACCEPT__' => '<a href="'.dol_buildpath('/datapolicy/public/index.php?action=1&c='.$contact->id.'&l='.$l.'&key='.$code, 3).'" target="_blank">'.$linka.'</a>', '__LINKACCEPT__' => '<a href="'.dol_buildpath('/datapolicy/public/index.php?action=1&c='.$contact->id.'&l='.$l.'&key='.$code, 3).'" target="_blank">'.$linka.'</a>',
'__LINKREFUSED__' => '<a href="'.dol_buildpath('/datapolicy/public/index.php?action=2&c='.$contact->id.'&l='.$l.'&key='.$code, 3).'" target="_blank">'.$linkr.'</a>', '__LINKREFUSED__' => '<a href="'.dol_buildpath('/datapolicy/public/index.php?action=2&c='.$contact->id.'&l='.$l.'&key='.$code, 3).'" target="_blank">'.$linkr.'</a>',
'__FIRSTNAME__' => $contact->firstname, '__FIRSTNAME__' => $contact->firstname,
'__NAME__' => $contact->lastname, '__NAME__' => $contact->lastname,
'__CIVILITY__' => $contact->civility, '__CIVILITY__' => $contact->civility,
); );
$subject = make_substitutions($subject, $substitutionarray); $subject = make_substitutions($subject, $substitutionarray);
$message = make_substitutions($message, $substitutionarray); $message = make_substitutions($message, $substitutionarray);
$actiontypecode = 'AC_EMAIL'; $actiontypecode = 'AC_EMAIL';
$actionmsg = $langs->transnoentities('MailSentBy') . ' ' . $from . ' ' . $langs->transnoentities('To') . ' ' . $sendto; $actionmsg = $langs->transnoentities('MailSentBy') . ' ' . $from . ' ' . $langs->transnoentities('To') . ' ' . $sendto;
if ($message) { if ($message) {
if ($sendtocc) if ($sendtocc)
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc);
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject);
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":");
$actionmsg = dol_concatdesc($actionmsg, $message); $actionmsg = dol_concatdesc($actionmsg, $message);
} }
// Send mail // Send mail
require_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
$mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, $sendtocc, $sendtobcc, $deliveryreceipt, -1); $mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, $sendtocc, $sendtobcc, $deliveryreceipt, -1);
if ($mailfile->error) { if ($mailfile->error) {
$resultmasssend .= '<div class="error">' . $mailfile->error . '</div>'; $resultmasssend .= '<div class="error">' . $mailfile->error . '</div>';
} else { } else {
$result4 = $mailfile->sendfile(); $result4 = $mailfile->sendfile();
if (!$error) { if (!$error) {
$resultmasssend .= $langs->trans("MailSent") . ': ' . $sendto . "<br>"; $resultmasssend .= $langs->trans("MailSent") . ': ' . $sendto . "<br>";
$contact->array_options['options_datapolicy_send'] = date('Y-m-d', time()); $contact->array_options['options_datapolicy_send'] = date('Y-m-d', time());
$contact->update($contact->id); $contact->update($contact->id);
} else { } else {
dol_print_error($db); dol_print_error($db);
} }
} }
setEventMessage($resultmasssend); setEventMessage($resultmasssend);
} }
/** /**
@ -219,44 +219,44 @@ Class DataPolicy
*/ */
function sendMailDataPolicyCompany($societe) function sendMailDataPolicyCompany($societe)
{ {
global $langs, $conf, $db, $user; global $langs, $conf, $db, $user;
$error = 0; $error = 0;
$from = $user->getFullName($langs) . ' <' . $user->email . '>'; $from = $user->getFullName($langs) . ' <' . $user->email . '>';
$sendto = $societe->email; $sendto = $societe->email;
$code= md5($societe->email); $code= md5($societe->email);
if (!empty($societe->default_lang)) { if (!empty($societe->default_lang)) {
$l = $societe->default_lang; $l = $societe->default_lang;
} else { } else {
$l = $langs->defaultlang; $l = $langs->defaultlang;
} }
$s = "DATAPOLICIESSUBJECT_" . $l; $s = "DATAPOLICIESSUBJECT_" . $l;
$ma = "DATAPOLICIESCONTENT_" . $l; $ma = "DATAPOLICIESCONTENT_" . $l;
$la = 'TXTLINKDATAPOLICIESACCEPT_' . $l; $la = 'TXTLINKDATAPOLICIESACCEPT_' . $l;
$lr = 'TXTLINKDATAPOLICIESREFUSE_' . $l; $lr = 'TXTLINKDATAPOLICIESREFUSE_' . $l;
$subject = $conf->global->$s; $subject = $conf->global->$s;
$message = $conf->global->$ma; $message = $conf->global->$ma;
$linka = $conf->global->$la; $linka = $conf->global->$la;
$linkr = $conf->global->$lr; $linkr = $conf->global->$lr;
$sendtocc = $sendtobcc = ''; $sendtocc = $sendtobcc = '';
$filepath = $mimetype = $filename = array(); $filepath = $mimetype = $filename = array();
$deliveryreceipt = 0; $deliveryreceipt = 0;
$substitutionarray = array( $substitutionarray = array(
'__LINKACCEPT__' => '<a href="'.dol_buildpath('/datapolicy/public/index.php?action=1&s='.$societe->id.'&l='.$l.'&key='.$code, 3).'" target="_blank">'.$linka.'</a>', '__LINKACCEPT__' => '<a href="'.dol_buildpath('/datapolicy/public/index.php?action=1&s='.$societe->id.'&l='.$l.'&key='.$code, 3).'" target="_blank">'.$linka.'</a>',
'__LINKREFUSED__' => '<a href="'.dol_buildpath('/datapolicy/public/index.php?action=2&s='.$societe->id.'&l='.$l.'&key='.$code, 3).'" target="_blank">'.$linkr.'</a>', '__LINKREFUSED__' => '<a href="'.dol_buildpath('/datapolicy/public/index.php?action=2&s='.$societe->id.'&l='.$l.'&key='.$code, 3).'" target="_blank">'.$linkr.'</a>',
); );
$subject = make_substitutions($subject, $substitutionarray); $subject = make_substitutions($subject, $substitutionarray);
$message = make_substitutions($message, $substitutionarray); $message = make_substitutions($message, $substitutionarray);
$actiontypecode = 'AC_EMAIL'; $actiontypecode = 'AC_EMAIL';
$actionmsg = $langs->transnoentities('MailSentBy') . ' ' . $from . ' ' . $langs->transnoentities('To') . ' ' . $sendto; $actionmsg = $langs->transnoentities('MailSentBy') . ' ' . $from . ' ' . $langs->transnoentities('To') . ' ' . $sendto;
if ($message) { if ($message) {
if ($sendtocc) { if ($sendtocc) {
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); $actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc);
} }
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); $actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject);
@ -264,23 +264,23 @@ Class DataPolicy
$actionmsg .= dol_concatdesc($actionmsg, $message); $actionmsg .= dol_concatdesc($actionmsg, $message);
} }
// Send mail // Send mail
require_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
$mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, $sendtocc, $sendtobcc, $deliveryreceipt, -1); $mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, $sendtocc, $sendtobcc, $deliveryreceipt, -1);
if ($mailfile->error) { if ($mailfile->error) {
$resultmasssend .= '<div class="error">' . $mailfile->error . '</div>'; $resultmasssend .= '<div class="error">' . $mailfile->error . '</div>';
} else { } else {
$result4 = $mailfile->sendfile(); $result4 = $mailfile->sendfile();
if (!$error) { if (!$error) {
$resultmasssend .= $langs->trans("MailSent") . ': ' . $sendto . "<br>"; $resultmasssend .= $langs->trans("MailSent") . ': ' . $sendto . "<br>";
$societe->array_options['options_datapolicy_send'] = date('Y-m-d', time()); $societe->array_options['options_datapolicy_send'] = date('Y-m-d', time());
$societe->update($societe->id); $societe->update($societe->id);
} else { } else {
dol_print_error($db); dol_print_error($db);
} }
} }
setEventMessage($resultmasssend); setEventMessage($resultmasssend);
} }
/** /**
@ -291,66 +291,66 @@ Class DataPolicy
*/ */
function sendMailDataPolicyAdherent($adherent) function sendMailDataPolicyAdherent($adherent)
{ {
global $langs, $conf, $db, $user; global $langs, $conf, $db, $user;
$error = 0; $error = 0;
$from = $user->getFullName($langs) . ' <' . $user->email . '>'; $from = $user->getFullName($langs) . ' <' . $user->email . '>';
$sendto = $adherent->email; $sendto = $adherent->email;
$code= md5($adherent->email); $code= md5($adherent->email);
if (!empty($adherent->default_lang)) { if (!empty($adherent->default_lang)) {
$l = $adherent->default_lang; $l = $adherent->default_lang;
} else { } else {
$l = $langs->defaultlang; $l = $langs->defaultlang;
} }
$la = 'TXTLINKDATAPOLICIESACCEPT_' . $l; $la = 'TXTLINKDATAPOLICIESACCEPT_' . $l;
$lr = 'TXTLINKDATAPOLICIESREFUSE_' . $l; $lr = 'TXTLINKDATAPOLICIESREFUSE_' . $l;
$subject = $conf->global->$s; $subject = $conf->global->$s;
$message = $conf->global->$ma; $message = $conf->global->$ma;
$linka = $conf->global->$la; $linka = $conf->global->$la;
$linkr = $conf->global->$lr; $linkr = $conf->global->$lr;
$sendtocc = $sendtobcc = ''; $sendtocc = $sendtobcc = '';
$filepath = $mimetype = $filename = array(); $filepath = $mimetype = $filename = array();
$deliveryreceipt = 0; $deliveryreceipt = 0;
$substitutionarray = array( $substitutionarray = array(
'__LINKACCEPT__' => '<a href="'.dol_buildpath('/datapolicy/public/index.php?action=1&a='.$adherent->id.'&l='.$l.'&key='.$code, 3).'" target="_blank">'.$linka.'</a>', '__LINKACCEPT__' => '<a href="'.dol_buildpath('/datapolicy/public/index.php?action=1&a='.$adherent->id.'&l='.$l.'&key='.$code, 3).'" target="_blank">'.$linka.'</a>',
'__LINKREFUSED__' => '<a href="'.dol_buildpath('/datapolicy/public/index.php?action=2&a='.$adherent->id.'&l='.$l.'&key='.$code, 3).'" target="_blank">'.$linkr.'</a>', '__LINKREFUSED__' => '<a href="'.dol_buildpath('/datapolicy/public/index.php?action=2&a='.$adherent->id.'&l='.$l.'&key='.$code, 3).'" target="_blank">'.$linkr.'</a>',
); );
$subject = make_substitutions($subject, $substitutionarray); $subject = make_substitutions($subject, $substitutionarray);
$message = make_substitutions($message, $substitutionarray); $message = make_substitutions($message, $substitutionarray);
$actiontypecode = 'AC_EMAIL'; $actiontypecode = 'AC_EMAIL';
$actionmsg = $langs->transnoentities('MailSentBy') . ' ' . $from . ' ' . $langs->transnoentities('To') . ' ' . $sendto; $actionmsg = $langs->transnoentities('MailSentBy') . ' ' . $from . ' ' . $langs->transnoentities('To') . ' ' . $sendto;
if ($message) { if ($message) {
if ($sendtocc) { if ($sendtocc) {
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); $actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc);
} }
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); $actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject);
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); $actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":");
$actionmsg .= dol_concatdesc($actionmsg, $message); $actionmsg .= dol_concatdesc($actionmsg, $message);
} }
// Send mail // Send mail
require_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
$mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, $sendtocc, $sendtobcc, $deliveryreceipt, -1); $mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, $sendtocc, $sendtobcc, $deliveryreceipt, -1);
if ($mailfile->error) { if ($mailfile->error) {
$resultmasssend .= '<div class="error">' . $mailfile->error . '</div>'; $resultmasssend .= '<div class="error">' . $mailfile->error . '</div>';
} else { } else {
$result4 = $mailfile->sendfile(); $result4 = $mailfile->sendfile();
if (!$error) { if (!$error) {
$resultmasssend .= $langs->trans("MailSent") . ': ' . $sendto . "<br>"; $resultmasssend .= $langs->trans("MailSent") . ': ' . $sendto . "<br>";
$adherent->array_options['options_datapolicy_send'] = date('Y-m-d', time()); $adherent->array_options['options_datapolicy_send'] = date('Y-m-d', time());
$adherent->update($user); $adherent->update($user);
} else { } else {
dol_print_error($db); dol_print_error($db);
} }
} }
setEventMessage($resultmasssend); setEventMessage($resultmasssend);
} }
} }

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com> /* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -17,7 +17,7 @@
*/ */
/** /**
* \file datapolicy/class/datapolicycron.class.php * \file htdocs/datapolicy/class/datapolicycron.class.php
* \ingroup datapolicy * \ingroup datapolicy
* \brief Example hook overload. * \brief Example hook overload.
*/ */
@ -27,11 +27,11 @@
*/ */
class DataPolicyCron class DataPolicyCron
{ {
/** /**
* Function exec * Function exec
* *
* @return boolean * @return boolean
*/ */
public function exec() public function exec()
{ {
global $conf, $db, $langs, $user; global $conf, $db, $langs, $user;

View File

@ -1,5 +1,6 @@
<?php <?php
/* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com> /* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +17,7 @@
*/ */
/** /**
* \file datapolicy/lib/datapolicy.lib.php * \file htdocs/datapolicy/lib/datapolicy.lib.php
* \ingroup datapolicy * \ingroup datapolicy
* \brief Library files with common functions for datapolicy * \brief Library files with common functions for datapolicy
*/ */
@ -28,27 +29,26 @@
*/ */
function datapolicyAdminPrepareHead() function datapolicyAdminPrepareHead()
{ {
global $langs, $conf; global $langs, $conf;
$langs->load("datapolicy@datapolicy"); $langs->load("datapolicy@datapolicy");
$h = 0; $h = 0;
$head = array(); $head = array();
$head[$h][0] = dol_buildpath("/datapolicy/admin/setup.php", 1); $head[$h][0] = DOL_URL_ROOT."/datapolicy/admin/setup.php";
$head[$h][1] = $langs->trans("Deletion"); $head[$h][1] = $langs->trans("Deletion");
$head[$h][2] = 'settings'; $head[$h][2] = 'settings';
$h++; $h++;
if (! empty($conf->global->DATAPOLICIES_ENABLE_EMAILS)) if (! empty($conf->global->DATAPOLICIES_ENABLE_EMAILS)) {
{ $head[$h][0] = DOL_URL_ROOT."/datapolicy/admin/setupmail.php";
$head[$h][0] = dol_buildpath("/datapolicy/admin/setupmail.php", 1); $head[$h][1] = $langs->trans("DATAPOLICIESMail");
$head[$h][1] = $langs->trans("DATAPOLICIESMail"); $head[$h][2] = 'settings';
$head[$h][2] = 'settings'; $h++;
$h++; }
}
complete_head_from_modules($conf, $langs, $object, $head, $h, 'datapolicy'); complete_head_from_modules($conf, $langs, $object, $head, $h, 'datapolicy');
return $head; return $head;
} }

View File

@ -1,5 +1,6 @@
<?php <?php
/* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com> /* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,22 +17,22 @@
*/ */
/** /**
* \file datapolicy/mailing.php * \file htdocs/datapolicy/mailing.php
* \ingroup datapolicy * \ingroup datapolicy
* \brief datapolicy mailing page. * \brief datapolicy mailing page.
*/ */
require '../../main.inc.php'; require '../../main.inc.php';
dol_include_once('/contact/class/contact.class.php'); require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
dol_include_once('/datapolicy/class/datapolicy.class.php'); require_once DOL_DOCUMENT_ROOT.'/datapolicy/class/datapolicy.class.php';
$idcontact = GETPOST('idc'); $idcontact = GETPOST('idc');
if(!empty($idcontact)){ if (!empty($idcontact)) {
$contact = new Contact($db); $contact = new Contact($db);
$contact->fetch($idcontact); $contact->fetch($idcontact);
DataPolicy::sendMailDataPolicyContact($contact); DataPolicy::sendMailDataPolicyContact($contact);
}else{ } else {
$contacts = new DataPolicy($db); $contacts = new DataPolicy($db);
$contacts->getAllContactNotInformed(); $contacts->getAllContactNotInformed();

View File

@ -17,7 +17,7 @@
*/ */
/** /**
* \file datapolicy/admin/setup.php * \file htdocs/datapolicy/admin/setup.php
* \ingroup datapolicy * \ingroup datapolicy
* \brief datapolicy setup page. * \brief datapolicy setup page.
*/ */
@ -30,11 +30,11 @@ if (!defined('NOREQUIREMENU'))
define('NOREQUIREMENU', '1'); define('NOREQUIREMENU', '1');
require '../../main.inc.php'; require '../../main.inc.php';
dol_include_once('/contact/class/contact.class.php'); require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
dol_include_once('/societe/class/societe.class.php'); require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
dol_include_once('/adherents/class/adherent.class.php'); require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
dol_include_once('/user/class/user.class.php'); require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
dol_include_once('/datapolicy/class/datapolicy.class.php'); require_once DOL_DOCUMENT_ROOT.'/datapolicy/class/datapolicy.class.php';
$idc = GETPOST('c', 'int'); $idc = GETPOST('c', 'int');
$ids = GETPOST('s', 'int'); $ids = GETPOST('s', 'int');

View File

@ -48,7 +48,7 @@ class Donations extends DolibarrApi
{ {
global $db, $conf; global $db, $conf;
$this->db = $db; $this->db = $db;
$this->don = new Don($this->db); $this->don = new Don($this->db);
} }
/** /**

View File

@ -173,7 +173,7 @@ if (! defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck))
} }
if (empty($dolibarr_main_db_host)) if (empty($dolibarr_main_db_host))
{ {
print '<div align="center">Dolibarr setup is not yet complete.<br><br>'."\n"; print '<div class="center">Dolibarr setup is not yet complete.<br><br>'."\n";
print '<a href="install/index.php">Click here to finish Dolibarr install process</a> ...</div>'."\n"; print '<a href="install/index.php">Click here to finish Dolibarr install process</a> ...</div>'."\n";
die; die;
} }

View File

@ -1641,7 +1641,7 @@ else
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">'; print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans("BarcodeType"); print $langs->trans("BarcodeType");
print '</td>'; print '</td>';
if (($action != 'editbarcodetype') && $usercancreate && $createbarcode) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbarcodetype&amp;id='.$object->id.'">'.img_edit($langs->trans('Edit'), 1).'</a></td>'; if (($action != 'editbarcodetype') && $usercancreate && $createbarcode) print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbarcodetype&amp;id='.$object->id.'">'.img_edit($langs->trans('Edit'), 1).'</a></td>';
print '</tr></table>'; print '</tr></table>';
print '</td><td colspan="2">'; print '</td><td colspan="2">';
if ($action == 'editbarcodetype' || $action == 'editbarcode') if ($action == 'editbarcodetype' || $action == 'editbarcode')
@ -1665,7 +1665,7 @@ else
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">'; print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans("BarcodeValue"); print $langs->trans("BarcodeValue");
print '</td>'; print '</td>';
if (($action != 'editbarcode') && $usercancreate && $createbarcode) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbarcode&amp;id='.$object->id.'">'.img_edit($langs->trans('Edit'), 1).'</a></td>'; if (($action != 'editbarcode') && $usercancreate && $createbarcode) print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbarcode&amp;id='.$object->id.'">'.img_edit($langs->trans('Edit'), 1).'</a></td>';
print '</tr></table>'; print '</tr></table>';
print '</td><td colspan="2">'; print '</td><td colspan="2">';
if ($action == 'editbarcode') if ($action == 'editbarcode')
@ -1934,7 +1934,7 @@ else
// Categories // Categories
if($conf->categorie->enabled) { if($conf->categorie->enabled) {
print '<tr><td valign="middle">'.$langs->trans("Categories").'</td><td colspan="3">'; print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td colspan="3">';
print $form->showCategories($object->id, 'product', 1); print $form->showCategories($object->id, 'product', 1);
print "</td></tr>"; print "</td></tr>";
} }

View File

@ -8,6 +8,7 @@
* Copyright (C) 2014 Ion Agorria <ion@agorria.com> * Copyright (C) 2014 Ion Agorria <ion@agorria.com>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -765,20 +766,20 @@ SCRIPT;
print_liste_field_titre("Suppliers", $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Suppliers", $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("SupplierRef", $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("SupplierRef", $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder);
if (!empty($conf->global->FOURN_PRODUCT_AVAILABILITY)) print_liste_field_titre("Availability", $_SERVER["PHP_SELF"], "pfp.fk_availability", "", $param, "", $sortfield, $sortorder); if (!empty($conf->global->FOURN_PRODUCT_AVAILABILITY)) print_liste_field_titre("Availability", $_SERVER["PHP_SELF"], "pfp.fk_availability", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("QtyMin", $_SERVER["PHP_SELF"], "pfp.quantity", "", $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("QtyMin", $_SERVER["PHP_SELF"], "pfp.quantity", "", $param, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], '', '', $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("PriceQtyMinHT", $_SERVER["PHP_SELF"], '', '', $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("PriceQtyMinHT", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right ');
if ($conf->multicurrency->enabled) { if ($conf->multicurrency->enabled) {
print_liste_field_titre("PriceQtyMinHTCurrency", $_SERVER["PHP_SELF"], '', '', $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("PriceQtyMinHTCurrency", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right ');
} }
print_liste_field_titre("UnitPriceHT", $_SERVER["PHP_SELF"], "pfp.unitprice", "", $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("UnitPriceHT", $_SERVER["PHP_SELF"], "pfp.unitprice", "", $param, '', $sortfield, $sortorder, 'right ');
if ($conf->multicurrency->enabled) { if ($conf->multicurrency->enabled) {
print_liste_field_titre("UnitPriceHTCurrency", $_SERVER["PHP_SELF"], "pfp.multicurrency_unitprice", "", $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("UnitPriceHTCurrency", $_SERVER["PHP_SELF"], "pfp.multicurrency_unitprice", "", $param, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("Currency", $_SERVER["PHP_SELF"], "", "", $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("Currency", $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ');
} }
print_liste_field_titre("DiscountQtyMin", $_SERVER["PHP_SELF"], '', '', $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("DiscountQtyMin", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("NbDaysToDelivery", $_SERVER["PHP_SELF"], "pfp.delivery_time_days", "", $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("NbDaysToDelivery", $_SERVER["PHP_SELF"], "pfp.delivery_time_days", "", $param, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("ReputationForThisProduct", $_SERVER["PHP_SELF"], "pfp.supplier_reputation", "", $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre("ReputationForThisProduct", $_SERVER["PHP_SELF"], "pfp.supplier_reputation", "", $param, '', $sortfield, $sortorder, 'center ');
print_liste_field_titre(''); print_liste_field_titre('');
print "</tr>\n"; print "</tr>\n";
@ -798,11 +799,11 @@ SCRIPT;
// Supplier ref // Supplier ref
if ($user->rights->produit->creer || $user->rights->service->creer) // change required right here if ($user->rights->produit->creer || $user->rights->service->creer) // change required right here
{ {
print '<td align="left">'.$productfourn->getNomUrl().'</td>'; print '<td class="left">'.$productfourn->getNomUrl().'</td>';
} }
else else
{ {
print '<td align="left">'.$productfourn->fourn_ref.'</td>'; print '<td class="left">'.$productfourn->fourn_ref.'</td>';
} }
// Availability // Availability
@ -814,57 +815,57 @@ SCRIPT;
} }
// Quantity // Quantity
print '<td align="right">'; print '<td class="right">';
print $productfourn->fourn_qty; print $productfourn->fourn_qty;
print '</td>'; print '</td>';
// VAT rate // VAT rate
print '<td align="right">'; print '<td class="right">';
print vatrate($productfourn->fourn_tva_tx, true); print vatrate($productfourn->fourn_tva_tx, true);
print '</td>'; print '</td>';
// Price for the quantity // Price for the quantity
print '<td align="right">'; print '<td class="right">';
print $productfourn->fourn_price?price($productfourn->fourn_price):""; print $productfourn->fourn_price?price($productfourn->fourn_price):"";
print '</td>'; print '</td>';
if ($conf->multicurrency->enabled) { if ($conf->multicurrency->enabled) {
// Price for the quantity in currency // Price for the quantity in currency
print '<td align="right">'; print '<td class="right">';
print $productfourn->fourn_multicurrency_price ? price($productfourn->fourn_multicurrency_price) : ""; print $productfourn->fourn_multicurrency_price ? price($productfourn->fourn_multicurrency_price) : "";
print '</td>'; print '</td>';
} }
// Unit price // Unit price
print '<td align="right">'; print '<td class="right">';
print price($productfourn->fourn_unitprice); print price($productfourn->fourn_unitprice);
//print $objp->unitprice? price($objp->unitprice) : ($objp->quantity?price($objp->price/$objp->quantity):"&nbsp;"); //print $objp->unitprice? price($objp->unitprice) : ($objp->quantity?price($objp->price/$objp->quantity):"&nbsp;");
print '</td>'; print '</td>';
if ($conf->multicurrency->enabled) { if ($conf->multicurrency->enabled) {
// Unit price in currency // Unit price in currency
print '<td align="right">'; print '<td class="right">';
print price($productfourn->fourn_multicurrency_unitprice); print price($productfourn->fourn_multicurrency_unitprice);
print '</td>'; print '</td>';
// Currency // Currency
print '<td align="right">'; print '<td class="right">';
print $productfourn->fourn_multicurrency_code ? currency_name($productfourn->fourn_multicurrency_code) : ''; print $productfourn->fourn_multicurrency_code ? currency_name($productfourn->fourn_multicurrency_code) : '';
print '</td>'; print '</td>';
} }
// Discount // Discount
print '<td align="right">'; print '<td class="right">';
print price2num($productfourn->fourn_remise_percent).'%'; print price2num($productfourn->fourn_remise_percent).'%';
print '</td>'; print '</td>';
// Delivery delay // Delivery delay
print '<td align="right">'; print '<td class="right">';
print $productfourn->delivery_time_days; print $productfourn->delivery_time_days;
print '</td>'; print '</td>';
// Reputation // Reputation
print '<td align="center">'; print '<td class="center">';
if (!empty($productfourn->supplier_reputation) && !empty($object->reputations[$productfourn->supplier_reputation])) { if (!empty($productfourn->supplier_reputation) && !empty($object->reputations[$productfourn->supplier_reputation])) {
print $object->reputations[$productfourn->supplier_reputation]; print $object->reputations[$productfourn->supplier_reputation];
} }

View File

@ -4,7 +4,8 @@
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2014-2016 Charlie BENKE <charlie@patas-monkey.com> * Copyright (C) 2014-2016 Charlie BENKE <charlie@patas-monkey.com>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2019 Pierre Ardoin <mapiolca@me.com> * Copyright (C) 2019 Pierre Ardoin <mapiolca@me.com>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -21,7 +22,7 @@
*/ */
/** /**
* \file htdocs/product/index.php * \file htdocs/product/index.php
* \ingroup product * \ingroup product
* \brief Homepage products and services * \brief Homepage products and services
*/ */
@ -142,31 +143,31 @@ print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").'</
if (! empty($conf->product->enabled)) if (! empty($conf->product->enabled))
{ {
$statProducts = '<tr class="oddeven">'; $statProducts = '<tr class="oddeven">';
$statProducts.= '<td><a href="list.php?type=0&amp;tosell=0&amp;tobuy=0">'.$langs->trans("ProductsNotOnSell").'</a></td><td align="right">'.round($prodser[0][0]).'</td>'; $statProducts.= '<td><a href="list.php?type=0&amp;tosell=0&amp;tobuy=0">'.$langs->trans("ProductsNotOnSell").'</a></td><td class="right">'.round($prodser[0][0]).'</td>';
$statProducts.= "</tr>"; $statProducts.= "</tr>";
$statProducts.= '<tr class="oddeven">'; $statProducts.= '<tr class="oddeven">';
$statProducts.= '<td><a href="list.php?type=0">'.$langs->trans("ProductsOnSaleOnly").'</a></td><td align="right">'.round($prodser[0][1]).'</td>'; $statProducts.= '<td><a href="list.php?type=0">'.$langs->trans("ProductsOnSaleOnly").'</a></td><td class="right">'.round($prodser[0][1]).'</td>';
$statProducts.= "</tr>"; $statProducts.= "</tr>";
$statProducts.= '<tr class="oddeven">'; $statProducts.= '<tr class="oddeven">';
$statProducts.= '<td><a href="list.php?type=0">'.$langs->trans("ProductsOnPurchaseOnly").'</a></td><td align="right">'.round($prodser[0][2]).'</td>'; $statProducts.= '<td><a href="list.php?type=0">'.$langs->trans("ProductsOnPurchaseOnly").'</a></td><td class="right">'.round($prodser[0][2]).'</td>';
$statProducts.= "</tr>"; $statProducts.= "</tr>";
$statProducts.= '<tr class="oddeven">'; $statProducts.= '<tr class="oddeven">';
$statProducts.= '<td><a href="list.php?type=0&amp;tosell=1&amp;tobuy=1">'.$langs->trans("ProductsOnSellAndOnBuy").'</a></td><td align="right">'.round($prodser[0][3]).'</td>'; $statProducts.= '<td><a href="list.php?type=0&amp;tosell=1&amp;tobuy=1">'.$langs->trans("ProductsOnSellAndOnBuy").'</a></td><td class="right">'.round($prodser[0][3]).'</td>';
$statProducts.= "</tr>"; $statProducts.= "</tr>";
} }
if (! empty($conf->service->enabled)) if (! empty($conf->service->enabled))
{ {
$statServices = '<tr class="oddeven">'; $statServices = '<tr class="oddeven">';
$statServices.= '<td><a href="list.php?type=1&amp;tosell=0&amp;tobuy=0">'.$langs->trans("ServicesNotOnSell").'</a></td><td align="right">'.round($prodser[1][0]).'</td>'; $statServices.= '<td><a href="list.php?type=1&amp;tosell=0&amp;tobuy=0">'.$langs->trans("ServicesNotOnSell").'</a></td><td class="right">'.round($prodser[1][0]).'</td>';
$statServices.= "</tr>"; $statServices.= "</tr>";
$statServices.= '<tr class="oddeven">'; $statServices.= '<tr class="oddeven">';
$statServices.= '<td><a href="list.php?type=1">'.$langs->trans("ServicesOnSaleOnly").'</a></td><td align="right">'.round($prodser[1][1]).'</td>'; $statServices.= '<td><a href="list.php?type=1">'.$langs->trans("ServicesOnSaleOnly").'</a></td><td class="right">'.round($prodser[1][1]).'</td>';
$statServices.= "</tr>"; $statServices.= "</tr>";
$statServices.= '<tr class="oddeven">'; $statServices.= '<tr class="oddeven">';
$statServices.= '<td><a href="list.php?type=1">'.$langs->trans("ServicesOnPurchaseOnly").'</a></td><td align="right">'.round($prodser[1][2]).'</td>'; $statServices.= '<td><a href="list.php?type=1">'.$langs->trans("ServicesOnPurchaseOnly").'</a></td><td class="right">'.round($prodser[1][2]).'</td>';
$statServices.= "</tr>"; $statServices.= "</tr>";
$statServices.= '<tr class="oddeven">'; $statServices.= '<tr class="oddeven">';
$statServices.= '<td><a href="list.php?type=1&amp;tosell=1&amp;tobuy=1">'.$langs->trans("ServicesOnSellAndOnBuy").'</a></td><td align="right">'.round($prodser[1][3]).'</td>'; $statServices.= '<td><a href="list.php?type=1&amp;tosell=1&amp;tobuy=1">'.$langs->trans("ServicesOnSellAndOnBuy").'</a></td><td class="right">'.round($prodser[1][3]).'</td>';
$statServices.= "</tr>"; $statServices.= "</tr>";
} }
$total=0; $total=0;
@ -185,7 +186,7 @@ else
print $statProducts.$statServices; print $statProducts.$statServices;
$total=round($prodser[0][0])+round($prodser[0][1])+round($prodser[0][2])+round($prodser[0][3])+round($prodser[1][0])+round($prodser[1][1])+round($prodser[1][2])+round($prodser[1][3]); //Calcul du Total des Produits et Services $total=round($prodser[0][0])+round($prodser[0][1])+round($prodser[0][2])+round($prodser[0][3])+round($prodser[1][0])+round($prodser[1][1])+round($prodser[1][2])+round($prodser[1][3]); //Calcul du Total des Produits et Services
} }
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td align="right">'; print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td class="right">';
print $total; print $total;
print '</td></tr>'; print '</td></tr>';
print '</table>'; print '</table>';
@ -198,7 +199,7 @@ if (! empty($conf->categorie->enabled) && ! empty($conf->global->CATEGORY_GRAPHS
print '<div class="div-table-responsive-no-min">'; print '<div class="div-table-responsive-no-min">';
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Categories").'</th></tr>'; print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Categories").'</th></tr>';
print '<tr '.$bc[0].'><td align="center" colspan="2">'; print '<tr '.$bc[0].'><td class="center" colspan="2">';
$sql = "SELECT c.label, count(*) as nb"; $sql = "SELECT c.label, count(*) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."categorie_product as cs"; $sql.= " FROM ".MAIN_DB_PREFIX."categorie_product as cs";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON cs.fk_categorie = c.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON cs.fk_categorie = c.rowid";
@ -258,7 +259,7 @@ if (! empty($conf->categorie->enabled) && ! empty($conf->global->CATEGORY_GRAPHS
} }
} }
print '</td></tr>'; print '</td></tr>';
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td align="right">'; print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td class="right">';
print $total; print $total;
print '</td></tr>'; print '</td></tr>';
print '</table>'; print '</table>';
@ -356,15 +357,15 @@ if ($result)
$objp->price = $price_result; $objp->price = $price_result;
} }
} }
print '<td align="right">'; print '<td class="right">';
if (isset($objp->price_base_type) && $objp->price_base_type == 'TTC') print price($objp->price_ttc).' '.$langs->trans("TTC"); if (isset($objp->price_base_type) && $objp->price_base_type == 'TTC') print price($objp->price_ttc).' '.$langs->trans("TTC");
else print price($objp->price).' '.$langs->trans("HT"); else print price($objp->price).' '.$langs->trans("HT");
print '</td>'; print '</td>';
} }
print '<td align="right" class="nowrap"><span class="statusrefsell">'; print '<td class="right nowrap"><span class="statusrefsell">';
print $product_static->LibStatut($objp->tosell, 3, 0); print $product_static->LibStatut($objp->tosell, 3, 0);
print "</span></td>"; print "</span></td>";
print '<td align="right" class="nowrap"><span class="statusrefbuy">'; print '<td class="right nowrap"><span class="statusrefbuy">';
print $product_static->LibStatut($objp->tobuy, 3, 1); print $product_static->LibStatut($objp->tobuy, 3, 1);
print "</span></td>"; print "</span></td>";
print "</tr>\n"; print "</tr>\n";
@ -444,14 +445,14 @@ function activitytrim($product_type)
print '<table class="noborder" width="75%">'; print '<table class="noborder" width="75%">';
if ($product_type==0) if ($product_type==0)
print '<tr class="liste_titre"><td align=left>'.$langs->trans("ProductSellByQuarterHT").'</td>'; print '<tr class="liste_titre"><td class=left>'.$langs->trans("ProductSellByQuarterHT").'</td>';
else else
print '<tr class="liste_titre"><td align=left>'.$langs->trans("ServiceSellByQuarterHT").'</td>'; print '<tr class="liste_titre"><td class=left>'.$langs->trans("ServiceSellByQuarterHT").'</td>';
print '<td align=right>'.$langs->trans("Quarter1").'</td>'; print '<td class=right>'.$langs->trans("Quarter1").'</td>';
print '<td align=right>'.$langs->trans("Quarter2").'</td>'; print '<td class=right>'.$langs->trans("Quarter2").'</td>';
print '<td align=right>'.$langs->trans("Quarter3").'</td>'; print '<td class=right>'.$langs->trans("Quarter3").'</td>';
print '<td align=right>'.$langs->trans("Quarter4").'</td>'; print '<td class=right>'.$langs->trans("Quarter4").'</td>';
print '<td align=right>'.$langs->trans("Total").'</td>'; print '<td class=right>'.$langs->trans("Total").'</td>';
print '</tr>'; print '</tr>';
} }
$i = 0; $i = 0;
@ -463,12 +464,12 @@ function activitytrim($product_type)
{ {
if ($trim1+$trim2+$trim3+$trim4 > 0) if ($trim1+$trim2+$trim3+$trim4 > 0)
{ {
print '<tr class="oddeven"><td align=left>'.$tmpyear.'</td>'; print '<tr class="oddeven"><td class=left>'.$tmpyear.'</td>';
print '<td align=right>'.price($trim1).'</td>'; print '<td class=right>'.price($trim1).'</td>';
print '<td align=right>'.price($trim2).'</td>'; print '<td class=right>'.price($trim2).'</td>';
print '<td align=right>'.price($trim3).'</td>'; print '<td class=right>'.price($trim3).'</td>';
print '<td align=right>'.price($trim4).'</td>'; print '<td class=right>'.price($trim4).'</td>';
print '<td align=right>'.price($trim1+$trim2+$trim3+$trim4).'</td>'; print '<td class=right>'.price($trim1+$trim2+$trim3+$trim4).'</td>';
print '</tr>'; print '</tr>';
$lgn++; $lgn++;
} }
@ -496,12 +497,12 @@ function activitytrim($product_type)
} }
if ($trim1+$trim2+$trim3+$trim4 > 0) if ($trim1+$trim2+$trim3+$trim4 > 0)
{ {
print '<tr class="oddeven"><td align=left>'.$tmpyear.'</td>'; print '<tr class="oddeven"><td class=left>'.$tmpyear.'</td>';
print '<td align=right>'.price($trim1).'</td>'; print '<td class=right>'.price($trim1).'</td>';
print '<td align=right>'.price($trim2).'</td>'; print '<td class=right>'.price($trim2).'</td>';
print '<td align=right>'.price($trim3).'</td>'; print '<td class=right>'.price($trim3).'</td>';
print '<td align=right>'.price($trim4).'</td>'; print '<td class=right>'.price($trim4).'</td>';
print '<td align=right>'.price($trim1+$trim2+$trim3+$trim4).'</td>'; print '<td class=right>'.price($trim1+$trim2+$trim3+$trim4).'</td>';
print '</tr>'; print '</tr>';
} }
if ($num > 0 ) if ($num > 0 )

View File

@ -514,26 +514,26 @@ if ($resql)
print '<tr class="liste_titre_filter">'; print '<tr class="liste_titre_filter">';
if (! empty($arrayfields['p.ref']['checked'])) if (! empty($arrayfields['p.ref']['checked']))
{ {
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '<input class="flat" type="text" name="search_ref" size="8" value="'.dol_escape_htmltag($search_ref).'">'; print '<input class="flat" type="text" name="search_ref" size="8" value="'.dol_escape_htmltag($search_ref).'">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['pfp.ref_fourn']['checked'])) if (! empty($arrayfields['pfp.ref_fourn']['checked']))
{ {
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '<input class="flat" type="text" name="search_ref_supplier" size="8" value="'.dol_escape_htmltag($search_ref_supplier).'">'; print '<input class="flat" type="text" name="search_ref_supplier" size="8" value="'.dol_escape_htmltag($search_ref_supplier).'">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['p.label']['checked'])) if (! empty($arrayfields['p.label']['checked']))
{ {
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '<input class="flat" type="text" name="search_label" size="12" value="'.dol_escape_htmltag($search_label).'">'; print '<input class="flat" type="text" name="search_label" size="12" value="'.dol_escape_htmltag($search_label).'">';
print '</td>'; print '</td>';
} }
// Type // Type
if (! empty($arrayfields['p.fk_product_type']['checked'])) if (! empty($arrayfields['p.fk_product_type']['checked']))
{ {
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
$array=array('-1'=>'&nbsp;', '0'=>$langs->trans('Product'), '1'=>$langs->trans('Service')); $array=array('-1'=>'&nbsp;', '0'=>$langs->trans('Product'), '1'=>$langs->trans('Service'));
print $form->selectarray('search_type', $array, $search_type); print $form->selectarray('search_type', $array, $search_type);
print '</td>'; print '</td>';
@ -555,7 +555,7 @@ if ($resql)
// Sell price // Sell price
if (! empty($arrayfields['p.sellprice']['checked'])) if (! empty($arrayfields['p.sellprice']['checked']))
{ {
print '<td class="liste_titre" align="right">'; print '<td class="liste_titre right">';
print '</td>'; print '</td>';
} }
// Minimum buying Price // Minimum buying Price
@ -623,17 +623,17 @@ if ($resql)
} }
if (! empty($arrayfields['p.tosell']['checked'])) if (! empty($arrayfields['p.tosell']['checked']))
{ {
print '<td class="liste_titre" align="right">'; print '<td class="liste_titre right">';
print $form->selectarray('search_tosell', array('0'=>$langs->trans('ProductStatusNotOnSellShort'),'1'=>$langs->trans('ProductStatusOnSellShort')), $search_tosell, 1); print $form->selectarray('search_tosell', array('0'=>$langs->trans('ProductStatusNotOnSellShort'),'1'=>$langs->trans('ProductStatusOnSellShort')), $search_tosell, 1);
print '</td >'; print '</td >';
} }
if (! empty($arrayfields['p.tobuy']['checked'])) if (! empty($arrayfields['p.tobuy']['checked']))
{ {
print '<td class="liste_titre" align="right">'; print '<td class="liste_titre right">';
print $form->selectarray('search_tobuy', array('0'=>$langs->trans('ProductStatusNotOnBuyShort'),'1'=>$langs->trans('ProductStatusOnBuyShort')), $search_tobuy, 1); print $form->selectarray('search_tobuy', array('0'=>$langs->trans('ProductStatusNotOnBuyShort'),'1'=>$langs->trans('ProductStatusOnBuyShort')), $search_tobuy, 1);
print '</td>'; print '</td>';
} }
print '<td class="liste_titre" align="middle">'; print '<td class="liste_titre center">';
$searchpicto=$form->showFilterButtons(); $searchpicto=$form->showFilterButtons();
print $searchpicto; print $searchpicto;
print '</td>'; print '</td>';
@ -641,39 +641,81 @@ if ($resql)
print '</tr>'; print '</tr>';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
if (! empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], "p.ref", "", $param, "", $sortfield, $sortorder); if (! empty($arrayfields['p.ref']['checked'])) {
if (! empty($arrayfields['pfp.ref_fourn']['checked'])) print_liste_field_titre($arrayfields['pfp.ref_fourn']['label'], $_SERVER["PHP_SELF"], "pfp.ref_fourn", "", $param, "", $sortfield, $sortorder); print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], "p.ref", "", $param, "", $sortfield, $sortorder);
if (! empty($arrayfields['p.label']['checked'])) print_liste_field_titre($arrayfields['p.label']['label'], $_SERVER["PHP_SELF"], "p.label", "", $param, "", $sortfield, $sortorder); }
if (! empty($arrayfields['p.fk_product_type']['checked'])) print_liste_field_titre($arrayfields['p.fk_product_type']['label'], $_SERVER["PHP_SELF"], "p.fk_product_type", "", $param, "", $sortfield, $sortorder); if (! empty($arrayfields['pfp.ref_fourn']['checked'])) {
if (! empty($arrayfields['p.barcode']['checked'])) print_liste_field_titre($arrayfields['p.barcode']['label'], $_SERVER["PHP_SELF"], "p.barcode", "", $param, "", $sortfield, $sortorder); print_liste_field_titre($arrayfields['pfp.ref_fourn']['label'], $_SERVER["PHP_SELF"], "pfp.ref_fourn", "", $param, "", $sortfield, $sortorder);
if ((string) $type == '1' && ! empty($arrayfields['p.duration']['checked'])) print_liste_field_titre($arrayfields['p.duration']['label'], $_SERVER["PHP_SELF"], "p.duration", "", $param, 'align="center"', $sortfield, $sortorder); }
if (! empty($arrayfields['p.sellprice']['checked'])) print_liste_field_titre($arrayfields['p.sellprice']['label'], $_SERVER["PHP_SELF"], "", "", $param, 'align="right"', $sortfield, $sortorder); if (! empty($arrayfields['p.label']['checked'])) {
if (! empty($arrayfields['p.minbuyprice']['checked'])) print_liste_field_titre($arrayfields['p.minbuyprice']['label'], $_SERVER["PHP_SELF"], "", "", $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['p.label']['label'], $_SERVER["PHP_SELF"], "p.label", "", $param, "", $sortfield, $sortorder);
if (! empty($arrayfields['p.numbuyprice']['checked'])) print_liste_field_titre($arrayfields['p.numbuyprice']['label'], $_SERVER["PHP_SELF"], "", "", $param, 'align="right"', $sortfield, $sortorder); }
if (! empty($arrayfields['p.pmp']['checked'])) print_liste_field_titre($arrayfields['p.pmp']['label'], $_SERVER["PHP_SELF"], "", "", $param, 'align="right"', $sortfield, $sortorder); if (! empty($arrayfields['p.fk_product_type']['checked'])) {
if (! empty($arrayfields['p.seuil_stock_alerte']['checked'])) print_liste_field_titre($arrayfields['p.seuil_stock_alerte']['label'], $_SERVER["PHP_SELF"], "p.seuil_stock_alerte", "", $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['p.fk_product_type']['label'], $_SERVER["PHP_SELF"], "p.fk_product_type", "", $param, "", $sortfield, $sortorder);
if (! empty($arrayfields['p.desiredstock']['checked'])) print_liste_field_titre($arrayfields['p.desiredstock']['label'], $_SERVER["PHP_SELF"], "p.desiredstock", "", $param, 'align="right"', $sortfield, $sortorder); }
if (! empty($arrayfields['p.stock']['checked'])) print_liste_field_titre($arrayfields['p.stock']['label'], $_SERVER["PHP_SELF"], "p.stock", "", $param, 'align="right"', $sortfield, $sortorder); if (! empty($arrayfields['p.barcode']['checked'])) {
if (! empty($arrayfields['stock_virtual']['checked'])) print_liste_field_titre($arrayfields['stock_virtual']['label'], $_SERVER["PHP_SELF"], "", "", $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['p.barcode']['label'], $_SERVER["PHP_SELF"], "p.barcode", "", $param, "", $sortfield, $sortorder);
if (! empty($arrayfields['p.tobatch']['checked'])) print_liste_field_titre($arrayfields['p.tobatch']['label'], $_SERVER["PHP_SELF"], "p.tobatch", "", $param, 'align="center"', $sortfield, $sortorder); }
if (! empty($arrayfields['p.accountancy_code_sell']['checked'])) print_liste_field_titre($arrayfields['p.accountancy_code_sell']['label'], $_SERVER["PHP_SELF"], "p.accountancy_code_sell", "", $param, '', $sortfield, $sortorder); if ((string) $type == '1' && ! empty($arrayfields['p.duration']['checked'])) {
if (! empty($arrayfields['p.accountancy_code_buy']['checked'])) print_liste_field_titre($arrayfields['p.accountancy_code_buy']['label'], $_SERVER["PHP_SELF"], "p.accountancy_code_buy", "", $param, '', $sortfield, $sortorder); print_liste_field_titre($arrayfields['p.duration']['label'], $_SERVER["PHP_SELF"], "p.duration", "", $param, '', $sortfield, $sortorder, 'center ');
}
if (! empty($arrayfields['p.sellprice']['checked'])) {
print_liste_field_titre($arrayfields['p.sellprice']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ');
}
if (! empty($arrayfields['p.minbuyprice']['checked'])) {
print_liste_field_titre($arrayfields['p.minbuyprice']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ');
}
if (! empty($arrayfields['p.numbuyprice']['checked'])) {
print_liste_field_titre($arrayfields['p.numbuyprice']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ');
}
if (! empty($arrayfields['p.pmp']['checked'])) {
print_liste_field_titre($arrayfields['p.pmp']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ');
}
if (! empty($arrayfields['p.seuil_stock_alerte']['checked'])) {
print_liste_field_titre($arrayfields['p.seuil_stock_alerte']['label'], $_SERVER["PHP_SELF"], "p.seuil_stock_alerte", "", $param, '', $sortfield, $sortorder, 'right ');
}
if (! empty($arrayfields['p.desiredstock']['checked'])) {
print_liste_field_titre($arrayfields['p.desiredstock']['label'], $_SERVER["PHP_SELF"], "p.desiredstock", "", $param, '', $sortfield, $sortorder, 'right ');
}
if (! empty($arrayfields['p.stock']['checked'])) {
print_liste_field_titre($arrayfields['p.stock']['label'], $_SERVER["PHP_SELF"], "p.stock", "", $param, '', $sortfield, $sortorder, 'right ');
}
if (! empty($arrayfields['stock_virtual']['checked'])) {
print_liste_field_titre($arrayfields['stock_virtual']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ');
}
if (! empty($arrayfields['p.tobatch']['checked'])) {
print_liste_field_titre($arrayfields['p.tobatch']['label'], $_SERVER["PHP_SELF"], "p.tobatch", "", $param, '', $sortfield, $sortorder, 'center ');
}
if (! empty($arrayfields['p.accountancy_code_sell']['checked'])) {
print_liste_field_titre($arrayfields['p.accountancy_code_sell']['label'], $_SERVER["PHP_SELF"], "p.accountancy_code_sell", "", $param, '', $sortfield, $sortorder);
}
if (! empty($arrayfields['p.accountancy_code_buy']['checked'])) {
print_liste_field_titre($arrayfields['p.accountancy_code_buy']['label'], $_SERVER["PHP_SELF"], "p.accountancy_code_buy", "", $param, '', $sortfield, $sortorder);
}
// Extra fields // Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields // Hook fields
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder); $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 $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint; print $hookmanager->resPrint;
if (! empty($arrayfields['p.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); if (! empty($arrayfields['p.datec']['checked'])) {
if (! empty($arrayfields['p.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
if (! empty($arrayfields['p.tosell']['checked'])) print_liste_field_titre($arrayfields['p.tosell']['label'], $_SERVER["PHP_SELF"], "p.tosell", "", $param, 'align="right"', $sortfield, $sortorder); }
if (! empty($arrayfields['p.tobuy']['checked'])) print_liste_field_titre($arrayfields['p.tobuy']['label'], $_SERVER["PHP_SELF"], "p.tobuy", "", $param, 'align="right"', $sortfield, $sortorder); if (! empty($arrayfields['p.tms']['checked'])) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
print "</tr>\n"; }
if (! empty($arrayfields['p.tosell']['checked'])) {
print_liste_field_titre($arrayfields['p.tosell']['label'], $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'right ');
}
if (! empty($arrayfields['p.tobuy']['checked'])) {
print_liste_field_titre($arrayfields['p.tobuy']['label'], $_SERVER["PHP_SELF"], "p.tobuy", "", $param, '', $sortfield, $sortorder, 'right ');
}
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
print "</tr>\n";
$product_static=new Product($db); $product_static = new Product($db);
$product_fourn =new ProductFournisseur($db); $product_fourn = new ProductFournisseur($db);
$i = 0; $i = 0;
$totalarray=array(); $totalarray=array();
@ -776,7 +818,7 @@ if ($resql)
// Duration // Duration
if ((string) $type == '1' && ! empty($arrayfields['p.duration']['checked'])) if ((string) $type == '1' && ! empty($arrayfields['p.duration']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
if (preg_match('/([^a-z]+)[a-z]$/i', $obj->duration)) if (preg_match('/([^a-z]+)[a-z]$/i', $obj->duration))
{ {
@ -842,7 +884,7 @@ if ($resql)
// Number of buy prices // Number of buy prices
if (! empty($arrayfields['p.numbuyprice']['checked'])) if (! empty($arrayfields['p.numbuyprice']['checked']))
{ {
print '<td align="right">'; print '<td class="right">';
if ($obj->tobuy) if ($obj->tobuy)
{ {
if (count($productFournList = $product_fourn->list_product_fournisseur_price($obj->rowid)) > 0) if (count($productFournList = $product_fourn->list_product_fournisseur_price($obj->rowid)) > 0)
@ -857,7 +899,7 @@ if ($resql)
// WAP // WAP
if (! empty($arrayfields['p.pmp']['checked'])) if (! empty($arrayfields['p.pmp']['checked']))
{ {
print '<td class="nowrap" align="right">'; print '<td class="nowrap right">';
print price($product_static->pmp, 1, $langs); print price($product_static->pmp, 1, $langs);
print '</td>'; print '</td>';
} }
@ -865,7 +907,7 @@ if ($resql)
// Limit alert // Limit alert
if (! empty($arrayfields['p.seuil_stock_alerte']['checked'])) if (! empty($arrayfields['p.seuil_stock_alerte']['checked']))
{ {
print '<td align="right">'; print '<td class="right">';
if ($obj->fk_product_type != 1) if ($obj->fk_product_type != 1)
{ {
print $obj->seuil_stock_alerte; print $obj->seuil_stock_alerte;
@ -876,7 +918,7 @@ if ($resql)
// Desired stock // Desired stock
if (! empty($arrayfields['p.desiredstock']['checked'])) if (! empty($arrayfields['p.desiredstock']['checked']))
{ {
print '<td align="right">'; print '<td class="right">';
if ($obj->fk_product_type != 1) if ($obj->fk_product_type != 1)
{ {
print $obj->desiredstock; print $obj->desiredstock;
@ -887,7 +929,7 @@ if ($resql)
// Stock real // Stock real
if (! empty($arrayfields['p.stock']['checked'])) if (! empty($arrayfields['p.stock']['checked']))
{ {
print '<td align="right">'; print '<td class="right">';
if ($obj->fk_product_type != 1) if ($obj->fk_product_type != 1)
{ {
if ($obj->seuil_stock_alerte != '' && $product_static->stock_reel < (float) $obj->seuil_stock_alerte) print img_warning($langs->trans("StockLowerThanLimit", $obj->seuil_stock_alerte)).' '; if ($obj->seuil_stock_alerte != '' && $product_static->stock_reel < (float) $obj->seuil_stock_alerte) print img_warning($langs->trans("StockLowerThanLimit", $obj->seuil_stock_alerte)).' ';
@ -899,7 +941,7 @@ if ($resql)
// Stock virtual // Stock virtual
if (! empty($arrayfields['stock_virtual']['checked'])) if (! empty($arrayfields['stock_virtual']['checked']))
{ {
print '<td align="right">'; print '<td class="right">';
if ($obj->fk_product_type != 1) if ($obj->fk_product_type != 1)
{ {
if ($obj->seuil_stock_alerte != '' && $product_static->stock_theorique < (float) $obj->seuil_stock_alerte) print img_warning($langs->trans("StockLowerThanLimit", $obj->seuil_stock_alerte)).' '; if ($obj->seuil_stock_alerte != '' && $product_static->stock_theorique < (float) $obj->seuil_stock_alerte) print img_warning($langs->trans("StockLowerThanLimit", $obj->seuil_stock_alerte)).' ';
@ -911,7 +953,7 @@ if ($resql)
// Lot/Serial // Lot/Serial
if (! empty($arrayfields['p.tobatch']['checked'])) if (! empty($arrayfields['p.tobatch']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
print yn($obj->tobatch); print yn($obj->tobatch);
print '</td>'; print '</td>';
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;
@ -937,7 +979,7 @@ if ($resql)
// Date creation // Date creation
if (! empty($arrayfields['p.datec']['checked'])) if (! empty($arrayfields['p.datec']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
print dol_print_date($obj->date_creation, 'dayhour', 'tzuser'); print dol_print_date($obj->date_creation, 'dayhour', 'tzuser');
print '</td>'; print '</td>';
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;
@ -945,7 +987,7 @@ if ($resql)
// Date modification // Date modification
if (! empty($arrayfields['p.tms']['checked'])) if (! empty($arrayfields['p.tms']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
print dol_print_date($obj->date_update, 'dayhour', 'tzuser'); print dol_print_date($obj->date_update, 'dayhour', 'tzuser');
print '</td>'; print '</td>';
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;
@ -954,7 +996,7 @@ if ($resql)
// Status (to sell) // Status (to sell)
if (! empty($arrayfields['p.tosell']['checked'])) if (! empty($arrayfields['p.tosell']['checked']))
{ {
print '<td align="right" nowrap="nowrap">'; print '<td class="right nowrap">';
if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
print ajax_object_onoff($product_static, 'status', 'tosell', 'ProductStatusOnSell', 'ProductStatusNotOnSell'); print ajax_object_onoff($product_static, 'status', 'tosell', 'ProductStatusOnSell', 'ProductStatusNotOnSell');
} else { } else {
@ -966,7 +1008,7 @@ if ($resql)
// Status (to buy) // Status (to buy)
if (! empty($arrayfields['p.tobuy']['checked'])) if (! empty($arrayfields['p.tobuy']['checked']))
{ {
print '<td align="right" nowrap="nowrap">'; print '<td class="right nowrap">';
if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
print ajax_object_onoff($product_static, 'status_buy', 'tobuy', 'ProductStatusOnBuy', 'ProductStatusNotOnBuy'); print ajax_object_onoff($product_static, 'status_buy', 'tobuy', 'ProductStatusOnBuy', 'ProductStatusNotOnBuy');
} else { } else {
@ -976,7 +1018,7 @@ if ($resql)
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;
} }
// Action // Action
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 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; $selected=0;

View File

@ -163,7 +163,7 @@ print "<tr class=\"liste_titre\">";
print_liste_field_titre('Ref', $_SERVER["PHP_SELF"], 'p.ref', '', $param, '', $sortfield, $sortorder); print_liste_field_titre('Ref', $_SERVER["PHP_SELF"], 'p.ref', '', $param, '', $sortfield, $sortorder);
print_liste_field_titre('Type', $_SERVER["PHP_SELF"], 'p.fk_product_type', '', $param, '', $sortfield, $sortorder); print_liste_field_titre('Type', $_SERVER["PHP_SELF"], 'p.fk_product_type', '', $param, '', $sortfield, $sortorder);
print_liste_field_titre('Label', $_SERVER["PHP_SELF"], 'p.label', '', $param, '', $sortfield, $sortorder); print_liste_field_titre('Label', $_SERVER["PHP_SELF"], 'p.label', '', $param, '', $sortfield, $sortorder);
print_liste_field_titre('NbOfQtyInProposals', $_SERVER["PHP_SELF"], 'c', '', $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre('NbOfQtyInProposals', $_SERVER["PHP_SELF"], 'c', '', $param, '', $sortfield, $sortorder, 'right ');
print "</tr>\n"; print "</tr>\n";
foreach($infoprod as $prodid => $vals) foreach($infoprod as $prodid => $vals)
@ -196,7 +196,7 @@ foreach($infoprod as $prodid => $vals)
else print $langs->trans("Product"); else print $langs->trans("Product");
print '</td>'; print '</td>';
print '<td>'.$vals['label'].'</td>'; print '<td>'.$vals['label'].'</td>';
print '<td align="right">'.$vals['nblineproposal'].'</td>'; print '<td class="right">'.$vals['nblineproposal'].'</td>';
print "</tr>\n"; print "</tr>\n";
$i++; $i++;
} }

View File

@ -893,9 +893,9 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES) || ! empty($conf->global->PRODUI
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>' . $langs->trans("PriceByQuantityRange") . ' ' . $i . '</td>'; print '<td>' . $langs->trans("PriceByQuantityRange") . ' ' . $i . '</td>';
print '<td align="right">' . $langs->trans("HT") . '</td>'; print '<td class="right">' . $langs->trans("HT") . '</td>';
print '<td align="right">' . $langs->trans("UnitPrice") . '</td>'; print '<td class="right">' . $langs->trans("UnitPrice") . '</td>';
print '<td align="right">' . $langs->trans("Discount") . '</td>'; print '<td class="right">' . $langs->trans("Discount") . '</td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '</tr>'; print '</tr>';
foreach ($object->prices_by_qty_list[$i] as $ii => $prices) foreach ($object->prices_by_qty_list[$i] as $ii => $prices)
@ -907,18 +907,18 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES) || ! empty($conf->global->PRODUI
print '<input type="hidden" value="' . $prices['rowid'] . '" name="rowid">'; print '<input type="hidden" value="' . $prices['rowid'] . '" name="rowid">';
print '<tr class="' . ($ii % 2 == 0 ? 'pair' : 'impair') . '">'; print '<tr class="' . ($ii % 2 == 0 ? 'pair' : 'impair') . '">';
print '<td><input size="5" type="text" value="' . $prices['quantity'] . '" name="quantity"></td>'; print '<td><input size="5" type="text" value="' . $prices['quantity'] . '" name="quantity"></td>';
print '<td align="right" colspan="2"><input size="10" type="text" value="' . price2num($prices['price'], 'MU') . '" name="price">&nbsp;' . $object->price_base_type . '</td>'; print '<td class="right" colspan="2"><input size="10" type="text" value="' . price2num($prices['price'], 'MU') . '" name="price">&nbsp;' . $object->price_base_type . '</td>';
print '<td align="right"><input size="5" type="text" value="' . $prices['remise_percent'] . '" name="remise_percent">&nbsp;%</td>'; print '<td class="right"><input size="5" type="text" value="' . $prices['remise_percent'] . '" name="remise_percent">&nbsp;%</td>';
print '<td align="center"><input type="submit" value="' . $langs->trans("Modify") . '" class="button"></td>'; print '<td class="center"><input type="submit" value="' . $langs->trans("Modify") . '" class="button"></td>';
print '</tr>'; print '</tr>';
print '</form>'; print '</form>';
} else { } else {
print '<tr class="' . ($ii % 2 == 0 ? 'pair' : 'impair') . '">'; print '<tr class="' . ($ii % 2 == 0 ? 'pair' : 'impair') . '">';
print '<td>' . $prices['quantity'] . '</td>'; print '<td>' . $prices['quantity'] . '</td>';
print '<td align="right">' . price($prices['price']) . '</td>'; print '<td class="right">' . price($prices['price']) . '</td>';
print '<td align="right">' . price($prices['unitprice']) . '</td>'; print '<td class="right">' . price($prices['unitprice']) . '</td>';
print '<td align="right">' . price($prices['remise_percent']) . ' %</td>'; print '<td class="right">' . price($prices['remise_percent']) . ' %</td>';
print '<td align="center">'; print '<td class="center">';
if (($user->rights->produit->creer || $user->rights->service->creer)) { if (($user->rights->produit->creer || $user->rights->service->creer)) {
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;action=edit_price_by_qty&amp;rowid=' . $prices["rowid"] . '">'; print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;action=edit_price_by_qty&amp;rowid=' . $prices["rowid"] . '">';
print img_edit() . '</a>'; print img_edit() . '</a>';
@ -938,10 +938,10 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES) || ! empty($conf->global->PRODUI
print '<input type="hidden" value="0" name="rowid">'; // id in product_price print '<input type="hidden" value="0" name="rowid">'; // id in product_price
print '<tr class="' . ($ii % 2 == 0 ? 'pair' : 'impair') . '">'; print '<tr class="' . ($ii % 2 == 0 ? 'pair' : 'impair') . '">';
print '<td><input size="5" type="text" value="1" name="quantity"></td>'; print '<td><input size="5" type="text" value="1" name="quantity"></td>';
print '<td align="right" class="nowrap"><input size="10" type="text" value="0" name="price">&nbsp;' . $object->price_base_type . '</td>'; print '<td class="right" class="nowrap"><input size="10" type="text" value="0" name="price">&nbsp;' . $object->price_base_type . '</td>';
print '<td align="right">&nbsp;</td>'; print '<td class="right">&nbsp;</td>';
print '<td align="right" class="nowrap"><input size="5" type="text" value="0" name="remise_percent">&nbsp;%</td>'; print '<td class="right" class="nowrap"><input size="5" type="text" value="0" name="remise_percent">&nbsp;%</td>';
print '<td align="center"><input type="submit" value="' . $langs->trans("Add") . '" class="button"></td>'; print '<td class="center"><input type="submit" value="' . $langs->trans("Add") . '" class="button"></td>';
print '</tr>'; print '</tr>';
print '</form>'; print '</form>';
} }
@ -1013,10 +1013,10 @@ else
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
//print '<td>' . $langs->trans("PriceByQuantityRange") . '</td>'; //print '<td>' . $langs->trans("PriceByQuantityRange") . '</td>';
print '<td>' . $langs->trans("Quantity") . '</td>'; print '<td>' . $langs->trans("Quantity") . '</td>';
print '<td align="right">' . $langs->trans("Price") . '</td>'; print '<td class="right">' . $langs->trans("Price") . '</td>';
print '<td align="right"></td>'; print '<td class="right"></td>';
print '<td align="right">' . $langs->trans("UnitPrice") . '</td>'; print '<td class="right">' . $langs->trans("UnitPrice") . '</td>';
print '<td align="right">' . $langs->trans("Discount") . '</td>'; print '<td class="right">' . $langs->trans("Discount") . '</td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '</tr>'; print '</tr>';
if ($action != 'edit_price_by_qty') if ($action != 'edit_price_by_qty')
@ -1028,13 +1028,13 @@ else
print '<tr class="' . ($ii % 2 == 0 ? 'pair' : 'impair') . '">'; print '<tr class="' . ($ii % 2 == 0 ? 'pair' : 'impair') . '">';
print '<td><input size="5" type="text" value="1" name="quantity"></td>'; print '<td><input size="5" type="text" value="1" name="quantity"></td>';
print '<td align="right"><input class="width50 right" type="text" value="0" name="price"></td>'; print '<td class="right"><input class="width50 right" type="text" value="0" name="price"></td>';
print '<td>'; print '<td>';
//print $object->price_base_type; //print $object->price_base_type;
print '</td>'; print '</td>';
print '<td align="right">&nbsp;</td>'; print '<td class="right">&nbsp;</td>';
print '<td align="right"><input type="text" class="width50 right" value="0" name="remise_percent">&nbsp;%</td>'; print '<td class="right"><input type="text" class="width50 right" value="0" name="remise_percent">&nbsp;%</td>';
print '<td align="center"><input type="submit" value="' . $langs->trans("Add") . '" class="button"></td>'; print '<td class="center"><input type="submit" value="' . $langs->trans("Add") . '" class="button"></td>';
print '</tr>'; print '</tr>';
print '</form>'; print '</form>';
@ -1049,27 +1049,27 @@ else
print '<input type="hidden" value="' . $prices['rowid'] . '" name="rowid">'; // id in product_price_by_qty print '<input type="hidden" value="' . $prices['rowid'] . '" name="rowid">'; // id in product_price_by_qty
print '<tr class="' . ($ii % 2 == 0 ? 'pair' : 'impair') . '">'; print '<tr class="' . ($ii % 2 == 0 ? 'pair' : 'impair') . '">';
print '<td><input size="5" type="text" value="' . $prices['quantity'] . '" name="quantity"></td>'; print '<td><input size="5" type="text" value="' . $prices['quantity'] . '" name="quantity"></td>';
print '<td align="right"><input class="width50 right" type="text" value="' . price2num($prices['price'], 'MU') . '" name="price"></td>'; print '<td class="right"><input class="width50 right" type="text" value="' . price2num($prices['price'], 'MU') . '" name="price"></td>';
print '<td align="right">'; print '<td class="right">';
//print $object->price_base_type; //print $object->price_base_type;
print $prices['price_base_type']; print $prices['price_base_type'];
print '</td>'; print '</td>';
print '<td align="right">&nbsp;</td>'; print '<td class="right">&nbsp;</td>';
print '<td align="right"><input class="width50 right" type="text" value="' . $prices['remise_percent'] . '" name="remise_percent">&nbsp;%</td>'; print '<td class="right"><input class="width50 right" type="text" value="' . $prices['remise_percent'] . '" name="remise_percent">&nbsp;%</td>';
print '<td align="center"><input type="submit" value="' . $langs->trans("Modify") . '" class="button"></td>'; print '<td class="center"><input type="submit" value="' . $langs->trans("Modify") . '" class="button"></td>';
print '</tr>'; print '</tr>';
print '</form>'; print '</form>';
} else { } else {
print '<tr class="' . ($ii % 2 == 0 ? 'pair' : 'impair') . '">'; print '<tr class="' . ($ii % 2 == 0 ? 'pair' : 'impair') . '">';
print '<td>' . $prices['quantity'] . '</td>'; print '<td>' . $prices['quantity'] . '</td>';
print '<td align="right">' . price($prices['price']) . '</td>'; print '<td class="right">' . price($prices['price']) . '</td>';
print '<td align="right">'; print '<td class="right">';
//print $object->price_base_type; //print $object->price_base_type;
print $prices['price_base_type']; print $prices['price_base_type'];
print '</td>'; print '</td>';
print '<td align="right">' . price($prices['unitprice']) . '</td>'; print '<td class="right">' . price($prices['unitprice']) . '</td>';
print '<td align="right">' . price($prices['remise_percent']) . ' %</td>'; print '<td class="right">' . price($prices['remise_percent']) . ' %</td>';
print '<td align="center">'; print '<td class="center">';
if (($user->rights->produit->creer || $user->rights->service->creer)) if (($user->rights->produit->creer || $user->rights->service->creer))
{ {
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;action=edit_price_by_qty&amp;rowid=' . $prices["rowid"] . '">'; print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;action=edit_price_by_qty&amp;rowid=' . $prices["rowid"] . '">';
@ -1475,25 +1475,25 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_
print '<td>' . $langs->trans("AppliedPricesFrom") . '</td>'; print '<td>' . $langs->trans("AppliedPricesFrom") . '</td>';
if (! empty($conf->global->PRODUIT_MULTIPRICES) || ! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { if (! empty($conf->global->PRODUIT_MULTIPRICES) || ! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) {
print '<td align="center">' . $langs->trans("PriceLevel") . '</td>'; print '<td class="center">' . $langs->trans("PriceLevel") . '</td>';
} }
if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY) || ! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY) || ! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) {
print '<td align="center">' . $langs->trans("Type") . '</td>'; print '<td class="center">' . $langs->trans("Type") . '</td>';
} }
print '<td align="center">' . $langs->trans("PriceBase") . '</td>'; print '<td class="center">' . $langs->trans("PriceBase") . '</td>';
print $conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL; print $conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL;
if (empty($conf->global->PRODUIT_MULTIPRICES) && empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) print '<td align="right">' . $langs->trans("DefaultTaxRate") . '</td>'; if (empty($conf->global->PRODUIT_MULTIPRICES) && empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) print '<td class="right">' . $langs->trans("DefaultTaxRate") . '</td>';
print '<td align="right">' . $langs->trans("HT") . '</td>'; print '<td class="right">' . $langs->trans("HT") . '</td>';
print '<td align="right">' . $langs->trans("TTC") . '</td>'; print '<td class="right">' . $langs->trans("TTC") . '</td>';
if (! empty($conf->dynamicprices->enabled)) { if (! empty($conf->dynamicprices->enabled)) {
print '<td align="right">' . $langs->trans("PriceExpressionSelected") . '</td>'; print '<td class="right">' . $langs->trans("PriceExpressionSelected") . '</td>';
} }
print '<td align="right">' . $langs->trans("MinPrice") . ' ' . $langs->trans("HT") . '</td>'; print '<td class="right">' . $langs->trans("MinPrice") . ' ' . $langs->trans("HT") . '</td>';
print '<td align="right">' . $langs->trans("MinPrice") . ' ' . $langs->trans("TTC") . '</td>'; print '<td class="right">' . $langs->trans("MinPrice") . ' ' . $langs->trans("TTC") . '</td>';
print '<td align="right">' . $langs->trans("ChangedBy") . '</td>'; print '<td class="right">' . $langs->trans("ChangedBy") . '</td>';
if ($user->rights->produit->supprimer) if ($user->rights->produit->supprimer)
print '<td align="right">&nbsp;</td>'; print '<td class="right">&nbsp;</td>';
print '</tr>'; print '</tr>';
$notfirstlineforlevel=array(); $notfirstlineforlevel=array();
@ -1509,16 +1509,16 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_
// Price level // Price level
if (! empty($conf->global->PRODUIT_MULTIPRICES) || ! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { if (! empty($conf->global->PRODUIT_MULTIPRICES) || ! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) {
print '<td align="center">' . $objp->price_level . "</td>"; print '<td class="center">' . $objp->price_level . "</td>";
} }
// Price by quantity // Price by quantity
if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY) || ! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY) || ! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES))
{ {
$type = ($objp->price_by_qty == 1) ? 'PriceByQuantity' : 'Standard'; $type = ($objp->price_by_qty == 1) ? 'PriceByQuantity' : 'Standard';
print '<td align="center">' . $langs->trans($type) . "</td>"; print '<td class="center">' . $langs->trans($type) . "</td>";
} }
print '<td align="center">'; print '<td class="center">';
if (empty($objp->price_by_qty)) { if (empty($objp->price_by_qty)) {
print $langs->trans($objp->price_base_type); print $langs->trans($objp->price_base_type);
} }
@ -1526,7 +1526,7 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_
if (empty($conf->global->PRODUIT_MULTIPRICES) && empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) if (empty($conf->global->PRODUIT_MULTIPRICES) && empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES))
{ {
print '<td align="right">'; print '<td class="right">';
if (empty($objp->price_by_qty)) { if (empty($objp->price_by_qty)) {
$positiverates=''; $positiverates='';
@ -1552,41 +1552,41 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_
$price_expression = new PriceExpression($db); $price_expression = new PriceExpression($db);
$res = $price_expression->fetch($objp->fk_price_expression); $res = $price_expression->fetch($objp->fk_price_expression);
$title = $price_expression->title; $title = $price_expression->title;
print '<td align="right"></td>'; print '<td class="right"></td>';
print '<td align="right"></td>'; print '<td class="right"></td>';
print '<td align="right">' . $title . "</td>"; print '<td class="right">' . $title . "</td>";
} }
else else
{ {
print '<td align="right">'; print '<td class="right">';
if (empty($objp->price_by_qty)) { if (empty($objp->price_by_qty)) {
print ($objp->price_base_type != 'TTC' ? price($objp->price) : ''); print ($objp->price_base_type != 'TTC' ? price($objp->price) : '');
} }
print "</td>"; print "</td>";
print '<td align="right">'; print '<td class="right">';
if (empty($objp->price_by_qty)) { if (empty($objp->price_by_qty)) {
print ($objp->price_base_type == 'TTC' ? price($objp->price_ttc) : ''); print ($objp->price_base_type == 'TTC' ? price($objp->price_ttc) : '');
} }
print "</td>"; print "</td>";
if (! empty($conf->dynamicprices->enabled)) { //Only if module is enabled if (! empty($conf->dynamicprices->enabled)) { //Only if module is enabled
print '<td align="right"></td>'; print '<td class="right"></td>';
} }
} }
print '<td align="right">'; print '<td class="right">';
if (empty($objp->price_by_qty)) { if (empty($objp->price_by_qty)) {
print ($objp->price_base_type != 'TTC' ? price($objp->price_min) : ''); print ($objp->price_base_type != 'TTC' ? price($objp->price_min) : '');
} }
print '</td>'; print '</td>';
print '<td align="right">'; print '<td class="right">';
if (empty($objp->price_by_qty)) { if (empty($objp->price_by_qty)) {
print ($objp->price_base_type == 'TTC' ? price($objp->price_min_ttc) : ''); print ($objp->price_base_type == 'TTC' ? price($objp->price_min_ttc) : '');
} }
print '</td>'; print '</td>';
// User // User
print '<td align="right"><a href="' . DOL_URL_ROOT . '/user/card.php?id=' . $objp->user_id . '">' . img_object($langs->trans("ShowUser"), 'user') . ' ' . $objp->login . '</a></td>'; print '<td class="right"><a href="' . DOL_URL_ROOT . '/user/card.php?id=' . $objp->user_id . '">' . img_object($langs->trans("ShowUser"), 'user') . ' ' . $objp->login . '</a></td>';
// Action // Action
if ($user->rights->produit->supprimer) if ($user->rights->produit->supprimer)
@ -1599,7 +1599,7 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_
} }
elseif ($i > 0) $candelete=1; elseif ($i > 0) $candelete=1;
print '<td align="right">'; print '<td class="right">';
if ($candelete) if ($candelete)
{ {
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=delete&amp;id=' . $object->id . '&amp;lineid=' . $objp->rowid . '">'; print '<a href="' . $_SERVER["PHP_SELF"] . '?action=delete&amp;id=' . $object->id . '&amp;lineid=' . $objp->rowid . '">';
@ -1866,21 +1866,21 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>' . $langs->trans("ThirdParty") . '</td>'; print '<td>' . $langs->trans("ThirdParty") . '</td>';
print '<td>' . $langs->trans("AppliedPricesFrom") . '</td>'; print '<td>' . $langs->trans("AppliedPricesFrom") . '</td>';
print '<td align="center">' . $langs->trans("PriceBase") . '</td>'; print '<td class="center">' . $langs->trans("PriceBase") . '</td>';
print '<td align="right">' . $langs->trans("DefaultTaxRate") . '</td>'; print '<td class="right">' . $langs->trans("DefaultTaxRate") . '</td>';
print '<td align="right">' . $langs->trans("HT") . '</td>'; print '<td class="right">' . $langs->trans("HT") . '</td>';
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1")
{ {
//print '<td align="right">' . $langs->trans("INCVATONLY") . '</td>'; //print '<td class="right">' . $langs->trans("INCVATONLY") . '</td>';
print '<td align="right">' . $langs->trans("INCT") . '</td>'; print '<td class="right">' . $langs->trans("INCT") . '</td>';
} }
else else
{ {
print '<td align="right">' . $langs->trans("TTC") . '</td>'; print '<td class="right">' . $langs->trans("TTC") . '</td>';
} }
print '<td align="right">' . $langs->trans("MinPrice") . ' ' . $langs->trans("HT") . '</td>'; print '<td class="right">' . $langs->trans("MinPrice") . ' ' . $langs->trans("HT") . '</td>';
print '<td align="right">' . $langs->trans("MinPrice") . ' ' . $langs->trans("TTC") . '</td>'; print '<td class="right">' . $langs->trans("MinPrice") . ' ' . $langs->trans("TTC") . '</td>';
print '<td align="right">' . $langs->trans("ChangedBy") . '</td>'; print '<td class="right">' . $langs->trans("ChangedBy") . '</td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '</tr>'; print '</tr>';
@ -1917,8 +1917,8 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
print "<td>" . $staticsoc->getNomUrl(1) . "</td>"; print "<td>" . $staticsoc->getNomUrl(1) . "</td>";
print "<td>" . dol_print_date($line->datec, "dayhour") . "</td>"; print "<td>" . dol_print_date($line->datec, "dayhour") . "</td>";
print '<td align="center">' . $langs->trans($line->price_base_type) . "</td>"; print '<td class="center">' . $langs->trans($line->price_base_type) . "</td>";
print '<td align="right">'; print '<td class="right">';
$positiverates=''; $positiverates='';
if (price2num($line->tva_tx)) $positiverates.=($positiverates?'/':'').price2num($line->tva_tx); if (price2num($line->tva_tx)) $positiverates.=($positiverates?'/':'').price2num($line->tva_tx);
@ -1930,25 +1930,25 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
//. vatrate($tva_tx, true, $line->recuperableonly) . //. vatrate($tva_tx, true, $line->recuperableonly) .
print "</td>"; print "</td>";
print '<td align="right">' . price($line->price) . "</td>"; print '<td class="right">' . price($line->price) . "</td>";
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1")
{ {
//print '<td align="right">' . price($line->price_ttc) . "</td>"; //print '<td class="right">' . price($line->price_ttc) . "</td>";
print '<td align="right">' . price($resultarray[2]) . '</td>'; print '<td class="right">' . price($resultarray[2]) . '</td>';
} }
else else
{ {
print '<td align="right">' . price($line->price_ttc) . "</td>"; print '<td class="right">' . price($line->price_ttc) . "</td>";
} }
print '<td align="right">' . price($line->price_min) . '</td>'; print '<td class="right">' . price($line->price_min) . '</td>';
print '<td align="right">' . price($line->price_min_ttc) . '</td>'; print '<td class="right">' . price($line->price_min_ttc) . '</td>';
// User // User
$userstatic = new User($db); $userstatic = new User($db);
$userstatic->fetch($line->fk_user); $userstatic->fetch($line->fk_user);
print '<td align="right">'; print '<td class="right">';
print $userstatic->getLoginUrl(1); print $userstatic->getLoginUrl(1);
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
@ -1992,7 +1992,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
print '<td class="liste_titre"><input type="text" class="flat" name="search_soc" value="' . $search_soc . '" size="20"></td>'; print '<td class="liste_titre"><input type="text" class="flat" name="search_soc" value="' . $search_soc . '" size="20"></td>';
print '<td class="liste_titre" colspan="'.$colspan.'">&nbsp;</td>'; print '<td class="liste_titre" colspan="'.$colspan.'">&nbsp;</td>';
// Print the search button // Print the search button
print '<td class="liste_titre" align="right">'; print '<td class="liste_titre right">';
$searchpicto=$form->showFilterAndCheckAddButtons(0); $searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto; print $searchpicto;
print '</td>'; print '</td>';
@ -2002,22 +2002,22 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>' . $langs->trans("ThirdParty") . '</td>'; print '<td>' . $langs->trans("ThirdParty") . '</td>';
print '<td>' . $langs->trans("AppliedPricesFrom") . '</td>'; print '<td>' . $langs->trans("AppliedPricesFrom") . '</td>';
print '<td align="center">' . $langs->trans("PriceBase") . '</td>'; print '<td class="center">' . $langs->trans("PriceBase") . '</td>';
print '<td align="right">' . $langs->trans("DefaultTaxRate") . '</td>'; print '<td class="right">' . $langs->trans("DefaultTaxRate") . '</td>';
print '<td align="right">' . $langs->trans("HT") . '</td>'; print '<td class="right">' . $langs->trans("HT") . '</td>';
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1")
{ {
//print '<td align="right">' . $langs->trans("INCVATONLY") . '</td>'; //print '<td class="right">' . $langs->trans("INCVATONLY") . '</td>';
print '<td align="right">' . $langs->trans("INCT") . '</td>'; print '<td class="right">' . $langs->trans("INCT") . '</td>';
} }
else else
{ {
print '<td align="right">' . $langs->trans("TTC") . '</td>'; print '<td class="right">' . $langs->trans("TTC") . '</td>';
} }
print '<td align="right">' . $langs->trans("MinPrice") . ' ' . $langs->trans("HT") . '</td>'; print '<td class="right">' . $langs->trans("MinPrice") . ' ' . $langs->trans("HT") . '</td>';
print '<td align="right">' . $langs->trans("MinPrice") . ' ' . $langs->trans("TTC") . '</td>'; print '<td class="right">' . $langs->trans("MinPrice") . ' ' . $langs->trans("TTC") . '</td>';
print '<td align="right">' . $langs->trans("ChangedBy") . '</td>'; print '<td class="right">' . $langs->trans("ChangedBy") . '</td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '</tr>'; print '</tr>';
@ -2046,8 +2046,8 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
print "<td>" . $langs->trans("Default") . "</td>"; print "<td>" . $langs->trans("Default") . "</td>";
print "<td>" . "</td>"; print "<td>" . "</td>";
print '<td align="center">' . $langs->trans($object->price_base_type) . "</td>"; print '<td class="center">' . $langs->trans($object->price_base_type) . "</td>";
print '<td align="right">'; print '<td class="right">';
$positiverates=''; $positiverates='';
if (price2num($object->tva_tx)) $positiverates.=($positiverates?'/':'').price2num($object->tva_tx); if (price2num($object->tva_tx)) $positiverates.=($positiverates?'/':'').price2num($object->tva_tx);
@ -2060,26 +2060,26 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
//print $object->default_vat_code?' ('.$object->default_vat_code.')':''; //print $object->default_vat_code?' ('.$object->default_vat_code.')':'';
print "</td>"; print "</td>";
print '<td align="right">' . price($object->price) . "</td>"; print '<td class="right">' . price($object->price) . "</td>";
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1")
{ {
//print '<td align="right">' . price($object->price_ttc) . "</td>"; //print '<td class="right">' . price($object->price_ttc) . "</td>";
print '<td align="right">' . price($resultarray[2]) . '</td>'; print '<td class="right">' . price($resultarray[2]) . '</td>';
} }
else else
{ {
print '<td align="right">' . price($object->price_ttc) . "</td>"; print '<td class="right">' . price($object->price_ttc) . "</td>";
} }
print '<td align="right">' . price($object->price_min) . '</td>'; print '<td class="right">' . price($object->price_min) . '</td>';
print '<td align="right">' . price($object->price_min_ttc) . '</td>'; print '<td class="right">' . price($object->price_min_ttc) . '</td>';
print '<td align="right">'; print '<td class="right">';
print '</td>'; print '</td>';
if ($user->rights->produit->supprimer || $user->rights->service->supprimer) if ($user->rights->produit->supprimer || $user->rights->service->supprimer)
{ {
print '<td align="right">'; print '<td class="right">';
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=showlog_default_price&amp;id=' . $object->id . '">'; print '<a href="' . $_SERVER["PHP_SELF"] . '?action=showlog_default_price&amp;id=' . $object->id . '">';
print img_info($langs->trans('PriceByCustomerLog')); print img_info($langs->trans('PriceByCustomerLog'));
print '</a>'; print '</a>';
@ -2128,8 +2128,8 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
print "<td>" . $staticsoc->getNomUrl(1) . "</td>"; print "<td>" . $staticsoc->getNomUrl(1) . "</td>";
print "<td>" . dol_print_date($line->datec, "dayhour") . "</td>"; print "<td>" . dol_print_date($line->datec, "dayhour") . "</td>";
print '<td align="center">' . $langs->trans($line->price_base_type) . "</td>"; print '<td class="center">' . $langs->trans($line->price_base_type) . "</td>";
print '<td align="right">'; print '<td class="right">';
$positiverates=''; $positiverates='';
if (price2num($line->tva_tx)) $positiverates.=($positiverates?'/':'').price2num($line->tva_tx); if (price2num($line->tva_tx)) $positiverates.=($positiverates?'/':'').price2num($line->tva_tx);
@ -2139,25 +2139,25 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
echo vatrate($positiverates.($line->default_vat_code?' ('.$line->default_vat_code.')':''), '%', ($line->tva_npr?$line->tva_npr:$line->recuperableonly)); echo vatrate($positiverates.($line->default_vat_code?' ('.$line->default_vat_code.')':''), '%', ($line->tva_npr?$line->tva_npr:$line->recuperableonly));
print "</td>"; print "</td>";
print '<td align="right">' . price($line->price) . "</td>"; print '<td class="right">' . price($line->price) . "</td>";
if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1")
{ {
//print '<td align="right">' . price($line->price_ttc) . "</td>"; //print '<td class="right">' . price($line->price_ttc) . "</td>";
print '<td align="right">' . price($resultarray[2]) . '</td>'; print '<td class="right">' . price($resultarray[2]) . '</td>';
} }
else else
{ {
print '<td align="right">' . price($line->price_ttc) . "</td>"; print '<td class="right">' . price($line->price_ttc) . "</td>";
} }
print '<td align="right">' . price($line->price_min) . '</td>'; print '<td class="right">' . price($line->price_min) . '</td>';
print '<td align="right">' . price($line->price_min_ttc) . '</td>'; print '<td class="right">' . price($line->price_min_ttc) . '</td>';
// User // User
$userstatic = new User($db); $userstatic = new User($db);
$userstatic->fetch($line->fk_user); $userstatic->fetch($line->fk_user);
print '<td align="right">'; print '<td class="right">';
print $userstatic->getLoginUrl(1); print $userstatic->getLoginUrl(1);
print '</td>'; print '</td>';
@ -2165,7 +2165,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
// Action // Action
if ($user->rights->produit->supprimer || $user->rights->service->supprimer) if ($user->rights->produit->supprimer || $user->rights->service->supprimer)
{ {
print '<td align="right">'; print '<td class="right">';
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=showlog_customer_price&amp;id=' . $object->id . '&amp;socid=' . $line->fk_soc . '">'; print '<a href="' . $_SERVER["PHP_SELF"] . '?action=showlog_customer_price&amp;id=' . $object->id . '&amp;socid=' . $line->fk_soc . '">';
print img_info($langs->trans('PriceByCustomerLog')); print img_info($langs->trans('PriceByCustomerLog'));
print '</a>'; print '</a>';

View File

@ -290,13 +290,13 @@ if ($resql)
} }
// Stock limit // Stock limit
print '<td class="liste_titre">&nbsp;</td>'; print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre" align="right">&nbsp;</td>'; print '<td class="liste_titre right">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>'; print '<td class="liste_titre">&nbsp;</td>';
if ($virtualdiffersfromphysical) print '<td class="liste_titre">&nbsp;</td>'; if ($virtualdiffersfromphysical) print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>'; print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre" colspan="'.$colspan_warehouse.'">&nbsp;</td>'; print '<td class="liste_titre" colspan="'.$colspan_warehouse.'">&nbsp;</td>';
print '<td class="liste_titre"></td>'; print '<td class="liste_titre"></td>';
print '<td class="liste_titre" align="right">'; print '<td class="liste_titre right">';
$searchpicto=$form->showFilterAndCheckAddButtons(0); $searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto; print $searchpicto;
print '</td>'; print '</td>';
@ -306,23 +306,23 @@ if ($resql)
print "<tr class=\"liste_titre\">"; print "<tr class=\"liste_titre\">";
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "p.ref", $param, "", "", $sortfield, $sortorder); 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); print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "p.label", $param, "", "", $sortfield, $sortorder);
if (! empty($conf->service->enabled) && $type == 1) print_liste_field_titre("Duration", $_SERVER["PHP_SELF"], "p.duration", $param, "", 'align="center"', $sortfield, $sortorder); if (! empty($conf->service->enabled) && $type == 1) print_liste_field_titre("Duration", $_SERVER["PHP_SELF"], "p.duration", $param, "", '', $sortfield, $sortorder, 'center ');
print_liste_field_titre("StockLimit", $_SERVER["PHP_SELF"], "p.seuil_stock_alerte", $param, "", 'align="right"', $sortfield, $sortorder); print_liste_field_titre("StockLimit", $_SERVER["PHP_SELF"], "p.seuil_stock_alerte", $param, "", '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("DesiredStock", $_SERVER["PHP_SELF"], "p.desiredstock", $param, "", 'align="right"', $sortfield, $sortorder); print_liste_field_titre("DesiredStock", $_SERVER["PHP_SELF"], "p.desiredstock", $param, "", '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("PhysicalStock", $_SERVER["PHP_SELF"], "stock_physique", $param, "", 'align="right"', $sortfield, $sortorder); print_liste_field_titre("PhysicalStock", $_SERVER["PHP_SELF"], "stock_physique", $param, "", '', $sortfield, $sortorder, 'right ');
// Details per warehouse // Details per warehouse
if (! empty($conf->global->STOCK_DETAIL_ON_WAREHOUSE)) // TODO This should be moved into the selection of fields on page product/list (page product/stock will be removed and replaced with product/list with its own context) if (! empty($conf->global->STOCK_DETAIL_ON_WAREHOUSE)) // TODO This should be moved into the selection of fields on page product/list (page product/stock will be removed and replaced with product/list with its own context)
{ {
if ($nb_warehouse>1) { if ($nb_warehouse>1) {
foreach($warehouses_list as &$wh) { foreach ($warehouses_list as &$wh) {
print_liste_field_titre($wh['label'], '', '', '', '', 'align="right"'); print_liste_field_titre($wh['label'], '', '', '', '', '', '', '', 'right ');
} }
} }
} }
if ($virtualdiffersfromphysical) print_liste_field_titre("VirtualStock", $_SERVER["PHP_SELF"], "", $param, "", 'align="right"', $sortfield, $sortorder); if ($virtualdiffersfromphysical) print_liste_field_titre("VirtualStock", $_SERVER["PHP_SELF"], "", $param, "", '', $sortfield, $sortorder, 'right ');
print_liste_field_titre(''); print_liste_field_titre('');
print_liste_field_titre("ProductStatusOnSell", $_SERVER["PHP_SELF"], "p.tosell", $param, "", 'align="right"', $sortfield, $sortorder); print_liste_field_titre("ProductStatusOnSell", $_SERVER["PHP_SELF"], "p.tosell", $param, "", '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("ProductStatusOnBuy", $_SERVER["PHP_SELF"], "p.tobuy", $param, "", 'align="right"', $sortfield, $sortorder); print_liste_field_titre("ProductStatusOnBuy", $_SERVER["PHP_SELF"], "p.tobuy", $param, "", '', $sortfield, $sortorder, 'right ');
print_liste_field_titre(''); print_liste_field_titre('');
print "</tr>\n"; print "</tr>\n";
@ -343,18 +343,18 @@ if ($resql)
if (! empty($conf->service->enabled) && $type == 1) if (! empty($conf->service->enabled) && $type == 1)
{ {
print '<td align="center">'; print '<td class="center">';
if (preg_match('/([0-9]+)y/i', $objp->duration, $regs)) print $regs[1].' '.$langs->trans("DurationYear"); if (preg_match('/([0-9]+)y/i', $objp->duration, $regs)) print $regs[1].' '.$langs->trans("DurationYear");
elseif (preg_match('/([0-9]+)m/i', $objp->duration, $regs)) print $regs[1].' '.$langs->trans("DurationMonth"); elseif (preg_match('/([0-9]+)m/i', $objp->duration, $regs)) print $regs[1].' '.$langs->trans("DurationMonth");
elseif (preg_match('/([0-9]+)d/i', $objp->duration, $regs)) print $regs[1].' '.$langs->trans("DurationDay"); elseif (preg_match('/([0-9]+)d/i', $objp->duration, $regs)) print $regs[1].' '.$langs->trans("DurationDay");
else print $objp->duration; else print $objp->duration;
print '</td>'; print '</td>';
} }
//print '<td align="right">'.$objp->stock_theorique.'</td>'; //print '<td class="right">'.$objp->stock_theorique.'</td>';
print '<td align="right">'.$objp->seuil_stock_alerte.'</td>'; print '<td class="right">'.$objp->seuil_stock_alerte.'</td>';
print '<td align="right">'.$objp->desiredstock.'</td>'; print '<td class="right">'.$objp->desiredstock.'</td>';
// Real stock // Real stock
print '<td align="right">'; print '<td class="right">';
if ($objp->seuil_stock_alerte != '' && ($objp->stock_physique < $objp->seuil_stock_alerte)) print img_warning($langs->trans("StockTooLow")).' '; if ($objp->seuil_stock_alerte != '' && ($objp->stock_physique < $objp->seuil_stock_alerte)) print img_warning($langs->trans("StockTooLow")).' ';
print $objp->stock_physique|0; print $objp->stock_physique|0;
print '</td>'; print '</td>';
@ -365,7 +365,7 @@ if ($resql)
if($nb_warehouse>1) { if($nb_warehouse>1) {
foreach($warehouses_list as &$wh) { foreach($warehouses_list as &$wh) {
print '<td align="right">'; print '<td class="right">';
print empty($product->stock_warehouse[$wh['id']]->real) ? '0' : $product->stock_warehouse[$wh['id']]->real; print empty($product->stock_warehouse[$wh['id']]->real) ? '0' : $product->stock_warehouse[$wh['id']]->real;
print '</td>'; print '</td>';
} }
@ -375,14 +375,14 @@ if ($resql)
// Virtual stock // Virtual stock
if ($virtualdiffersfromphysical) if ($virtualdiffersfromphysical)
{ {
print '<td align="right">'; print '<td class="right">';
if ($objp->seuil_stock_alerte != '' && ($product->stock_theorique < $objp->seuil_stock_alerte)) print img_warning($langs->trans("StockTooLow")).' '; if ($objp->seuil_stock_alerte != '' && ($product->stock_theorique < $objp->seuil_stock_alerte)) print img_warning($langs->trans("StockTooLow")).' ';
print $product->stock_theorique; print $product->stock_theorique;
print '</td>'; print '</td>';
} }
print '<td align="right"><a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?idproduct='.$product->id.'">'.$langs->trans("Movements").'</a></td>'; print '<td class="right"><a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?idproduct='.$product->id.'">'.$langs->trans("Movements").'</a></td>';
print '<td align="right" class="nowrap">'.$product->LibStatut($objp->statut, 5, 0).'</td>'; print '<td class="right nowrap">'.$product->LibStatut($objp->statut, 5, 0).'</td>';
print '<td align="right" class="nowrap">'.$product->LibStatut($objp->tobuy, 5, 1).'</td>'; print '<td class="right nowrap">'.$product->LibStatut($objp->tobuy, 5, 1).'</td>';
print '<td></td>'; print '<td></td>';
print "</tr>\n"; print "</tr>\n";
$i++; $i++;

View File

@ -285,14 +285,14 @@ if ($resql)
print '</td>'; print '</td>';
} }
print '<td class="liste_titre"><input class="flat" type="text" name="search_warehouse" size="6" value="'.$search_warehouse.'"></td>'; print '<td class="liste_titre"><input class="flat" type="text" name="search_warehouse" size="6" value="'.$search_warehouse.'"></td>';
print '<td class="liste_titre" align="center"><input class="flat" type="text" name="search_batch" size="6" value="'.$search_batch.'"></td>'; print '<td class="liste_titre center"><input class="flat" type="text" name="search_batch" size="6" value="'.$search_batch.'"></td>';
print '<td class="liste_titre" align="right">&nbsp;</td>'; print '<td class="liste_titre right">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>'; print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>'; print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>'; print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>'; print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>'; print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre" align="right">'; print '<td class="liste_titre right">';
$searchpicto=$form->showFilterAndCheckAddButtons(0); $searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto; print $searchpicto;
print '</td>'; print '</td>';
@ -302,18 +302,18 @@ if ($resql)
print "<tr class=\"liste_titre\">"; print "<tr class=\"liste_titre\">";
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "p.ref", $param, "", "", $sortfield, $sortorder); 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); print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "p.label", $param, "", "", $sortfield, $sortorder);
if (! empty($conf->service->enabled) && $type == 1) print_liste_field_titre("Duration", $_SERVER["PHP_SELF"], "p.duration", $param, "", 'align="center"', $sortfield, $sortorder); if (! empty($conf->service->enabled) && $type == 1) print_liste_field_titre("Duration", $_SERVER["PHP_SELF"], "p.duration", $param, "", '', $sortfield, $sortorder, 'center ');
print_liste_field_titre("Warehouse", $_SERVER["PHP_SELF"], "e.ref", $param, "", '', $sortfield, $sortorder); print_liste_field_titre("Warehouse", $_SERVER["PHP_SELF"], "e.ref", $param, "", '', $sortfield, $sortorder);
//print_liste_field_titre("DesiredStock", $_SERVER["PHP_SELF"], "p.desiredstock",$param,"",'align="right"',$sortfield,$sortorder); //print_liste_field_titre("DesiredStock", $_SERVER["PHP_SELF"], "p.desiredstock",$param,"",'',$sortfield,$sortorder, 'right );
print_liste_field_titre("Batch", $_SERVER["PHP_SELF"], "pb.batch", $param, "", 'align="center"', $sortfield, $sortorder); print_liste_field_titre("Batch", $_SERVER["PHP_SELF"], "pb.batch", $param, "", '', $sortfield, $sortorder, 'center ');
print_liste_field_titre("EatByDate", $_SERVER["PHP_SELF"], "pb.eatby", $param, "", 'align="center"', $sortfield, $sortorder); print_liste_field_titre("EatByDate", $_SERVER["PHP_SELF"], "pb.eatby", $param, "", '', $sortfield, $sortorder, 'center ');
print_liste_field_titre("SellByDate", $_SERVER["PHP_SELF"], "pb.sellby", $param, "", 'align="center"', $sortfield, $sortorder); print_liste_field_titre("SellByDate", $_SERVER["PHP_SELF"], "pb.sellby", $param, "", '', $sortfield, $sortorder, 'center ');
print_liste_field_titre("PhysicalStock", $_SERVER["PHP_SELF"], "stock_physique", $param, "", 'align="right"', $sortfield, $sortorder); print_liste_field_titre("PhysicalStock", $_SERVER["PHP_SELF"], "stock_physique", $param, "", '', $sortfield, $sortorder, 'right ');
// TODO Add info of running suppliers/customers orders // TODO Add info of running suppliers/customers orders
//print_liste_field_titre("TheoreticalStock",$_SERVER["PHP_SELF"], "stock_theorique",$param,"",'align="right"',$sortfield,$sortorder); //print_liste_field_titre("TheoreticalStock",$_SERVER["PHP_SELF"], "stock_theorique",$param,"",'',$sortfield,$sortorder, 'right ');
print_liste_field_titre(''); print_liste_field_titre('');
print_liste_field_titre("ProductStatusOnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("ProductStatusOnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("ProductStatusOnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("ProductStatusOnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre(''); print_liste_field_titre('');
print "</tr>\n"; print "</tr>\n";
@ -375,16 +375,16 @@ if ($resql)
if (! empty($conf->service->enabled) && $type == 1) if (! empty($conf->service->enabled) && $type == 1)
{ {
print '<td align="center">'; print '<td class="center">';
if (preg_match('/([0-9]+)y/i', $objp->duration, $regs)) print $regs[1].' '.$langs->trans("DurationYear"); if (preg_match('/([0-9]+)y/i', $objp->duration, $regs)) print $regs[1].' '.$langs->trans("DurationYear");
elseif (preg_match('/([0-9]+)m/i', $objp->duration, $regs)) print $regs[1].' '.$langs->trans("DurationMonth"); elseif (preg_match('/([0-9]+)m/i', $objp->duration, $regs)) print $regs[1].' '.$langs->trans("DurationMonth");
elseif (preg_match('/([0-9]+)d/i', $objp->duration, $regs)) print $regs[1].' '.$langs->trans("DurationDay"); elseif (preg_match('/([0-9]+)d/i', $objp->duration, $regs)) print $regs[1].' '.$langs->trans("DurationDay");
else print $objp->duration; else print $objp->duration;
print '</td>'; print '</td>';
} }
//print '<td align="right">'.$objp->stock_theorique.'</td>'; //print '<td class="right">'.$objp->stock_theorique.'</td>';
//print '<td align="right">'.$objp->seuil_stock_alerte.'</td>'; //print '<td class="right">'.$objp->seuil_stock_alerte.'</td>';
//print '<td align="right">'.$objp->desiredstock.'</td>'; //print '<td class="right">'.$objp->desiredstock.'</td>';
// Warehouse // Warehouse
print '<td>'; print '<td>';
@ -395,22 +395,22 @@ if ($resql)
print '</td>'; print '</td>';
// Lot // Lot
print '<td align="center">'; print '<td class="center">';
if ($product_lot_static->batch) if ($product_lot_static->batch)
{ {
print $product_lot_static->getNomUrl(1); print $product_lot_static->getNomUrl(1);
} }
print '</td>'; print '</td>';
print '<td align="center">'.dol_print_date($db->jdate($objp->eatby), 'day').'</td>'; print '<td class="center">'.dol_print_date($db->jdate($objp->eatby), 'day').'</td>';
print '<td align="center">'.dol_print_date($db->jdate($objp->sellby), 'day').'</td>'; print '<td class="center">'.dol_print_date($db->jdate($objp->sellby), 'day').'</td>';
print '<td align="right">'; print '<td class="right">';
//if ($objp->seuil_stock_alerte && ($objp->stock_physique < $objp->seuil_stock_alerte)) print img_warning($langs->trans("StockTooLow")).' '; //if ($objp->seuil_stock_alerte && ($objp->stock_physique < $objp->seuil_stock_alerte)) print img_warning($langs->trans("StockTooLow")).' ';
print $objp->stock_physique; print $objp->stock_physique;
print '</td>'; print '</td>';
print '<td align="right"><a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?idproduct='.$product_static->id.'&search_warehouse='.$objp->fk_entrepot.'&search_batch='.($objp->batch != 'Undefined' ? $objp->batch : 'Undefined').'">'.$langs->trans("Movements").'</a></td>'; print '<td class="right"><a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?idproduct='.$product_static->id.'&search_warehouse='.$objp->fk_entrepot.'&search_batch='.($objp->batch != 'Undefined' ? $objp->batch : 'Undefined').'">'.$langs->trans("Movements").'</a></td>';
print '<td align="right" class="nowrap">'.$product_static->LibStatut($objp->statut, 5, 0).'</td>'; print '<td class="right nowrap">'.$product_static->LibStatut($objp->statut, 5, 0).'</td>';
print '<td align="right" class="nowrap">'.$product_static->LibStatut($objp->tobuy, 5, 1).'</td>'; print '<td class="right nowrap">'.$product_static->LibStatut($objp->tobuy, 5, 1).'</td>';
print '<td></td>'; print '<td></td>';
print "</tr>\n"; print "</tr>\n";
$i++; $i++;

View File

@ -443,13 +443,21 @@ else
print "<tr class=\"liste_titre\">"; print "<tr class=\"liste_titre\">";
print_liste_field_titre("Product", "", "p.ref", "&amp;id=".$id, "", "", $sortfield, $sortorder); print_liste_field_titre("Product", "", "p.ref", "&amp;id=".$id, "", "", $sortfield, $sortorder);
print_liste_field_titre("Label", "", "p.label", "&amp;id=".$id, "", "", $sortfield, $sortorder); print_liste_field_titre("Label", "", "p.label", "&amp;id=".$id, "", "", $sortfield, $sortorder);
print_liste_field_titre("Units", "", "ps.reel", "&amp;id=".$id, "", 'align="right"', $sortfield, $sortorder); print_liste_field_titre("Units", "", "ps.reel", "&amp;id=".$id, "", '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("AverageUnitPricePMPShort", "", "p.pmp", "&amp;id=".$id, "", 'align="right"', $sortfield, $sortorder); print_liste_field_titre("AverageUnitPricePMPShort", "", "p.pmp", "&amp;id=".$id, "", '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("EstimatedStockValueShort", "", "", "&amp;id=".$id, "", 'align="right"', $sortfield, $sortorder); print_liste_field_titre("EstimatedStockValueShort", "", "", "&amp;id=".$id, "", '', $sortfield, $sortorder, 'right ');
if (empty($conf->global->PRODUIT_MULTIPRICES)) print_liste_field_titre("SellPriceMin", "", "p.price", "&amp;id=".$id, "", 'align="right"', $sortfield, $sortorder); if (empty($conf->global->PRODUIT_MULTIPRICES)) {
if (empty($conf->global->PRODUIT_MULTIPRICES)) print_liste_field_titre("EstimatedStockValueSellShort", "", "", "&amp;id=".$id, "", 'align="right"', $sortfield, $sortorder); print_liste_field_titre("SellPriceMin", "", "p.price", "&amp;id=".$id, "", '', $sortfield, $sortorder, 'right ');
if ($user->rights->stock->mouvement->creer) print_liste_field_titre(''); }
if ($user->rights->stock->creer) print_liste_field_titre(''); if (empty($conf->global->PRODUIT_MULTIPRICES)) {
print_liste_field_titre("EstimatedStockValueSellShort", "", "", "&amp;id=".$id, "", '', $sortfield, $sortorder, 'right ');
}
if ($user->rights->stock->mouvement->creer) {
print_liste_field_titre('');
}
if ($user->rights->stock->creer) {
print_liste_field_titre('');
}
print "</tr>\n"; print "</tr>\n";
$totalunit=0; $totalunit=0;
@ -506,28 +514,28 @@ else
// Label // Label
print '<td>'.$objp->produit.'</td>'; print '<td>'.$objp->produit.'</td>';
print '<td align="right">'; print '<td class="right">';
$valtoshow=price2num($objp->value, 'MS'); $valtoshow=price2num($objp->value, 'MS');
print empty($valtoshow)?'0':$valtoshow; print empty($valtoshow)?'0':$valtoshow;
print '</td>'; print '</td>';
$totalunit+=$objp->value; $totalunit+=$objp->value;
// Price buy PMP // Price buy PMP
print '<td align="right">'.price(price2num($objp->ppmp, 'MU')).'</td>'; print '<td class="right">'.price(price2num($objp->ppmp, 'MU')).'</td>';
// Total PMP // Total PMP
print '<td align="right">'.price(price2num($objp->ppmp*$objp->value, 'MT')).'</td>'; print '<td class="right">'.price(price2num($objp->ppmp*$objp->value, 'MT')).'</td>';
$totalvalue+=price2num($objp->ppmp*$objp->value, 'MT'); $totalvalue+=price2num($objp->ppmp*$objp->value, 'MT');
// Price sell min // Price sell min
if (empty($conf->global->PRODUIT_MULTIPRICES)) if (empty($conf->global->PRODUIT_MULTIPRICES))
{ {
$pricemin=$objp->price; $pricemin=$objp->price;
print '<td align="right">'; print '<td class="right">';
print price(price2num($pricemin, 'MU'), 1); print price(price2num($pricemin, 'MU'), 1);
print '</td>'; print '</td>';
// Total sell min // Total sell min
print '<td align="right">'; print '<td class="right">';
print price(price2num($pricemin*$objp->value, 'MT'), 1); print price(price2num($pricemin*$objp->value, 'MT'), 1);
print '</td>'; print '</td>';
} }
@ -535,14 +543,14 @@ else
if ($user->rights->stock->mouvement->creer) if ($user->rights->stock->mouvement->creer)
{ {
print '<td align="center"><a href="'.DOL_URL_ROOT.'/product/stock/product.php?dwid='.$object->id.'&id='.$objp->rowid.'&action=transfert&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$id).'">'; print '<td class="center"><a href="'.DOL_URL_ROOT.'/product/stock/product.php?dwid='.$object->id.'&id='.$objp->rowid.'&action=transfert&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$id).'">';
print img_picto($langs->trans("StockMovement"), 'uparrow.png', 'class="hideonsmartphone"').' '.$langs->trans("StockMovement"); print img_picto($langs->trans("StockMovement"), 'uparrow.png', 'class="hideonsmartphone"').' '.$langs->trans("StockMovement");
print "</a></td>"; print "</a></td>";
} }
if ($user->rights->stock->creer) if ($user->rights->stock->creer)
{ {
print '<td align="center"><a href="'.DOL_URL_ROOT.'/product/stock/product.php?dwid='.$object->id.'&id='.$objp->rowid.'&action=correction&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$id).'">'; print '<td class="center"><a href="'.DOL_URL_ROOT.'/product/stock/product.php?dwid='.$object->id.'&id='.$objp->rowid.'&action=correction&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$id).'">';
print $langs->trans("StockCorrection"); print $langs->trans("StockCorrection");
print "</a></td>"; print "</a></td>";
} }
@ -553,16 +561,16 @@ else
$db->free($resql); $db->free($resql);
print '<tr class="liste_total"><td class="liste_total" colspan="2">'.$langs->trans("Total").'</td>'; print '<tr class="liste_total"><td class="liste_total" colspan="2">'.$langs->trans("Total").'</td>';
print '<td class="liste_total" align="right">'; print '<td class="liste_total right">';
$valtoshow=price2num($totalunit, 'MS'); $valtoshow=price2num($totalunit, 'MS');
print empty($valtoshow)?'0':$valtoshow; print empty($valtoshow)?'0':$valtoshow;
print '</td>'; print '</td>';
print '<td class="liste_total">&nbsp;</td>'; print '<td class="liste_total">&nbsp;</td>';
print '<td class="liste_total" align="right">'.price(price2num($totalvalue, 'MT')).'</td>'; print '<td class="liste_total right">'.price(price2num($totalvalue, 'MT')).'</td>';
if (empty($conf->global->PRODUIT_MULTIPRICES)) if (empty($conf->global->PRODUIT_MULTIPRICES))
{ {
print '<td class="liste_total">&nbsp;</td>'; print '<td class="liste_total">&nbsp;</td>';
print '<td class="liste_total" align="right">'.price(price2num($totalvaluesell, 'MT')).'</td>'; print '<td class="liste_total right">'.price(price2num($totalvaluesell, 'MT')).'</td>';
} }
print '<td class="liste_total">&nbsp;</td>'; print '<td class="liste_total">&nbsp;</td>';
print '<td class="liste_total">&nbsp;</td>'; print '<td class="liste_total">&nbsp;</td>';

View File

@ -92,7 +92,7 @@ if ($result)
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print "<td><a href=\"card.php?id=$objp->rowid\">".img_object($langs->trans("ShowStock"), "stock")." ".$objp->label."</a></td>\n"; print "<td><a href=\"card.php?id=$objp->rowid\">".img_object($langs->trans("ShowStock"), "stock")." ".$objp->label."</a></td>\n";
print '<td align="right">'.$entrepot->LibStatut($objp->statut, 5).'</td>'; print '<td class="right">'.$entrepot->LibStatut($objp->statut, 5).'</td>';
print "</tr>\n"; print "</tr>\n";
$i++; $i++;
} }
@ -142,7 +142,7 @@ if ($resql)
print '<th>'.$langs->trans("EatByDate").'</th>'; print '<th>'.$langs->trans("EatByDate").'</th>';
} }
print '<th>'.$langs->trans("Warehouse").'</th>'; print '<th>'.$langs->trans("Warehouse").'</th>';
print '<th align="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/product/stock/movement_list.php">'.$langs->trans("FullList").'</a></th>'; print '<th class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/product/stock/movement_list.php">'.$langs->trans("FullList").'</a></th>';
print "</tr>\n"; print "</tr>\n";
$i=0; $i=0;
@ -170,7 +170,7 @@ if ($resql)
print '<td class="tdoverflowmax200"><a href="card.php?id='.$objp->entrepot_id.'">'; print '<td class="tdoverflowmax200"><a href="card.php?id='.$objp->entrepot_id.'">';
print img_object($langs->trans("ShowWarehouse"), "stock").' '.$objp->stock; print img_object($langs->trans("ShowWarehouse"), "stock").' '.$objp->stock;
print "</a></td>\n"; print "</a></td>\n";
print '<td align="right">'; print '<td class="right">';
if ($objp->qty > 0) print '+'; if ($objp->qty > 0) print '+';
print $objp->qty.'</td>'; print $objp->qty.'</td>';
print "</tr>\n"; print "</tr>\n";

View File

@ -162,22 +162,22 @@ if ($result)
// Lignes des champs de filtre // Lignes des champs de filtre
print '<tr class="liste_titre_filter">'; print '<tr class="liste_titre_filter">';
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '<input class="flat" type="text" name="search_ref" size="6" value="'.dol_escape_htmltag($search_ref).'">'; print '<input class="flat" type="text" name="search_ref" size="6" value="'.dol_escape_htmltag($search_ref).'">';
print '</td>'; print '</td>';
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '<input class="flat" type="text" name="search_label" size="10" value="'.dol_escape_htmltag($search_label).'">'; print '<input class="flat" type="text" name="search_label" size="10" value="'.dol_escape_htmltag($search_label).'">';
print '</td>'; print '</td>';
print '<td class="liste_titre" colspan="3">'; print '<td class="liste_titre" colspan="3">';
print '</td>'; print '</td>';
print '<td class="liste_titre" align="right">'; print '<td class="liste_titre right">';
print $form->selectarray('search_status', $warehouse->statuts, $search_status, 1, 0, 0, '', 1); print $form->selectarray('search_status', $warehouse->statuts, $search_status, 1, 0, 0, '', 1);
print '</td>'; print '</td>';
print '<td class="liste_titre" align="right">'; print '<td class="liste_titre right">';
$searchpicto=$form->showFilterAndCheckAddButtons(0); $searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto; print $searchpicto;
print '</td>'; print '</td>';
@ -187,10 +187,10 @@ if ($result)
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "e.ref", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "e.ref", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("LocationSummary", $_SERVER["PHP_SELF"], "e.lieu", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("LocationSummary", $_SERVER["PHP_SELF"], "e.lieu", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("PhysicalStock", $_SERVER["PHP_SELF"], "stockqty", '', $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("PhysicalStock", $_SERVER["PHP_SELF"], "stockqty", '', $param, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("EstimatedStockValue", $_SERVER["PHP_SELF"], "estimatedvalue", '', $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("EstimatedStockValue", $_SERVER["PHP_SELF"], "estimatedvalue", '', $param, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("EstimatedStockValueSell", $_SERVER["PHP_SELF"], "", '', $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("EstimatedStockValueSell", $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "e.statut", '', $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "e.statut", '', $param, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'maxwidthsearch '); print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'maxwidthsearch ');
print "</tr>\n"; print "</tr>\n";
@ -213,14 +213,14 @@ if ($result)
// Location // Location
print '<td>'.$objp->lieu.'</td>'; print '<td>'.$objp->lieu.'</td>';
// Stock qty // Stock qty
print '<td align="right">'.price2num($objp->stockqty, 5).'</td>'; print '<td class="right">'.price2num($objp->stockqty, 5).'</td>';
// PMP value // PMP value
print '<td align="right">'; print '<td class="right">';
if (price2num($objp->estimatedvalue, 'MT')) print price(price2num($objp->estimatedvalue, 'MT'), 1); if (price2num($objp->estimatedvalue, 'MT')) print price(price2num($objp->estimatedvalue, 'MT'), 1);
else print ''; else print '';
print '</td>'; print '</td>';
// Selling value // Selling value
print '<td align="right">'; print '<td class="right">';
if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($objp->sellvalue, 'MT'), 1); if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($objp->sellvalue, 'MT'), 1);
else else
{ {
@ -229,7 +229,7 @@ if ($result)
} }
print '</td>'; print '</td>';
// Status // Status
print '<td align="right">'.$warehouse->LibStatut($objp->statut, 5).'</td>'; print '<td class="right">'.$warehouse->LibStatut($objp->statut, 5).'</td>';
print '<td></td>'; print '<td></td>';
@ -242,10 +242,10 @@ if ($result)
if ($totalnboflines-$offset <= $limit) if ($totalnboflines-$offset <= $limit)
{ {
print '<tr class="liste_total">'; print '<tr class="liste_total">';
print '<td colspan="2" align="right">'.$langs->trans("Total").'</td>'; print '<td colspan="2" class="right">'.$langs->trans("Total").'</td>';
print '<td align="right">'.price2num($totalStock, 5).'</td>'; print '<td class="right">'.price2num($totalStock, 5).'</td>';
print '<td align="right">'.price(price2num($total, 'MT'), 1, $langs, 0, 0, -1, $conf->currency).'</td>'; print '<td class="right">'.price(price2num($total, 'MT'), 1, $langs, 0, 0, -1, $conf->currency).'</td>';
print '<td align="right">'; print '<td class="right">';
if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($totalsell, 'MT'), 1, $langs, 0, 0, -1, $conf->currency); if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($totalsell, 'MT'), 1, $langs, 0, 0, -1, $conf->currency);
else else
{ {

View File

@ -347,14 +347,13 @@ print '<table class="liste" width="100%">';
$param=''; $param='';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print getTitleFieldOfList($langs->trans('ProductRef'), 0, $_SERVER["PHP_SELF"], '', $param, '', 'class="tagtd maxwidthonsmartphone"', $sortfield, $sortorder); print getTitleFieldOfList($langs->trans('ProductRef'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone ');
if ($conf->productbatch->enabled) if ($conf->productbatch->enabled) {
{ print getTitleFieldOfList($langs->trans('Batch'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone ');
print getTitleFieldOfList($langs->trans('Batch'), 0, $_SERVER["PHP_SELF"], '', $param, '', 'class="tagtd maxwidthonsmartphone"', $sortfield, $sortorder);
} }
print getTitleFieldOfList($langs->trans('WarehouseSource'), 0, $_SERVER["PHP_SELF"], '', $param, '', 'class="tagtd maxwidthonsmartphone"', $sortfield, $sortorder); print getTitleFieldOfList($langs->trans('WarehouseSource'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone ');
print getTitleFieldOfList($langs->trans('WarehouseTarget'), 0, $_SERVER["PHP_SELF"], '', $param, '', 'class="tagtd maxwidthonsmartphone"', $sortfield, $sortorder); print getTitleFieldOfList($langs->trans('WarehouseTarget'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone ');
print getTitleFieldOfList($langs->trans('Qty'), 0, $_SERVER["PHP_SELF"], '', $param, '', 'align="center" class="tagtd maxwidthonsmartphone"', $sortfield, $sortorder); print getTitleFieldOfList($langs->trans('Qty'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'center tagtd maxwidthonsmartphone ');
print getTitleFieldOfList('', 0); print getTitleFieldOfList('', 0);
print '</tr>'; print '</tr>';
@ -364,8 +363,7 @@ print '<tr class="oddeven">';
print '<td class="titlefield">'; print '<td class="titlefield">';
$filtertype=0; $filtertype=0;
if (! empty($conf->global->STOCK_SUPPORTS_SERVICES)) $filtertype=''; if (! empty($conf->global->STOCK_SUPPORTS_SERVICES)) $filtertype='';
if ($conf->global->PRODUIT_LIMIT_SIZE <= 0) if ($conf->global->PRODUIT_LIMIT_SIZE <= 0) {
{
$limit=''; $limit='';
} }
else else
@ -391,9 +389,9 @@ print '<td>';
print $formproduct->selectWarehouses($id_tw, 'id_tw', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200'); print $formproduct->selectWarehouses($id_tw, 'id_tw', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200');
print '</td>'; print '</td>';
// Qty // Qty
print '<td align="center"><input type="text" class="flat maxwidth50" name="qty" value="'.$qty.'"></td>'; print '<td class="center"><input type="text" class="flat maxwidth50" name="qty" value="'.$qty.'"></td>';
// Button to add line // Button to add line
print '<td align="right"><input type="submit" class="button" name="addline" value="'.dol_escape_htmltag($titletoadd).'"></td>'; print '<td class="right"><input type="submit" class="button" name="addline" value="'.dol_escape_htmltag($titletoadd).'"></td>';
print '</tr>'; print '</tr>';
@ -420,8 +418,8 @@ foreach($listofdata as $key => $val)
print '<td>'; print '<td>';
print $warehousestatict->getNomUrl(1); print $warehousestatict->getNomUrl(1);
print '</td>'; print '</td>';
print '<td align="center">'.$val['qty'].'</td>'; print '<td class="center">'.$val['qty'].'</td>';
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=delline&idline='.$val['id'].'">'.img_delete($langs->trans("Remove")).'</a></td>'; print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=delline&idline='.$val['id'].'">'.img_delete($langs->trans("Remove")).'</a></td>';
print '</tr>'; print '</tr>';
} }

View File

@ -1,9 +1,10 @@
<?php <?php
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -36,8 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/stock.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/stock.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
if (! empty($conf->projet->enabled)) if (! empty($conf->projet->enabled)) {
{
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
} }
@ -771,7 +771,7 @@ if ($resql)
if (! empty($arrayfields['m.rowid']['checked'])) if (! empty($arrayfields['m.rowid']['checked']))
{ {
// Ref // Ref
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '<input class="flat maxwidth25" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">'; print '<input class="flat maxwidth25" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
print '</td>'; print '</td>';
} }
@ -789,36 +789,36 @@ if ($resql)
if (! empty($arrayfields['p.ref']['checked'])) if (! empty($arrayfields['p.ref']['checked']))
{ {
// Product Ref // Product Ref
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '<input class="flat maxwidth75" type="text" name="search_product_ref" value="'.dol_escape_htmltag($idproduct?$product->ref:$search_product_ref).'">'; print '<input class="flat maxwidth75" type="text" name="search_product_ref" value="'.dol_escape_htmltag($idproduct?$product->ref:$search_product_ref).'">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['p.label']['checked'])) if (! empty($arrayfields['p.label']['checked']))
{ {
// Product label // Product label
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '<input class="flat maxwidth100" type="text" name="search_product" value="'.dol_escape_htmltag($idproduct?$product->label:$search_product).'">'; print '<input class="flat maxwidth100" type="text" name="search_product" value="'.dol_escape_htmltag($idproduct?$product->label:$search_product).'">';
print '</td>'; print '</td>';
} }
// Batch // Batch
if (! empty($arrayfields['m.batch']['checked'])) if (! empty($arrayfields['m.batch']['checked']))
{ {
print '<td class="liste_titre" align="center"><input class="flat maxwidth75" type="text" name="search_batch" value="'.dol_escape_htmltag($search_batch).'"></td>'; print '<td class="liste_titre center"><input class="flat maxwidth75" type="text" name="search_batch" value="'.dol_escape_htmltag($search_batch).'"></td>';
} }
if (! empty($arrayfields['pl.eatby']['checked'])) if (! empty($arrayfields['pl.eatby']['checked']))
{ {
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['pl.sellby']['checked'])) if (! empty($arrayfields['pl.sellby']['checked']))
{ {
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '</td>'; print '</td>';
} }
// Warehouse // Warehouse
if (! empty($arrayfields['e.ref']['checked'])) if (! empty($arrayfields['e.ref']['checked']))
{ {
print '<td class="liste_titre maxwidthonsmartphone" align="left">'; print '<td class="liste_titre maxwidthonsmartphone left">';
//print '<input class="flat" type="text" size="8" name="search_warehouse" value="'.($search_warehouse).'">'; //print '<input class="flat" type="text" size="8" name="search_warehouse" value="'.($search_warehouse).'">';
print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'maxwidth200'); print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'maxwidth200');
print '</td>'; print '</td>';
@ -826,28 +826,28 @@ if ($resql)
if (! empty($arrayfields['m.fk_user_author']['checked'])) if (! empty($arrayfields['m.fk_user_author']['checked']))
{ {
// Author // Author
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '<input class="flat" type="text" size="6" name="search_user" value="'.dol_escape_htmltag($search_user).'">'; print '<input class="flat" type="text" size="6" name="search_user" value="'.dol_escape_htmltag($search_user).'">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['m.inventorycode']['checked'])) if (! empty($arrayfields['m.inventorycode']['checked']))
{ {
// Inventory code // Inventory code
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '<input class="flat" type="text" size="4" name="search_inventorycode" value="'.dol_escape_htmltag($search_inventorycode).'">'; print '<input class="flat" type="text" size="4" name="search_inventorycode" value="'.dol_escape_htmltag($search_inventorycode).'">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['m.label']['checked'])) if (! empty($arrayfields['m.label']['checked']))
{ {
// Label of movement // Label of movement
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '<input class="flat" type="text" size="8" name="search_movement" value="'.dol_escape_htmltag($search_movement).'">'; print '<input class="flat" type="text" size="8" name="search_movement" value="'.dol_escape_htmltag($search_movement).'">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['m.type_mouvement']['checked'])) if (! empty($arrayfields['m.type_mouvement']['checked']))
{ {
// Type of movement // Type of movement
print '<td class="liste_titre" align="center">'; print '<td class="liste_titre center">';
//print '<input class="flat" type="text" size="3" name="search_type_mouvement" value="'.dol_escape_htmltag($search_type_mouvement).'">'; //print '<input class="flat" type="text" size="3" name="search_type_mouvement" value="'.dol_escape_htmltag($search_type_mouvement).'">';
print '<select id="search_type_mouvement" name="search_type_mouvement" class="maxwidth150">'; print '<select id="search_type_mouvement" name="search_type_mouvement" class="maxwidth150">';
print '<option value="" '.(($search_type_mouvement=="")?'selected="selected"':'').'></option>'; print '<option value="" '.(($search_type_mouvement=="")?'selected="selected"':'').'></option>';
@ -864,21 +864,21 @@ if ($resql)
if (! empty($arrayfields['origin']['checked'])) if (! empty($arrayfields['origin']['checked']))
{ {
// Origin of movement // Origin of movement
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '&nbsp; '; print '&nbsp; ';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['m.value']['checked'])) if (! empty($arrayfields['m.value']['checked']))
{ {
// Qty // Qty
print '<td class="liste_titre" align="right">'; print '<td class="liste_titre right">';
print '<input class="flat" type="text" size="4" name="search_qty" value="'.dol_escape_htmltag($search_qty).'">'; print '<input class="flat" type="text" size="4" name="search_qty" value="'.dol_escape_htmltag($search_qty).'">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['m.price']['checked'])) if (! empty($arrayfields['m.price']['checked']))
{ {
// Price // Price
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '&nbsp; '; print '&nbsp; ';
print '</td>'; print '</td>';
} }
@ -904,7 +904,7 @@ if ($resql)
print '</td>'; print '</td>';
} }
// Actions // Actions
print '<td class="liste_titre" align="right">'; print '<td class="liste_titre right">';
$searchpicto=$form->showFilterAndCheckAddButtons(0); $searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto; print $searchpicto;
print '</td>'; print '</td>';
@ -920,13 +920,15 @@ if ($resql)
if (! empty($arrayfields['p.label']['checked'])) if (! empty($arrayfields['p.label']['checked']))
print_liste_field_titre($arrayfields['p.label']['label'], $_SERVER["PHP_SELF"], 'p.label', '', $param, '', $sortfield, $sortorder); print_liste_field_titre($arrayfields['p.label']['label'], $_SERVER["PHP_SELF"], 'p.label', '', $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['m.batch']['checked'])) if (! empty($arrayfields['m.batch']['checked']))
print_liste_field_titre($arrayfields['m.batch']['label'], $_SERVER["PHP_SELF"], 'm.batch', '', $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['m.batch']['label'], $_SERVER["PHP_SELF"], 'm.batch', '', $param, '', $sortfield, $sortorder, 'center ');
if (! empty($arrayfields['pl.eatby']['checked'])) if (! empty($arrayfields['pl.eatby']['checked']))
print_liste_field_titre($arrayfields['pl.eatby']['label'], $_SERVER["PHP_SELF"], 'pl.eatby', '', $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['pl.eatby']['label'], $_SERVER["PHP_SELF"], 'pl.eatby', '', $param, '', $sortfield, $sortorder, 'center ');
if (! empty($arrayfields['pl.sellby']['checked'])) if (! empty($arrayfields['pl.sellby']['checked']))
print_liste_field_titre($arrayfields['pl.sellby']['label'], $_SERVER["PHP_SELF"], 'pl.sellby', '', $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['pl.sellby']['label'], $_SERVER["PHP_SELF"], 'pl.sellby', '', $param, '', $sortfield, $sortorder, 'center ');
if (! empty($arrayfields['e.ref']['checked'])) if (! empty($arrayfields['e.ref']['checked'])) {
print_liste_field_titre($arrayfields['e.ref']['label'], $_SERVER["PHP_SELF"], "e.ref", "", $param, "", $sortfield, $sortorder); // We are on a specific warehouse card, no filter on other should be possible // We are on a specific warehouse card, no filter on other should be possible
print_liste_field_titre($arrayfields['e.ref']['label'], $_SERVER["PHP_SELF"], "e.ref", "", $param, "", $sortfield, $sortorder);
}
if (! empty($arrayfields['m.fk_user_author']['checked'])) if (! empty($arrayfields['m.fk_user_author']['checked']))
print_liste_field_titre($arrayfields['m.fk_user_author']['label'], $_SERVER["PHP_SELF"], "m.fk_user_author", "", $param, "", $sortfield, $sortorder); print_liste_field_titre($arrayfields['m.fk_user_author']['label'], $_SERVER["PHP_SELF"], "m.fk_user_author", "", $param, "", $sortfield, $sortorder);
if (! empty($arrayfields['m.inventorycode']['checked'])) if (! empty($arrayfields['m.inventorycode']['checked']))
@ -934,13 +936,13 @@ if ($resql)
if (! empty($arrayfields['m.label']['checked'])) if (! empty($arrayfields['m.label']['checked']))
print_liste_field_titre($arrayfields['m.label']['label'], $_SERVER["PHP_SELF"], "m.label", "", $param, "", $sortfield, $sortorder); print_liste_field_titre($arrayfields['m.label']['label'], $_SERVER["PHP_SELF"], "m.label", "", $param, "", $sortfield, $sortorder);
if (! empty($arrayfields['m.type_mouvement']['checked'])) if (! empty($arrayfields['m.type_mouvement']['checked']))
print_liste_field_titre($arrayfields['m.type_mouvement']['label'], $_SERVER["PHP_SELF"], "m.type_mouvement", "", $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['m.type_mouvement']['label'], $_SERVER["PHP_SELF"], "m.type_mouvement", "", $param, '', $sortfield, $sortorder, 'center ');
if (! empty($arrayfields['origin']['checked'])) if (! empty($arrayfields['origin']['checked']))
print_liste_field_titre($arrayfields['origin']['label'], $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder); print_liste_field_titre($arrayfields['origin']['label'], $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder);
if (! empty($arrayfields['m.value']['checked'])) if (! empty($arrayfields['m.value']['checked']))
print_liste_field_titre($arrayfields['m.value']['label'], $_SERVER["PHP_SELF"], "m.value", "", $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['m.value']['label'], $_SERVER["PHP_SELF"], "m.value", "", $param, '', $sortfield, $sortorder, 'right ');
if (! empty($arrayfields['m.price']['checked'])) if (! empty($arrayfields['m.price']['checked']))
print_liste_field_titre($arrayfields['m.price']['label'], $_SERVER["PHP_SELF"], "m.price", "", $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['m.price']['label'], $_SERVER["PHP_SELF"], "m.price", "", $param, '', $sortfield, $sortorder, 'right ');
// Extra fields // Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
@ -949,16 +951,19 @@ if ($resql)
$parameters=array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); $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 $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint; print $hookmanager->resPrint;
if (! empty($arrayfields['m.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); if (! empty($arrayfields['m.datec']['checked'])) {
if (! empty($arrayfields['m.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); }
if (! empty($arrayfields['m.tms']['checked'])) {
print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
}
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
print "</tr>\n"; print "</tr>\n";
$arrayofuniqueproduct=array(); $arrayofuniqueproduct=array();
while ($i < min($num, $limit)) while ($i < min($num, $limit)) {
{
$objp = $db->fetch_object($resql); $objp = $db->fetch_object($resql);
$userstatic->id=$objp->fk_user_author; $userstatic->id=$objp->fk_user_author;
@ -984,7 +989,7 @@ if ($resql)
$warehousestatic->lieu=$objp->lieu; $warehousestatic->lieu=$objp->lieu;
$arrayofuniqueproduct[$objp->rowid]=$objp->produit; $arrayofuniqueproduct[$objp->rowid]=$objp->produit;
if(!empty($objp->fk_origin)) { if (!empty($objp->fk_origin)) {
$origin = $movement->get_origin($objp->fk_origin, $objp->origintype); $origin = $movement->get_origin($objp->fk_origin, $objp->origintype);
} else { } else {
$origin = ''; $origin = '';
@ -994,7 +999,8 @@ if ($resql)
// Id movement // Id movement
if (! empty($arrayfields['m.rowid']['checked'])) if (! empty($arrayfields['m.rowid']['checked']))
{ {
print '<td>'.$objp->mid.'</td>'; // This is primary not movement id // This is primary not movement id
print '<td>'.$objp->mid.'</td>';
} }
if (! empty($arrayfields['m.datem']['checked'])) if (! empty($arrayfields['m.datem']['checked']))
{ {
@ -1028,11 +1034,11 @@ if ($resql)
} }
if (! empty($arrayfields['pl.eatby']['checked'])) if (! empty($arrayfields['pl.eatby']['checked']))
{ {
print '<td align="center">'. dol_print_date($objp->eatby, 'day') .'</td>'; print '<td class="center">'. dol_print_date($objp->eatby, 'day') .'</td>';
} }
if (! empty($arrayfields['pl.sellby']['checked'])) if (! empty($arrayfields['pl.sellby']['checked']))
{ {
print '<td align="center">'. dol_print_date($objp->sellby, 'day') .'</td>'; print '<td class="center">'. dol_print_date($objp->sellby, 'day') .'</td>';
} }
// Warehouse // Warehouse
if (! empty($arrayfields['e.ref']['checked'])) if (! empty($arrayfields['e.ref']['checked']))
@ -1071,16 +1077,16 @@ if ($resql)
// Type of movement // Type of movement
switch($objp->type_mouvement) { switch($objp->type_mouvement) {
case "0": case "0":
print '<td align="center">'.$langs->trans('StockIncreaseAfterCorrectTransfer').'</td>'; print '<td class="center">'.$langs->trans('StockIncreaseAfterCorrectTransfer').'</td>';
break; break;
case "1": case "1":
print '<td align="center">'.$langs->trans('StockDecreaseAfterCorrectTransfer').'</td>'; print '<td class="center">'.$langs->trans('StockDecreaseAfterCorrectTransfer').'</td>';
break; break;
case "2": case "2":
print '<td align="center">'.$langs->trans('StockDecrease').'</td>'; print '<td class="center">'.$langs->trans('StockDecrease').'</td>';
break; break;
case "3": case "3":
print '<td align="center">'.$langs->trans('StockIncrease').'</td>'; print '<td class="center">'.$langs->trans('StockIncrease').'</td>';
break; break;
} }
} }
@ -1092,7 +1098,7 @@ if ($resql)
if (! empty($arrayfields['m.value']['checked'])) if (! empty($arrayfields['m.value']['checked']))
{ {
// Qty // Qty
print '<td align="right">'; print '<td class="right">';
if ($objp->qt > 0) print '+'; if ($objp->qt > 0) print '+';
print $objp->qty; print $objp->qty;
print '</td>'; print '</td>';
@ -1100,12 +1106,12 @@ if ($resql)
if (! empty($arrayfields['m.price']['checked'])) if (! empty($arrayfields['m.price']['checked']))
{ {
// Price // Price
print '<td align="right">'; print '<td class="right">';
if ($objp->price != 0) print price($objp->price); if ($objp->price != 0) print price($objp->price);
print '</td>'; print '</td>';
} }
// Action column // 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 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; $selected=0;
@ -1130,8 +1136,7 @@ if ($resql)
print "<br>"; print "<br>";
$productidselected=0; $productidselected=0;
foreach ($arrayofuniqueproduct as $key => $val) foreach ($arrayofuniqueproduct as $key => $val) {
{
$productidselected=$key; $productidselected=$key;
$productlabelselected=$val; $productlabelselected=$val;
} }
@ -1143,17 +1148,17 @@ if ($resql)
//print '<tr class="total"><td class="liste_total">'; //print '<tr class="total"><td class="liste_total">';
print $langs->trans("NbOfProductBeforePeriod", $productlabelselected, dol_print_date($datebefore, 'day', 'gmt')); print $langs->trans("NbOfProductBeforePeriod", $productlabelselected, dol_print_date($datebefore, 'day', 'gmt'));
//print '</td>'; //print '</td>';
//print '<td class="liste_total" colspan="6" align="right">'; //print '<td class="liste_total right" colspan="6">';
print ': '.$balancebefore; print ': '.$balancebefore;
print "<br>\n"; print "<br>\n";
//print '</td></tr>'; //print '</td></tr>';
//print '<tr class="total"><td class="liste_total">'; //print '<tr class="total"><td class="liste_total">';
print $langs->trans("NbOfProductAfterPeriod", $productlabelselected, dol_print_date($dateafter, 'day', 'gmt')); print $langs->trans("NbOfProductAfterPeriod", $productlabelselected, dol_print_date($dateafter, 'day', 'gmt'));
//print '</td>'; //print '</td>';
//print '<td class="liste_total" colspan="6" align="right">'; //print '<td class="liste_total right" colspan="6">';
print ': '.$balanceafter; print ': '.$balanceafter;
print "<br>\n"; print "<br>\n";
//print '</td></tr>'; //print '</td></tr>';
} }
} }
else else

View File

@ -4,6 +4,7 @@
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -768,7 +769,7 @@ if ($resql)
if (! empty($arrayfields['m.rowid']['checked'])) if (! empty($arrayfields['m.rowid']['checked']))
{ {
// Ref // Ref
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '<input class="flat maxwidth25" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">'; print '<input class="flat maxwidth25" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
print '</td>'; print '</td>';
} }
@ -786,36 +787,36 @@ if ($resql)
if (! empty($arrayfields['p.ref']['checked'])) if (! empty($arrayfields['p.ref']['checked']))
{ {
// Product Ref // Product Ref
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '<input class="flat maxwidth75" type="text" name="search_product_ref" value="'.dol_escape_htmltag($idproduct?$product->ref:$search_product_ref).'">'; print '<input class="flat maxwidth75" type="text" name="search_product_ref" value="'.dol_escape_htmltag($idproduct?$product->ref:$search_product_ref).'">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['p.label']['checked'])) if (! empty($arrayfields['p.label']['checked']))
{ {
// Product label // Product label
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '<input class="flat maxwidth100" type="text" name="search_product" value="'.dol_escape_htmltag($idproduct?$product->label:$search_product).'">'; print '<input class="flat maxwidth100" type="text" name="search_product" value="'.dol_escape_htmltag($idproduct?$product->label:$search_product).'">';
print '</td>'; print '</td>';
} }
// Batch // Batch
if (! empty($arrayfields['m.batch']['checked'])) if (! empty($arrayfields['m.batch']['checked']))
{ {
print '<td class="liste_titre" align="center"><input class="flat maxwidth75" type="text" name="search_batch" value="'.dol_escape_htmltag($search_batch).'"></td>'; print '<td class="liste_titre center"><input class="flat maxwidth75" type="text" name="search_batch" value="'.dol_escape_htmltag($search_batch).'"></td>';
} }
if (! empty($arrayfields['pl.eatby']['checked'])) if (! empty($arrayfields['pl.eatby']['checked']))
{ {
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['pl.sellby']['checked'])) if (! empty($arrayfields['pl.sellby']['checked']))
{ {
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '</td>'; print '</td>';
} }
// Warehouse // Warehouse
if (! empty($arrayfields['e.ref']['checked'])) if (! empty($arrayfields['e.ref']['checked']))
{ {
print '<td class="liste_titre maxwidthonsmartphone" align="left">'; print '<td class="liste_titre maxwidthonsmartphone left">';
//print '<input class="flat" type="text" size="8" name="search_warehouse" value="'.($search_warehouse).'">'; //print '<input class="flat" type="text" size="8" name="search_warehouse" value="'.($search_warehouse).'">';
print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'maxwidth200'); print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'maxwidth200');
print '</td>'; print '</td>';
@ -823,28 +824,28 @@ if ($resql)
if (! empty($arrayfields['m.fk_user_author']['checked'])) if (! empty($arrayfields['m.fk_user_author']['checked']))
{ {
// Author // Author
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '<input class="flat" type="text" size="6" name="search_user" value="'.dol_escape_htmltag($search_user).'">'; print '<input class="flat" type="text" size="6" name="search_user" value="'.dol_escape_htmltag($search_user).'">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['m.inventorycode']['checked'])) if (! empty($arrayfields['m.inventorycode']['checked']))
{ {
// Inventory code // Inventory code
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '<input class="flat" type="text" size="4" name="search_inventorycode" value="'.dol_escape_htmltag($search_inventorycode).'">'; print '<input class="flat" type="text" size="4" name="search_inventorycode" value="'.dol_escape_htmltag($search_inventorycode).'">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['m.label']['checked'])) if (! empty($arrayfields['m.label']['checked']))
{ {
// Label of movement // Label of movement
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '<input class="flat" type="text" size="8" name="search_movement" value="'.dol_escape_htmltag($search_movement).'">'; print '<input class="flat" type="text" size="8" name="search_movement" value="'.dol_escape_htmltag($search_movement).'">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['m.type_mouvement']['checked'])) if (! empty($arrayfields['m.type_mouvement']['checked']))
{ {
// Type of movement // Type of movement
print '<td class="liste_titre" align="center">'; print '<td class="liste_titre center">';
//print '<input class="flat" type="text" size="3" name="search_type_mouvement" value="'.dol_escape_htmltag($search_type_mouvement).'">'; //print '<input class="flat" type="text" size="3" name="search_type_mouvement" value="'.dol_escape_htmltag($search_type_mouvement).'">';
print '<select id="search_type_mouvement" name="search_type_mouvement" class="maxwidth150">'; print '<select id="search_type_mouvement" name="search_type_mouvement" class="maxwidth150">';
print '<option value="" '.(($search_type_mouvement=="")?'selected="selected"':'').'></option>'; print '<option value="" '.(($search_type_mouvement=="")?'selected="selected"':'').'></option>';
@ -861,21 +862,21 @@ if ($resql)
if (! empty($arrayfields['origin']['checked'])) if (! empty($arrayfields['origin']['checked']))
{ {
// Origin of movement // Origin of movement
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '&nbsp; '; print '&nbsp; ';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['m.value']['checked'])) if (! empty($arrayfields['m.value']['checked']))
{ {
// Qty // Qty
print '<td class="liste_titre" align="right">'; print '<td class="liste_titre right">';
print '<input class="flat" type="text" size="4" name="search_qty" value="'.dol_escape_htmltag($search_qty).'">'; print '<input class="flat" type="text" size="4" name="search_qty" value="'.dol_escape_htmltag($search_qty).'">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['m.price']['checked'])) if (! empty($arrayfields['m.price']['checked']))
{ {
// Price // Price
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre left">';
print '&nbsp; '; print '&nbsp; ';
print '</td>'; print '</td>';
} }
@ -901,28 +902,59 @@ if ($resql)
print '</td>'; print '</td>';
} }
// Actions // Actions
print '<td class="liste_titre" align="right">'; print '<td class="liste_titre right">';
$searchpicto=$form->showFilterAndCheckAddButtons(0); $searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto; print $searchpicto;
print '</td>'; print '</td>';
print "</tr>\n"; print "</tr>\n";
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
if (! empty($arrayfields['m.rowid']['checked'])) print_liste_field_titre($arrayfields['m.rowid']['label'], $_SERVER["PHP_SELF"], 'm.rowid', '', $param, '', $sortfield, $sortorder); if (! empty($arrayfields['m.rowid']['checked'])) {
if (! empty($arrayfields['m.datem']['checked'])) print_liste_field_titre($arrayfields['m.datem']['label'], $_SERVER["PHP_SELF"], 'm.datem', '', $param, '', $sortfield, $sortorder); print_liste_field_titre($arrayfields['m.rowid']['label'], $_SERVER["PHP_SELF"], 'm.rowid', '', $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], 'p.ref', '', $param, '', $sortfield, $sortorder); }
if (! empty($arrayfields['p.label']['checked'])) print_liste_field_titre($arrayfields['p.label']['label'], $_SERVER["PHP_SELF"], 'p.label', '', $param, '', $sortfield, $sortorder); if (! empty($arrayfields['m.datem']['checked'])) {
if (! empty($arrayfields['m.batch']['checked'])) print_liste_field_titre($arrayfields['m.batch']['label'], $_SERVER["PHP_SELF"], 'm.batch', '', $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['m.datem']['label'], $_SERVER["PHP_SELF"], 'm.datem', '', $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['pl.eatby']['checked'])) print_liste_field_titre($arrayfields['pl.eatby']['label'], $_SERVER["PHP_SELF"], 'pl.eatby', '', $param, 'align="center"', $sortfield, $sortorder); }
if (! empty($arrayfields['pl.sellby']['checked'])) print_liste_field_titre($arrayfields['pl.sellby']['label'], $_SERVER["PHP_SELF"], 'pl.sellby', '', $param, 'align="center"', $sortfield, $sortorder); if (! empty($arrayfields['p.ref']['checked'])) {
if (! empty($arrayfields['e.ref']['checked'])) print_liste_field_titre($arrayfields['e.ref']['label'], $_SERVER["PHP_SELF"], "e.ref", "", $param, "", $sortfield, $sortorder); // We are on a specific warehouse card, no filter on other should be possible print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], 'p.ref', '', $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['m.fk_user_author']['checked'])) print_liste_field_titre($arrayfields['m.fk_user_author']['label'], $_SERVER["PHP_SELF"], "m.fk_user_author", "", $param, "", $sortfield, $sortorder); }
if (! empty($arrayfields['m.inventorycode']['checked'])) print_liste_field_titre($arrayfields['m.inventorycode']['label'], $_SERVER["PHP_SELF"], "m.inventorycode", "", $param, "", $sortfield, $sortorder); if (! empty($arrayfields['p.label']['checked'])) {
if (! empty($arrayfields['m.label']['checked'])) print_liste_field_titre($arrayfields['m.label']['label'], $_SERVER["PHP_SELF"], "m.label", "", $param, "", $sortfield, $sortorder); print_liste_field_titre($arrayfields['p.label']['label'], $_SERVER["PHP_SELF"], 'p.label', '', $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['m.type_mouvement']['checked'])) print_liste_field_titre($arrayfields['m.type_mouvement']['label'], $_SERVER["PHP_SELF"], "m.type_mouvement", "", $param, 'align="center"', $sortfield, $sortorder); }
if (! empty($arrayfields['origin']['checked'])) print_liste_field_titre($arrayfields['origin']['label'], $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder); if (! empty($arrayfields['m.batch']['checked'])) {
if (! empty($arrayfields['m.value']['checked'])) print_liste_field_titre($arrayfields['m.value']['label'], $_SERVER["PHP_SELF"], "m.value", "", $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['m.batch']['label'], $_SERVER["PHP_SELF"], 'm.batch', '', $param, '', $sortfield, $sortorder, 'center ');
if (! empty($arrayfields['m.price']['checked'])) print_liste_field_titre($arrayfields['m.price']['label'], $_SERVER["PHP_SELF"], "m.price", "", $param, 'align="right"', $sortfield, $sortorder); }
if (! empty($arrayfields['pl.eatby']['checked'])) {
print_liste_field_titre($arrayfields['pl.eatby']['label'], $_SERVER["PHP_SELF"], 'pl.eatby', '', $param, '', $sortfield, $sortorder, 'center ');
}
if (! empty($arrayfields['pl.sellby']['checked'])) {
print_liste_field_titre($arrayfields['pl.sellby']['label'], $_SERVER["PHP_SELF"], 'pl.sellby', '', $param, '', $sortfield, $sortorder, 'center ');
}
if (! empty($arrayfields['e.ref']['checked'])) {
// We are on a specific warehouse card, no filter on other should be possible
print_liste_field_titre($arrayfields['e.ref']['label'], $_SERVER["PHP_SELF"], "e.ref", "", $param, "", $sortfield, $sortorder);
}
if (! empty($arrayfields['m.fk_user_author']['checked'])) {
print_liste_field_titre($arrayfields['m.fk_user_author']['label'], $_SERVER["PHP_SELF"], "m.fk_user_author", "", $param, "", $sortfield, $sortorder);
}
if (! empty($arrayfields['m.inventorycode']['checked'])) {
print_liste_field_titre($arrayfields['m.inventorycode']['label'], $_SERVER["PHP_SELF"], "m.inventorycode", "", $param, "", $sortfield, $sortorder);
}
if (! empty($arrayfields['m.label']['checked'])) {
print_liste_field_titre($arrayfields['m.label']['label'], $_SERVER["PHP_SELF"], "m.label", "", $param, "", $sortfield, $sortorder);
}
if (! empty($arrayfields['m.type_mouvement']['checked'])) {
print_liste_field_titre($arrayfields['m.type_mouvement']['label'], $_SERVER["PHP_SELF"], "m.type_mouvement", "", $param, '', $sortfield, $sortorder, 'center ');
}
if (! empty($arrayfields['origin']['checked'])) {
print_liste_field_titre($arrayfields['origin']['label'], $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder);
}
if (! empty($arrayfields['m.value']['checked'])) {
print_liste_field_titre($arrayfields['m.value']['label'], $_SERVER["PHP_SELF"], "m.value", "", $param, '', $sortfield, $sortorder, 'right ');
}
if (! empty($arrayfields['m.price']['checked'])) {
print_liste_field_titre($arrayfields['m.price']['label'], $_SERVER["PHP_SELF"], "m.price", "", $param, '', $sortfield, $sortorder, 'right ');
}
// Extra fields // Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
@ -931,9 +963,13 @@ if ($resql)
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder); $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 $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint; print $hookmanager->resPrint;
if (! empty($arrayfields['m.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); if (! empty($arrayfields['m.datec']['checked'])) {
if (! empty($arrayfields['m.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); }
if (! empty($arrayfields['m.tms']['checked'])) {
print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
}
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
print "</tr>\n"; print "</tr>\n";
@ -1010,11 +1046,11 @@ if ($resql)
} }
if (! empty($arrayfields['pl.eatby']['checked'])) if (! empty($arrayfields['pl.eatby']['checked']))
{ {
print '<td align="center">'. dol_print_date($objp->eatby, 'day') .'</td>'; print '<td class="center">'. dol_print_date($objp->eatby, 'day') .'</td>';
} }
if (! empty($arrayfields['pl.sellby']['checked'])) if (! empty($arrayfields['pl.sellby']['checked']))
{ {
print '<td align="center">'. dol_print_date($objp->sellby, 'day') .'</td>'; print '<td class="center">'. dol_print_date($objp->sellby, 'day') .'</td>';
} }
// Warehouse // Warehouse
if (! empty($arrayfields['e.ref']['checked'])) if (! empty($arrayfields['e.ref']['checked']))
@ -1053,16 +1089,16 @@ if ($resql)
// Type of movement // Type of movement
switch($objp->type_mouvement){ switch($objp->type_mouvement){
case "0": case "0":
print '<td align="center">'.$langs->trans('StockIncreaseAfterCorrectTransfer').'</td>'; print '<td class="center">'.$langs->trans('StockIncreaseAfterCorrectTransfer').'</td>';
break; break;
case "1": case "1":
print '<td align="center">'.$langs->trans('StockDecreaseAfterCorrectTransfer').'</td>'; print '<td class="center">'.$langs->trans('StockDecreaseAfterCorrectTransfer').'</td>';
break; break;
case "2": case "2":
print '<td align="center">'.$langs->trans('StockDecrease').'</td>'; print '<td class="center">'.$langs->trans('StockDecrease').'</td>';
break; break;
case "3": case "3":
print '<td align="center">'.$langs->trans('StockIncrease').'</td>'; print '<td class="center">'.$langs->trans('StockIncrease').'</td>';
break; break;
} }
} }
@ -1074,7 +1110,7 @@ if ($resql)
if (! empty($arrayfields['m.value']['checked'])) if (! empty($arrayfields['m.value']['checked']))
{ {
// Qty // Qty
print '<td align="right">'; print '<td class="right">';
if ($objp->qt > 0) print '+'; if ($objp->qt > 0) print '+';
print $objp->qty; print $objp->qty;
print '</td>'; print '</td>';
@ -1082,12 +1118,12 @@ if ($resql)
if (! empty($arrayfields['m.price']['checked'])) if (! empty($arrayfields['m.price']['checked']))
{ {
// Price // Price
print '<td align="right">'; print '<td class="right">';
if ($objp->price != 0) print price($objp->price); if ($objp->price != 0) print price($objp->price);
print '</td>'; print '</td>';
} }
// Action column // 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 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; $selected=0;
@ -1125,14 +1161,14 @@ if ($resql)
//print '<tr class="total"><td class="liste_total">'; //print '<tr class="total"><td class="liste_total">';
print $langs->trans("NbOfProductBeforePeriod", $productlabelselected, dol_print_date($datebefore, 'day', 'gmt')); print $langs->trans("NbOfProductBeforePeriod", $productlabelselected, dol_print_date($datebefore, 'day', 'gmt'));
//print '</td>'; //print '</td>';
//print '<td class="liste_total" colspan="6" align="right">'; //print '<td class="liste_total right" colspan="6">';
print ': '.$balancebefore; print ': '.$balancebefore;
print "<br>\n"; print "<br>\n";
//print '</td></tr>'; //print '</td></tr>';
//print '<tr class="total"><td class="liste_total">'; //print '<tr class="total"><td class="liste_total">';
print $langs->trans("NbOfProductAfterPeriod", $productlabelselected, dol_print_date($dateafter, 'day', 'gmt')); print $langs->trans("NbOfProductAfterPeriod", $productlabelselected, dol_print_date($dateafter, 'day', 'gmt'));
//print '</td>'; //print '</td>';
//print '<td class="liste_total" colspan="6" align="right">'; //print '<td class="liste_total right" colspan="6">';
print ': '.$balanceafter; print ': '.$balanceafter;
print "<br>\n"; print "<br>\n";
//print '</td></tr>'; //print '</td></tr>';

View File

@ -1,14 +1,14 @@
<?php <?php
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com> * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com> * Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2013 Cédric Salvador <csalvador.gpcsolutions.fr> * Copyright (C) 2013 Cédric Salvador <csalvador.gpcsolutions.fr>
* Copyright (C) 2013-2018 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2013-2018 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2014-2015 Cédric Gross <c.gross@kreiz-it.fr> * Copyright (C) 2014-2015 Cédric Gross <c.gross@kreiz-it.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -38,9 +38,10 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productstockentrepot.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productstockentrepot.class.php';
if (! empty($conf->productbatch->enabled)) require_once DOL_DOCUMENT_ROOT.'/product/class/productbatch.class.php'; if (! empty($conf->productbatch->enabled)) {
if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/product/class/productbatch.class.php';
{ }
if (! empty($conf->projet->enabled)) {
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
} }
@ -807,17 +808,17 @@ if (! $variants) {
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="4">' . $langs->trans("Warehouse") . '</td>'; print '<td colspan="4">' . $langs->trans("Warehouse") . '</td>';
print '<td align="right">' . $langs->trans("NumberOfUnit") . '</td>'; print '<td class="right">' . $langs->trans("NumberOfUnit") . '</td>';
print '<td align="right">' . $langs->trans("AverageUnitPricePMPShort") . '</td>'; print '<td class="right">' . $langs->trans("AverageUnitPricePMPShort") . '</td>';
print '<td align="right">' . $langs->trans("EstimatedStockValueShort") . '</td>'; print '<td class="right">' . $langs->trans("EstimatedStockValueShort") . '</td>';
print '<td align="right">' . $langs->trans("SellPriceMin") . '</td>'; print '<td class="right">' . $langs->trans("SellPriceMin") . '</td>';
print '<td align="right">' . $langs->trans("EstimatedStockValueSellShort") . '</td>'; print '<td class="right">' . $langs->trans("EstimatedStockValueSellShort") . '</td>';
print '</tr>'; print '</tr>';
if ((!empty($conf->productbatch->enabled)) && $object->hasbatch()) { if ((!empty($conf->productbatch->enabled)) && $object->hasbatch()) {
print '<tr class="liste_titre"><td width="10%"></td>'; print '<tr class="liste_titre"><td width="10%"></td>';
print '<td align="right" width="10%">' . $langs->trans("batch_number") . '</td>'; print '<td class="right" width="10%">' . $langs->trans("batch_number") . '</td>';
print '<td align="center" width="10%">' . $langs->trans("EatByDate") . '</td>'; print '<td class="center" width="10%">' . $langs->trans("EatByDate") . '</td>';
print '<td align="center" width="10%">' . $langs->trans("SellByDate") . '</td>'; print '<td class="center" width="10%">' . $langs->trans("SellByDate") . '</td>';
print '<td></td>'; print '<td></td>';
print '<td></td>'; print '<td></td>';
print '<td></td>'; print '<td></td>';
@ -856,18 +857,18 @@ if (! $variants) {
$stock_real = price2num($obj->reel, 'MS'); $stock_real = price2num($obj->reel, 'MS');
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td colspan="4">' . $entrepotstatic->getNomUrl(1) . '</td>'; print '<td colspan="4">' . $entrepotstatic->getNomUrl(1) . '</td>';
print '<td align="right">' . $stock_real . ($stock_real < 0 ? ' ' . img_warning() : '') . '</td>'; print '<td class="right">' . $stock_real . ($stock_real < 0 ? ' ' . img_warning() : '') . '</td>';
// PMP // PMP
print '<td align="right">' . (price2num($object->pmp) ? price2num($object->pmp, 'MU') : '') . '</td>'; print '<td class="right">' . (price2num($object->pmp) ? price2num($object->pmp, 'MU') : '') . '</td>';
// Value purchase // Value purchase
print '<td align="right">' . (price2num($object->pmp) ? price(price2num($object->pmp * $obj->reel, 'MT')) : '') . '</td>'; print '<td class="right">' . (price2num($object->pmp) ? price(price2num($object->pmp * $obj->reel, 'MT')) : '') . '</td>';
// Sell price // Sell price
print '<td align="right">'; print '<td class="right">';
if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($object->price, 'MU'), 1); if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($object->price, 'MU'), 1);
else print $langs->trans("Variable"); else print $langs->trans("Variable");
print '</td>'; print '</td>';
// Value sell // Value sell
print '<td align="right">'; print '<td class="right">';
if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($object->price * $obj->reel, 'MT'), 1) . '</td>'; if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($object->price * $obj->reel, 'MT'), 1) . '</td>';
else print $langs->trans("Variable"); else print $langs->trans("Variable");
print '</tr>'; print '</tr>';
@ -890,33 +891,33 @@ if (! $variants) {
print '<td colspan="9">'; print '<td colspan="9">';
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST">'; print '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
print '<input type="hidden" name="pdluoid" value="' . $pdluo->id . '"><input type="hidden" name="action" value="updateline"><input type="hidden" name="id" value="' . $id . '"><table class="noborder" width="100%"><tr><td width="10%"></td>'; print '<input type="hidden" name="pdluoid" value="' . $pdluo->id . '"><input type="hidden" name="action" value="updateline"><input type="hidden" name="id" value="' . $id . '"><table class="noborder" width="100%"><tr><td width="10%"></td>';
print '<td align="right" width="10%"><input type="text" name="batch_number" value="' . $pdluo->batch . '"></td>'; print '<td class="right" width="10%"><input type="text" name="batch_number" value="' . $pdluo->batch . '"></td>';
print '<td align="center" width="10%">'; print '<td class="center" width="10%">';
print $form->selectDate($pdluo->eatby, 'eatby', '', '', 1, '', 1, 0); print $form->selectDate($pdluo->eatby, 'eatby', '', '', 1, '', 1, 0);
print '</td>'; print '</td>';
print '<td align="center" width="10%">'; print '<td class="center" width="10%">';
print $form->selectDate($pdluo->sellby, 'sellby', '', '', 1, '', 1, 0); print $form->selectDate($pdluo->sellby, 'sellby', '', '', 1, '', 1, 0);
print '</td>'; print '</td>';
print '<td align="right" width="10%">' . $pdluo->qty . ($pdluo->qty < 0 ? ' ' . img_warning() : '') . '</td>'; print '<td class="right" width="10%">' . $pdluo->qty . ($pdluo->qty < 0 ? ' ' . img_warning() : '') . '</td>';
print '<td colspan="4"><input type="submit" class="button" id="savelinebutton" name="save" value="' . $langs->trans("Save") . '">'; print '<td colspan="4"><input type="submit" class="button" id="savelinebutton" name="save" value="' . $langs->trans("Save") . '">';
print '<input type="submit" class="button" id="cancellinebutton" name="Cancel" value="' . $langs->trans("Cancel") . '"></td></tr>'; print '<input type="submit" class="button" id="cancellinebutton" name="Cancel" value="' . $langs->trans("Cancel") . '"></td></tr>';
print '</table>'; print '</table>';
print '</form>'; print '</form>';
print '</td></tr>'; print '</td></tr>';
} else { } else {
print "\n" . '<tr><td align="right">'; print "\n" . '<tr><td class="right">';
print img_picto($langs->trans("Tranfer"), 'uparrow', 'class="hideonsmartphone"') . ' '; print img_picto($langs->trans("Tranfer"), 'uparrow', 'class="hideonsmartphone"') . ' ';
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;id_entrepot=' . $entrepotstatic->id . '&amp;action=transfert&amp;pdluoid=' . $pdluo->id . '">' . $langs->trans("TransferStock") . '</a>'; print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;id_entrepot=' . $entrepotstatic->id . '&amp;action=transfert&amp;pdluoid=' . $pdluo->id . '">' . $langs->trans("TransferStock") . '</a>';
// Disabled, because edition of stock content must use the "Correct stock menu". // Disabled, because edition of stock content must use the "Correct stock menu".
// Do not use this, or data will be wrong (bad tracking of movement label, inventory code, ... // Do not use this, or data will be wrong (bad tracking of movement label, inventory code, ...
//print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&amp;action=editline&amp;lineid='.$pdluo->id.'#'.$pdluo->id.'">'; //print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&amp;action=editline&amp;lineid='.$pdluo->id.'#'.$pdluo->id.'">';
//print img_edit().'</a></td>'; //print img_edit().'</a></td>';
print '<td align="right">'; print '<td class="right">';
print $product_lot_static->getNomUrl(1); print $product_lot_static->getNomUrl(1);
print '</td>'; print '</td>';
print '<td align="center">' . dol_print_date($pdluo->eatby, 'day') . '</td>'; print '<td class="center">' . dol_print_date($pdluo->eatby, 'day') . '</td>';
print '<td align="center">' . dol_print_date($pdluo->sellby, 'day') . '</td>'; print '<td class="center">' . dol_print_date($pdluo->sellby, 'day') . '</td>';
print '<td align="right">' . $pdluo->qty . ($pdluo->qty < 0 ? ' ' . img_warning() : '') . '</td>'; print '<td class="right">' . $pdluo->qty . ($pdluo->qty < 0 ? ' ' . img_warning() : '') . '</td>';
print '<td colspan="4"></td></tr>'; print '<td colspan="4"></td></tr>';
} }
} }
@ -925,21 +926,21 @@ if (! $variants) {
} }
} else dol_print_error($db); } else dol_print_error($db);
print '<tr class="liste_total"><td align="right" class="liste_total" colspan="4">' . $langs->trans("Total") . ':</td>'; print '<tr class="liste_total"><td class="right liste_total" colspan="4">' . $langs->trans("Total") . ':</td>';
print '<td class="liste_total" align="right">' . price2num($total, 'MS') . '</td>'; print '<td class="liste_total right">' . price2num($total, 'MS') . '</td>';
print '<td class="liste_total" align="right">'; print '<td class="liste_total right">';
print ($totalwithpmp ? price(price2num($totalvalue / $totalwithpmp, 'MU')) : '&nbsp;'); // This value may have rounding errors print ($totalwithpmp ? price(price2num($totalvalue / $totalwithpmp, 'MU')) : '&nbsp;'); // This value may have rounding errors
print '</td>'; print '</td>';
// Value purchase // Value purchase
print '<td class="liste_total" align="right">'; print '<td class="liste_total right">';
print $totalvalue ? price(price2num($totalvalue, 'MT'), 1) : '&nbsp;'; print $totalvalue ? price(price2num($totalvalue, 'MT'), 1) : '&nbsp;';
print '</td>'; print '</td>';
print '<td class="liste_total" align="right">'; print '<td class="liste_total right">';
if (empty($conf->global->PRODUIT_MULTIPRICES)) print ($total ? price($totalvaluesell / $total, 1) : '&nbsp;'); if (empty($conf->global->PRODUIT_MULTIPRICES)) print ($total ? price($totalvaluesell / $total, 1) : '&nbsp;');
else print $langs->trans("Variable"); else print $langs->trans("Variable");
print '</td>'; print '</td>';
// Value to sell // Value to sell
print '<td class="liste_total" align="right">'; print '<td class="liste_total right">';
if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($totalvaluesell, 'MT'), 1); if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($totalvaluesell, 'MT'), 1);
else print $langs->trans("Variable"); else print $langs->trans("Variable");
print '</td>'; print '</td>';
@ -959,14 +960,14 @@ if (! $variants) {
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
if (!empty($user->rights->produit->creer)) { if (!empty($user->rights->produit->creer)) {
print '<tr class="liste_titre"><td width="40%">' . $formproduct->selectWarehouses('', 'fk_entrepot') . '</td>'; print '<tr class="liste_titre"><td width="40%">' . $formproduct->selectWarehouses('', 'fk_entrepot') . '</td>';
print '<td align="right"><input name="seuil_stock_alerte" type="text" placeholder="' . $langs->trans("StockLimit") . '" /></td>'; print '<td class="right"><input name="seuil_stock_alerte" type="text" placeholder="' . $langs->trans("StockLimit") . '" /></td>';
print '<td align="right"><input name="desiredstock" type="text" placeholder="' . $langs->trans("DesiredStock") . '" /></td>'; print '<td class="right"><input name="desiredstock" type="text" placeholder="' . $langs->trans("DesiredStock") . '" /></td>';
print '<td align="right"><input type="submit" value="' . $langs->trans('Save') . '" class="button" /></td>'; print '<td class="right"><input type="submit" value="' . $langs->trans('Save') . '" class="button" /></td>';
print '</tr>'; print '</tr>';
} else { } else {
print '<tr class="liste_titre"><td width="40%">' . $langs->trans("Warehouse") . '</td>'; print '<tr class="liste_titre"><td width="40%">' . $langs->trans("Warehouse") . '</td>';
print '<td align="right">' . $langs->trans("StockLimit") . '</td>'; print '<td class="right">' . $langs->trans("StockLimit") . '</td>';
print '<td align="right">' . $langs->trans("DesiredStock") . '</td>'; print '<td class="right">' . $langs->trans("DesiredStock") . '</td>';
print '</tr>'; print '</tr>';
} }
@ -979,10 +980,10 @@ if (! $variants) {
$ent = new Entrepot($db); $ent = new Entrepot($db);
$ent->fetch($line['fk_entrepot']); $ent->fetch($line['fk_entrepot']);
print '<tr class="oddeven"><td width="40%">' . $ent->getNomUrl(3) . '</td>'; print '<tr class="oddeven"><td width="40%">' . $ent->getNomUrl(3) . '</td>';
print '<td align="right">' . $line['seuil_stock_alerte'] . '</td>'; print '<td class="right">' . $line['seuil_stock_alerte'] . '</td>';
print '<td align="right">' . $line['desiredstock'] . '</td>'; print '<td class="right">' . $line['desiredstock'] . '</td>';
if (!empty($user->rights->produit->creer)) { if (!empty($user->rights->produit->creer)) {
print '<td align="right"><a href="?id=' . $id . '&fk_productstockwarehouse=' . $line['id'] . '&action=delete_productstockwarehouse">' . img_delete() . '</a></td>'; print '<td class="right"><a href="?id=' . $id . '&fk_productstockwarehouse=' . $line['id'] . '&action=delete_productstockwarehouse">' . img_delete() . '</a></td>';
} }
print '</tr>'; print '</tr>';
} }
@ -1064,8 +1065,8 @@ if (! $variants) {
} }
print '<tr class="liste_total">'; print '<tr class="liste_total">';
print '<td colspan="4" align="left">'.$langs->trans("Total").'</td>'; print '<td colspan="4" class="left">'.$langs->trans("Total").'</td>';
print '<td align="right">'.$stock_total.'</td>'; print '<td class="right">'.$stock_total.'</td>';
print '</tr>'; print '</tr>';
} }
else else

View File

@ -1,6 +1,7 @@
<?php <?php
/* Copyright (C) 2007-2016 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2007-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -17,10 +18,10 @@
*/ */
/** /**
* \file product/stock/productlot_list.php * \file product/stock/productlot_list.php
* \ingroup stock * \ingroup stock
* \brief This file is an example of a php page * \brief This file is an example of a php page
* Initialy built by build_class_from_table on 2016-05-17 12:22 * Initialy built by build_class_from_table on 2016-05-17 12:22
*/ */
require '../../main.inc.php'; require '../../main.inc.php';
@ -34,10 +35,10 @@ require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php';
$langs->loadLangs(array('stocks', 'productbatch', 'other', 'users')); $langs->loadLangs(array('stocks', 'productbatch', 'other', 'users'));
// Get parameters // Get parameters
$id = GETPOST('id', 'int'); $id = GETPOST('id', 'int');
$action = GETPOST('action', 'alpha'); $action = GETPOST('action', 'alpha');
$backtopage = GETPOST('backtopage', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha');
$myparam = GETPOST('myparam', 'alpha'); $myparam = GETPOST('myparam', 'alpha');
$toselect = GETPOST('toselect', 'array'); $toselect = GETPOST('toselect', 'array');
@ -362,12 +363,12 @@ if ($resql)
/*if (! empty($arrayfields['u.statut']['checked'])) /*if (! empty($arrayfields['u.statut']['checked']))
{ {
// Status // Status
print '<td class="liste_titre" align="center">'; print '<td class="liste_titre center">';
print $form->selectarray('search_statut', array('-1'=>'','0'=>$langs->trans('Disabled'),'1'=>$langs->trans('Enabled')),$search_statut); print $form->selectarray('search_statut', array('-1'=>'','0'=>$langs->trans('Disabled'),'1'=>$langs->trans('Enabled')),$search_statut);
print '</td>'; print '</td>';
}*/ }*/
// Action column // Action column
print '<td class="liste_titre" align="right">'; print '<td class="liste_titre right">';
$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1); $searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
print $searchpicto; print $searchpicto;
print '</td>'; print '</td>';
@ -389,11 +390,17 @@ if ($resql)
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder); $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 $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint; print $hookmanager->resPrint;
if (! empty($arrayfields['t.datec']['checked'])) print_liste_field_titre($arrayfields['t.datec']['label'], $_SERVER["PHP_SELF"], "t.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); if (! empty($arrayfields['t.datec']['checked'])) {
if (! empty($arrayfields['t.tms']['checked'])) print_liste_field_titre($arrayfields['t.tms']['label'], $_SERVER["PHP_SELF"], "t.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['t.datec']['label'], $_SERVER["PHP_SELF"], "t.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
//if (! empty($arrayfields['t.status']['checked'])) print_liste_field_titre($arrayfields['t.status']['label'],$_SERVER["PHP_SELF"],"t.status","",$param,'align="center"',$sortfield,$sortorder); }
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); if (! empty($arrayfields['t.tms']['checked'])) {
print '</tr>'."\n"; print_liste_field_titre($arrayfields['t.tms']['label'], $_SERVER["PHP_SELF"], "t.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
}
//if (! empty($arrayfields['t.status']['checked'])) {
// print_liste_field_titre($arrayfields['t.status']['label'], $_SERVER["PHP_SELF"], "t.status", "", $param, '', $sortfield, $sortorder, 'center ');
//}
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
print '</tr>'."\n";
$productlot = new Productlot($db); $productlot = new Productlot($db);
@ -464,7 +471,7 @@ if ($resql)
// Date creation // Date creation
if (! empty($arrayfields['t.datec']['checked'])) if (! empty($arrayfields['t.datec']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
print '</td>'; print '</td>';
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;
@ -472,7 +479,7 @@ if ($resql)
// Date modification // Date modification
if (! empty($arrayfields['t.tms']['checked'])) if (! empty($arrayfields['t.tms']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
print '</td>'; print '</td>';
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;
@ -482,11 +489,11 @@ if ($resql)
if (! empty($arrayfields['u.statut']['checked'])) if (! empty($arrayfields['u.statut']['checked']))
{ {
$userstatic->statut=$obj->statut; $userstatic->statut=$obj->statut;
print '<td align="center">'.$userstatic->getLibStatut(3).'</td>'; print '<td class="center">'.$userstatic->getLibStatut(3).'</td>';
}*/ }*/
// Action column // 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 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; $selected=0;
@ -514,9 +521,9 @@ if ($resql)
if ($num < $limit && empty($offset)) print '<td class="left">'.$langs->trans("Total").'</td>'; if ($num < $limit && empty($offset)) print '<td class="left">'.$langs->trans("Total").'</td>';
else print '<td class="left">'.$langs->trans("Totalforthispage").'</td>'; else print '<td class="left">'.$langs->trans("Totalforthispage").'</td>';
} }
elseif ($totalarray['totalhtfield'] == $i) print '<td align="right">'.price($totalarray['totalht']).'</td>'; elseif ($totalarray['totalhtfield'] == $i) print '<td class="right">'.price($totalarray['totalht']).'</td>';
elseif ($totalarray['totalvatfield'] == $i) print '<td align="right">'.price($totalarray['totalvat']).'</td>'; elseif ($totalarray['totalvatfield'] == $i) print '<td class="right">'.price($totalarray['totalvat']).'</td>';
elseif ($totalarray['totalttcfield'] == $i) print '<td align="right">'.price($totalarray['totalttc']).'</td>'; elseif ($totalarray['totalttcfield'] == $i) print '<td class="right">'.price($totalarray['totalttc']).'</td>';
else print '<td></td>'; else print '<td></td>';
} }
print '</tr>'; print '</tr>';

View File

@ -4,6 +4,7 @@
* Copyright (C) 2014 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2014 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2016 ATM Consulting <support@atm-consulting.fr> * Copyright (C) 2016 ATM Consulting <support@atm-consulting.fr>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -534,11 +535,11 @@ print '<td class="liste_titre"><input class="flat" type="text" name="sref" size=
print '<td class="liste_titre"><input class="flat" type="text" name="snom" size="8" value="'.dol_escape_htmltag($snom).'"></td>'; print '<td class="liste_titre"><input class="flat" type="text" name="snom" size="8" value="'.dol_escape_htmltag($snom).'"></td>';
if (!empty($conf->service->enabled) && $type == 1) print '<td class="liste_titre">&nbsp;</td>'; if (!empty($conf->service->enabled) && $type == 1) print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>'; print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre" align="right">&nbsp;</td>'; print '<td class="liste_titre right">&nbsp;</td>';
print '<td class="liste_titre" align="right">' . $langs->trans('AlertOnly') . '&nbsp;<input type="checkbox" id="salert" name="salert" ' . (!empty($alertchecked)?$alertchecked:'') . '></td>'; print '<td class="liste_titre right">' . $langs->trans('AlertOnly') . '&nbsp;<input type="checkbox" id="salert" name="salert" ' . (!empty($alertchecked)?$alertchecked:'') . '></td>';
print '<td class="liste_titre" align="right">' . $langs->trans('IncludeAlsoDraftOrders') . '&nbsp;<input type="checkbox" id="draftorder" name="draftorder" ' . (!empty($draftchecked)?$draftchecked:'') . '></td>'; print '<td class="liste_titre right">' . $langs->trans('IncludeAlsoDraftOrders') . '&nbsp;<input type="checkbox" id="draftorder" name="draftorder" ' . (!empty($draftchecked)?$draftchecked:'') . '></td>';
print '<td class="liste_titre">&nbsp;</td>'; print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre" align="right">'; print '<td class="liste_titre right">';
$searchpicto=$form->showFilterAndCheckAddButtons(0); $searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto; print $searchpicto;
print '</td>'; print '</td>';
@ -549,13 +550,13 @@ print '<tr class="liste_titre">';
print_liste_field_titre('<input type="checkbox" onClick="toggle(this)" />', $_SERVER["PHP_SELF"], ''); print_liste_field_titre('<input type="checkbox" onClick="toggle(this)" />', $_SERVER["PHP_SELF"], '');
print_liste_field_titre('Ref', $_SERVER["PHP_SELF"], 'p.ref', $param, '', '', $sortfield, $sortorder); 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); print_liste_field_titre('Label', $_SERVER["PHP_SELF"], 'p.label', $param, '', '', $sortfield, $sortorder);
if (!empty($conf->service->enabled) && $type == 1) print_liste_field_titre('Duration', $_SERVER["PHP_SELF"], 'p.duration', $param, '', 'align="center"', $sortfield, $sortorder); if (!empty($conf->service->enabled) && $type == 1) print_liste_field_titre('Duration', $_SERVER["PHP_SELF"], 'p.duration', $param, '', '', $sortfield, $sortorder, 'center ');
print_liste_field_titre('DesiredStock', $_SERVER["PHP_SELF"], 'p.desiredstock', $param, '', 'align="right"', $sortfield, $sortorder); print_liste_field_titre('DesiredStock', $_SERVER["PHP_SELF"], 'p.desiredstock', $param, '', '', $sortfield, $sortorder, 'right ');
print_liste_field_titre('StockLimitShort', $_SERVER["PHP_SELF"], 'p.seuil_stock_alerte', $param, '', 'align="right"', $sortfield, $sortorder); print_liste_field_titre('StockLimitShort', $_SERVER["PHP_SELF"], 'p.seuil_stock_alerte', $param, '', '', $sortfield, $sortorder, 'right ');
print_liste_field_titre($stocklabel, $_SERVER["PHP_SELF"], 'stock_physique', $param, '', 'align="right"', $sortfield, $sortorder); print_liste_field_titre($stocklabel, $_SERVER["PHP_SELF"], 'stock_physique', $param, '', '', $sortfield, $sortorder, 'right ');
print_liste_field_titre('Ordered', $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder); print_liste_field_titre('Ordered', $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'right ');
print_liste_field_titre('StockToBuy', $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder); print_liste_field_titre('StockToBuy', $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'right ');
print_liste_field_titre('SupplierRef', $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder); print_liste_field_titre('SupplierRef', $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'right ');
print "</tr>\n"; print "</tr>\n";
while ($i < ($limit ? min($num, $limit) : $num)) while ($i < ($limit ? min($num, $limit) : $num))
@ -660,27 +661,27 @@ while ($i < ($limit ? min($num, $limit) : $num))
} else { } else {
$duration = $objp->duration; $duration = $objp->duration;
} }
print '<td align="center">'.$duration.'</td>'; print '<td class="center">'.$duration.'</td>';
} }
// Desired stock // Desired stock
print '<td align="right">' . $desiredstock . '</td>'; print '<td class="right">' . $desiredstock . '</td>';
// Limit stock for alert // Limit stock for alert
print '<td align="right">' . $alertstock . '</td>'; print '<td class="right">' . $alertstock . '</td>';
// Current stock (all warehouses) // Current stock (all warehouses)
print '<td align="right">'. $warning . $stock. '</td>'; print '<td class="right">'. $warning . $stock. '</td>';
// Already ordered // Already ordered
print '<td align="right"><a href="replenishorders.php?sproduct=' . $prod->id . '">'. $ordered . '</a> ' . $picto. '</td>'; print '<td class="right"><a href="replenishorders.php?sproduct=' . $prod->id . '">'. $ordered . '</a> ' . $picto. '</td>';
// To order // To order
//print '<td align="right"><input type="text" name="tobuy'.$i.'" value="'.$stocktobuy.'" '.$disabled.'></td>'; //print '<td class="right"><input type="text" name="tobuy'.$i.'" value="'.$stocktobuy.'" '.$disabled.'></td>';
print '<td align="right"><input type="text" size="4" name="tobuy'.$i.'" value="'.$stocktobuy.'"></td>'; print '<td class="right"><input type="text" size="4" name="tobuy'.$i.'" value="'.$stocktobuy.'"></td>';
// Supplier // Supplier
print '<td align="right">'. $form->select_product_fourn_price($prod->id, 'fourn'.$i, $fk_supplier).'</td>'; print '<td class="right">'. $form->select_product_fourn_price($prod->id, 'fourn'.$i, $fk_supplier).'</td>';
print '</tr>'; print '</tr>';
} }

View File

@ -2,7 +2,7 @@
/* /*
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr> * Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2014 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2014 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -198,7 +198,7 @@ if ($resql)
'<td class="liste_titre">'. '<td class="liste_titre">'.
$form->selectDate($search_date, 'search_date', 0, 0, 1, '', 1, 0, 0, ''). $form->selectDate($search_date, 'search_date', 0, 0, 1, '', 1, 0, 0, '').
'</td>'. '</td>'.
'<td class="liste_titre" align="right">'; '<td class="liste_titre right">';
$searchpicto = $form->showFilterAndCheckAddButtons(0); $searchpicto = $form->showFilterAndCheckAddButtons(0);
print $searchpicto; print $searchpicto;
print '</td>'; print '</td>';
@ -261,9 +261,10 @@ if ($resql)
'cf.fk_statut', 'cf.fk_statut',
'', '',
$param, $param,
'align="right"', '',
$sortfield, $sortfield,
$sortorder $sortorder,
'right '
); );
print '</tr>'; print '</tr>';
@ -277,13 +278,12 @@ if ($resql)
if ($showline) if ($showline)
{ {
$href = DOL_URL_ROOT . '/fourn/commande/card.php?id=' . $obj->rowid; $href = DOL_URL_ROOT.'/fourn/commande/card.php?id='.$obj->rowid;
print '<tr>'. print '<tr>';
// Ref // Ref
'<td>'. print '<td>';
'<a href="' . $href . '">'. print '<a href="'.$href.'">'.img_object($langs->trans('ShowOrder'), 'order').' '.$obj->ref.'</a>';
img_object($langs->trans('ShowOrder'), 'order') . ' ' . $obj->ref. print '</td>';
'</a></td>';
// Company // Company
$href = DOL_URL_ROOT . '/fourn/card.php?socid=' . $obj->socid; $href = DOL_URL_ROOT . '/fourn/card.php?socid=' . $obj->socid;
@ -300,13 +300,9 @@ if ($resql)
} else { } else {
$txt = '&nbsp;'; $txt = '&nbsp;';
} }
print '<td>'. print '<td>'.$txt.'</td>';
$txt.
'</td>'.
// Amount // Amount
'<td>'. print '<td>'.price($obj->total_ttc).'</td>';
price($obj->total_ttc).
'</td>';
// Date // Date
if ($obj->dc) { if ($obj->dc) {
@ -314,14 +310,10 @@ if ($resql)
} else { } else {
$date = '-'; $date = '-';
} }
print '<td>'. print '<td>'.$date.'</td>';
$date.
'</td>'.
// Statut // Statut
'<td align="right">'. print '<td class="right">'.$commandestatic->LibStatut($obj->fk_statut, 5).'</td>';
$commandestatic->LibStatut($obj->fk_statut, 5). print '</tr>';
'</td>'.
'</tr>';
} }
$i++; $i++;
} }
@ -334,7 +326,7 @@ if ($resql)
} }
else else
{ {
dol_print_error($db); dol_print_error($db);
} }
// End of page // End of page

View File

@ -87,9 +87,9 @@ if ($result)
print "<tr class=\"liste_titre\">"; print "<tr class=\"liste_titre\">";
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "e.ref", "", "", "", $sortfield, $sortorder); print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "e.ref", "", "", "", $sortfield, $sortorder);
print_liste_field_titre("LocationSummary", $_SERVER["PHP_SELF"], "e.lieu", "", "", "", $sortfield, $sortorder); print_liste_field_titre("LocationSummary", $_SERVER["PHP_SELF"], "e.lieu", "", "", "", $sortfield, $sortorder);
print_liste_field_titre("EstimatedStockValue", $_SERVER["PHP_SELF"], "e.valo_pmp", '', '', 'align="right"', $sortfield, $sortorder); print_liste_field_titre("EstimatedStockValue", $_SERVER["PHP_SELF"], "e.valo_pmp", '', '', '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("EstimatedStockValueSell", $_SERVER["PHP_SELF"], "", '', '', 'align="right"', $sortfield, $sortorder); print_liste_field_titre("EstimatedStockValueSell", $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "e.statut", '', '', 'align="right"', $sortfield, $sortorder); print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "e.statut", '', '', '', $sortfield, $sortorder, 'right ');
print "</tr>\n"; print "</tr>\n";
if ($num) if ($num)
@ -104,17 +104,17 @@ if ($result)
print '<td><a href="card.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowWarehouse"), 'stock').' '.$objp->ref.'</a></td>'; print '<td><a href="card.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowWarehouse"), 'stock').' '.$objp->ref.'</a></td>';
print '<td>'.$objp->lieu.'</td>'; print '<td>'.$objp->lieu.'</td>';
// PMP value // PMP value
print '<td align="right">'; print '<td class="right">';
if (price2num($objp->estimatedvalue, 'MT')) print price(price2num($objp->estimatedvalue, 'MT'), 1); if (price2num($objp->estimatedvalue, 'MT')) print price(price2num($objp->estimatedvalue, 'MT'), 1);
else print ''; else print '';
print '</td>'; print '</td>';
// Selling value // Selling value
print '<td align="right">'; print '<td class="right">';
if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($objp->sellvalue, 'MT'), 1); if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($objp->sellvalue, 'MT'), 1);
else print $langs->trans("Variable"); else print $langs->trans("Variable");
print '</td>'; print '</td>';
// Status // Status
print '<td align="right">'.$entrepot->LibStatut($objp->statut, 5).'</td>'; print '<td class="right">'.$entrepot->LibStatut($objp->statut, 5).'</td>';
print "</tr>\n"; print "</tr>\n";
$total += price2num($objp->estimatedvalue, 'MU'); $total += price2num($objp->estimatedvalue, 'MU');
$totalsell += price2num($objp->sellvalue, 'MU'); $totalsell += price2num($objp->sellvalue, 'MU');
@ -123,10 +123,10 @@ if ($result)
} }
print '<tr class="liste_total">'; print '<tr class="liste_total">';
print '<td colspan="2" align="right">'.$langs->trans("Total").'</td>'; print '<td colspan="2" class="right">'.$langs->trans("Total").'</td>';
print '<td align="right">'.price(price2num($total, 'MT'), 1, $langs, 0, 0, -1, $conf->currency).'</td>'; print '<td class="right">'.price(price2num($total, 'MT'), 1, $langs, 0, 0, -1, $conf->currency).'</td>';
print '<td align="right">'.price(price2num($totalsell, 'MT'), 1, $langs, 0, 0, -1, $conf->currency).'</td>'; print '<td class="right">'.price(price2num($totalsell, 'MT'), 1, $langs, 0, 0, -1, $conf->currency).'</td>';
print '<td align="right">&nbsp;</td>'; print '<td class="right">&nbsp;</td>';
print "</tr>\n"; print "</tr>\n";
} }

View File

@ -127,7 +127,7 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td width="50%">'.$langs->trans('ActivityOnProjectToday').'</td>'; print '<td width="50%">'.$langs->trans('ActivityOnProjectToday').'</td>';
print '<td width="50%" align="right">'.$langs->trans("Time").'</td>'; print '<td width="50%" class="right">'.$langs->trans("Time").'</td>';
print "</tr>\n"; print "</tr>\n";
$sql = "SELECT p.rowid, p.ref, p.title, p.public, SUM(tt.task_duration) as nb"; $sql = "SELECT p.rowid, p.ref, p.title, p.public, SUM(tt.task_duration) as nb";
@ -157,7 +157,7 @@ if ( $resql )
$projectstatic->public=$row->public; $projectstatic->public=$row->public;
print $projectstatic->getNomUrl(1, '', 1); print $projectstatic->getNomUrl(1, '', 1);
print '</td>'; print '</td>';
print '<td align="right">'.convertSecondToTime($row->nb, 'allhourmin').'</td>'; print '<td class="right">'.convertSecondToTime($row->nb, 'allhourmin').'</td>';
print "</tr>\n"; print "</tr>\n";
$total += $row->nb; $total += $row->nb;
} }
@ -170,7 +170,7 @@ else
} }
print '<tr class="liste_total">'; print '<tr class="liste_total">';
print '<td>'.$langs->trans('Total').'</td>'; print '<td>'.$langs->trans('Total').'</td>';
print '<td align="right">'.convertSecondToTime($total, 'allhourmin').'</td>'; print '<td class="right">'.convertSecondToTime($total, 'allhourmin').'</td>';
print "</tr>\n"; print "</tr>\n";
print "</table>"; print "</table>";
@ -182,7 +182,7 @@ print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans('ActivityOnProjectYesterday').'</td>'; print '<td>'.$langs->trans('ActivityOnProjectYesterday').'</td>';
print '<td align="right">'.$langs->trans("Time").'</td>'; print '<td class="right">'.$langs->trans("Time").'</td>';
print "</tr>\n"; print "</tr>\n";
$sql = "SELECT p.rowid, p.ref, p.title, p.public, SUM(tt.task_duration) as nb"; $sql = "SELECT p.rowid, p.ref, p.title, p.public, SUM(tt.task_duration) as nb";
@ -212,7 +212,7 @@ if ( $resql )
$projectstatic->public=$row->public; $projectstatic->public=$row->public;
print $projectstatic->getNomUrl(1, '', 1); print $projectstatic->getNomUrl(1, '', 1);
print '</td>'; print '</td>';
print '<td align="right">'.convertSecondToTime($row->nb, 'allhourmin').'</td>'; print '<td class="right">'.convertSecondToTime($row->nb, 'allhourmin').'</td>';
print "</tr>\n"; print "</tr>\n";
$total += $row->nb; $total += $row->nb;
} }
@ -225,7 +225,7 @@ else
} }
print '<tr class="liste_total">'; print '<tr class="liste_total">';
print '<td>'.$langs->trans('Total').'</td>'; print '<td>'.$langs->trans('Total').'</td>';
print '<td align="right">'.convertSecondToTime($total, 'allhourmin').'</td>'; print '<td class="right">'.convertSecondToTime($total, 'allhourmin').'</td>';
print "</tr>\n"; print "</tr>\n";
print "</table>"; print "</table>";
@ -240,7 +240,7 @@ if ($db->type != 'pgsql')
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("ActivityOnProjectThisWeek").'</td>'; print '<td>'.$langs->trans("ActivityOnProjectThisWeek").'</td>';
print '<td align="right">'.$langs->trans("Time").'</td>'; print '<td class="right">'.$langs->trans("Time").'</td>';
print "</tr>\n"; print "</tr>\n";
$sql = "SELECT p.rowid, p.ref, p.title, p.public, SUM(tt.task_duration) as nb"; $sql = "SELECT p.rowid, p.ref, p.title, p.public, SUM(tt.task_duration) as nb";
@ -270,7 +270,7 @@ if ($db->type != 'pgsql')
$projectstatic->public=$row->public; $projectstatic->public=$row->public;
print $projectstatic->getNomUrl(1, '', 1); print $projectstatic->getNomUrl(1, '', 1);
print '</td>'; print '</td>';
print '<td align="right">'.convertSecondToTime($row->nb, 'allhourmin').'</td>'; print '<td class="right">'.convertSecondToTime($row->nb, 'allhourmin').'</td>';
print "</tr>\n"; print "</tr>\n";
$total += $row->nb; $total += $row->nb;
} }
@ -283,7 +283,7 @@ if ($db->type != 'pgsql')
} }
print '<tr class="liste_total">'; print '<tr class="liste_total">';
print '<td>'.$langs->trans('Total').'</td>'; print '<td>'.$langs->trans('Total').'</td>';
print '<td align="right">'.convertSecondToTime($total, 'allhourmin').'</td>'; print '<td class="right">'.convertSecondToTime($total, 'allhourmin').'</td>';
print "</tr>\n"; print "</tr>\n";
print "</table><br>"; print "</table><br>";
@ -296,7 +296,7 @@ if (! empty($conf->global->PROJECT_TASK_TIME_MONTH))
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("ActivityOnProjectThisMonth").': '.dol_print_date($now, "%B %Y").'</td>'; print '<td>'.$langs->trans("ActivityOnProjectThisMonth").': '.dol_print_date($now, "%B %Y").'</td>';
print '<td align="right">'.$langs->trans("Time").'</td>'; print '<td class="right">'.$langs->trans("Time").'</td>';
print "</tr>\n"; print "</tr>\n";
$sql = "SELECT p.rowid, p.ref, p.title, p.public, SUM(tt.task_duration) as nb"; $sql = "SELECT p.rowid, p.ref, p.title, p.public, SUM(tt.task_duration) as nb";
@ -323,7 +323,7 @@ if (! empty($conf->global->PROJECT_TASK_TIME_MONTH))
$projectstatic->title=$row->title; $projectstatic->title=$row->title;
print $projectstatic->getNomUrl(1, '', 1); print $projectstatic->getNomUrl(1, '', 1);
print '</td>'; print '</td>';
print '<td align="right">'.convertSecondToTime($row->nb, 'allhourmin').'</td>'; print '<td class="right">'.convertSecondToTime($row->nb, 'allhourmin').'</td>';
print "</tr>\n"; print "</tr>\n";
} }
$db->free($resql); $db->free($resql);
@ -334,7 +334,7 @@ if (! empty($conf->global->PROJECT_TASK_TIME_MONTH))
} }
print '<tr class="liste_total">'; print '<tr class="liste_total">';
print '<td>'.$langs->trans('Total').'</td>'; print '<td>'.$langs->trans('Total').'</td>';
print '<td align="right">'.convertSecondToTime($total, 'allhourmin').'</td>'; print '<td class="right">'.convertSecondToTime($total, 'allhourmin').'</td>';
print "</tr>\n"; print "</tr>\n";
print "</table>"; print "</table>";
} }
@ -345,7 +345,7 @@ if (! empty($conf->global->PROJECT_TASK_TIME_YEAR))
print '<br><table class="noborder" width="100%">'; print '<br><table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("ActivityOnProjectThisYear").': '.strftime("%Y", $now).'</td>'; print '<td>'.$langs->trans("ActivityOnProjectThisYear").': '.strftime("%Y", $now).'</td>';
print '<td align="right">'.$langs->trans("Time").'</td>'; print '<td class="right">'.$langs->trans("Time").'</td>';
print "</tr>\n"; print "</tr>\n";
$sql = "SELECT p.rowid, p.ref, p.title, p.public, SUM(tt.task_duration) as nb"; $sql = "SELECT p.rowid, p.ref, p.title, p.public, SUM(tt.task_duration) as nb";
@ -373,7 +373,7 @@ if (! empty($conf->global->PROJECT_TASK_TIME_YEAR))
$projectstatic->public=$row->public; $projectstatic->public=$row->public;
print $projectstatic->getNomUrl(1, '', 1); print $projectstatic->getNomUrl(1, '', 1);
print '</td>'; print '</td>';
print '<td align="right">'.convertSecondToTime($row->nb, 'allhourmin').'</td>'; print '<td class="right">'.convertSecondToTime($row->nb, 'allhourmin').'</td>';
print "</tr>\n"; print "</tr>\n";
} }
$db->free($resql); $db->free($resql);
@ -384,7 +384,7 @@ if (! empty($conf->global->PROJECT_TASK_TIME_YEAR))
} }
print '<tr class="liste_total">'; print '<tr class="liste_total">';
print '<td>'.$langs->trans('Total').'</td>'; print '<td>'.$langs->trans('Total').'</td>';
print '<td align="right">'.convertSecondToTime($total, 'allhourmin').'</td>'; print '<td class="right">'.convertSecondToTime($total, 'allhourmin').'</td>';
print "</tr>\n"; print "</tr>\n";
print "</table>"; print "</table>";
} }
@ -467,12 +467,12 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_S
print '<th>'.$langs->trans('OpenedProjects').'</th>'; print '<th>'.$langs->trans('OpenedProjects').'</th>';
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) print '<th>'.$langs->trans('OpportunityStatus').'</th>'; if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) print '<th>'.$langs->trans('OpportunityStatus').'</th>';
print '<th>'.$langs->trans('Task').'</th>'; print '<th>'.$langs->trans('Task').'</th>';
print '<th align="center">'.$langs->trans('DateStart').'</th>'; print '<th class="center">'.$langs->trans('DateStart').'</th>';
print '<th align="center">'.$langs->trans('DateEnd').'</th>'; print '<th class="center">'.$langs->trans('DateEnd').'</th>';
print '<th align="right">'.$langs->trans('PlannedWorkload').'</th>'; print '<th class="right">'.$langs->trans('PlannedWorkload').'</th>';
print '<th align="right">'.$langs->trans('TimeSpent').'</th>'; print '<th class="right">'.$langs->trans('TimeSpent').'</th>';
print '<th align="right">'.$langs->trans("ProgressCalculated").'</td>'; print '<th class="right">'.$langs->trans("ProgressCalculated").'</td>';
print '<th align="right">'.$langs->trans("ProgressDeclared").'</td>'; print '<th class="right">'.$langs->trans("ProgressDeclared").'</td>';
print '</tr>'; print '</tr>';
while ($i < $num && $i < $max) while ($i < $num && $i < $max)
@ -522,18 +522,18 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_S
$taskstatic->fk_statut = $obj->status; $taskstatic->fk_statut = $obj->status;
$taskstatic->dateo = $db->jdate($obj->dateo); $taskstatic->dateo = $db->jdate($obj->dateo);
$taskstatic->datee = $db->jdate($obj->datee); $taskstatic->datee = $db->jdate($obj->datee);
print '<td align="center">'.dol_print_date($db->jdate($obj->dateo), 'day').'</td>'; print '<td class="center">'.dol_print_date($db->jdate($obj->dateo), 'day').'</td>';
print '<td align="center">'.dol_print_date($db->jdate($obj->datee), 'day'); print '<td class="center">'.dol_print_date($db->jdate($obj->datee), 'day');
print dol_print_date($obj->date_end, 'dayhour'); print dol_print_date($obj->date_end, 'dayhour');
if ($taskstatic->hasDelay()) print img_warning($langs->trans("Late")); if ($taskstatic->hasDelay()) print img_warning($langs->trans("Late"));
print '</td>'; print '</td>';
print '<td align="right"><a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$obj->taskid.'&withproject=1">'; print '<td class="right"><a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$obj->taskid.'&withproject=1">';
print convertSecondToTime($obj->planned_workload, 'allhourmin'); print convertSecondToTime($obj->planned_workload, 'allhourmin');
print '</a></td>'; print '</a></td>';
print '<td align="right"><a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$obj->taskid.'&withproject=1">'; print '<td class="right"><a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$obj->taskid.'&withproject=1">';
print convertSecondToTime($obj->timespent, 'allhourmin'); print convertSecondToTime($obj->timespent, 'allhourmin');
print '</a></td>'; print '</a></td>';
print '<td align="right">'; print '<td class="right">';
if (! empty($obj->taskid)) if (! empty($obj->taskid))
{ {
if (empty($obj->planned_workload) > 0) { if (empty($obj->planned_workload) > 0) {
@ -544,7 +544,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_S
} }
print $percentcompletion; print $percentcompletion;
print '</td>'; print '</td>';
print '<td align="right">'; print '<td class="right">';
print ($obj->taskid>0)?$obj->progress.'%':''; print ($obj->taskid>0)?$obj->progress.'%':'';
print '</td>'; print '</td>';
print "</tr>\n"; print "</tr>\n";

View File

@ -485,7 +485,7 @@ print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>'; print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>'; print '<td class="liste_titre"></td>';
// Action column // Action column
print '<td class="liste_titre nowrap" align="right">'; print '<td class="liste_titre nowrap right">';
$searchpicto=$form->showFilterAndCheckAddButtons(0); $searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto; print $searchpicto;
print '</td>'; print '</td>';
@ -495,13 +495,13 @@ print '<tr class="liste_titre">';
if (! empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) print '<td>'.$langs->trans("Project").'</td>'; if (! empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) print '<td>'.$langs->trans("Project").'</td>';
if (! empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) print '<td>'.$langs->trans("ThirdParty").'</td>'; if (! empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) print '<td>'.$langs->trans("ThirdParty").'</td>';
print '<td>'.$langs->trans("Task").'</td>'; print '<td>'.$langs->trans("Task").'</td>';
print '<td align="right" class="leftborder plannedworkload maxwidth100">'.$langs->trans("PlannedWorkload").'</td>'; print '<td class="right leftborder plannedworkload maxwidth100">'.$langs->trans("PlannedWorkload").'</td>';
print '<td align="right" class="maxwidth100">'.$langs->trans("ProgressDeclared").'</td>'; print '<td class="right maxwidth100">'.$langs->trans("ProgressDeclared").'</td>';
/*print '<td align="right" class="maxwidth100">'.$langs->trans("TimeSpent").'</td>'; /*print '<td class="right maxwidth100">'.$langs->trans("TimeSpent").'</td>';
if ($usertoprocess->id == $user->id) print '<td align="right" class="maxwidth100">'.$langs->trans("TimeSpentByYou").'</td>'; if ($usertoprocess->id == $user->id) print '<td class="right maxwidth100">'.$langs->trans("TimeSpentByYou").'</td>';
else print '<td align="right" class="maxwidth100">'.$langs->trans("TimeSpentByUser").'</td>';*/ else print '<td class="right maxwidth100">'.$langs->trans("TimeSpentByUser").'</td>';*/
print '<td align="right" class="maxwidth100">'.$langs->trans("TimeSpent").'<br>('.$langs->trans("Everybody").')</td>'; print '<td class="right maxwidth100">'.$langs->trans("TimeSpent").'<br>('.$langs->trans("Everybody").')</td>';
print '<td align="right" class="maxwidth100">'.$langs->trans("TimeSpent").($usertoprocess->firstname?'<br>('.$usertoprocess->firstname.')':'').'</td>'; print '<td class="right maxwidth100">'.$langs->trans("TimeSpent").($usertoprocess->firstname?'<br>('.$usertoprocess->firstname.')':'').'</td>';
print '<td class="center leftborder">'.$langs->trans("HourStart").'</td>'; print '<td class="center leftborder">'.$langs->trans("HourStart").'</td>';
// By default, we can edit only tasks we are assigned to // By default, we can edit only tasks we are assigned to

Some files were not shown because too many files have changed in this diff Show More