Merge pull request #8645 from grandoc/new_branch_19_04_2018
clean and update code
This commit is contained in:
commit
a29a5fad0a
@ -28,6 +28,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("compta","bills","accountancy"));
|
||||
|
||||
// Security check
|
||||
@ -136,7 +137,6 @@ if ($result) {
|
||||
$form = new Form($db);
|
||||
$formaccounting = new FormAccounting($db);
|
||||
|
||||
$var = true;
|
||||
while ( $i < min($num_lines, $limit) ) {
|
||||
$objp = $db->fetch_object($result);
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
@ -34,6 +34,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("companies","compta","accountancy","products"));
|
||||
|
||||
// Security check
|
||||
@ -354,7 +355,6 @@ if ($result)
|
||||
|
||||
$product_static = new Product($db);
|
||||
|
||||
$var = true;
|
||||
$i=0;
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
|
||||
@ -29,7 +29,8 @@ require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
|
||||
$langs->loadLangs(array("compta","bills","other","accountancy"));
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("bills","compta","accountancy","other"));
|
||||
|
||||
// Filter
|
||||
$year = GETPOST("year",'int');
|
||||
@ -69,8 +70,6 @@ if ($result) {
|
||||
|
||||
$y = $year_current;
|
||||
|
||||
$var = true;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width=150>' . $langs->trans("Label") . '</td><td align="center">' . $langs->trans("JanuaryMin") . '</td><td align="center">' . $langs->trans("FebruaryMin") . '</td><td align="center">' . $langs->trans("MarchMin") . '</td><td align="center">' . $langs->trans("AprilMin") . '</td><td align="center">' . $langs->trans("MayMin") . '</td><td align="center">' . $langs->trans("JuneMin") . '</td><td align="center">' . $langs->trans("JulyMin") . '</td><td align="center">' . $langs->trans("AugustMin") . '</td><td align="center">' . $langs->trans("SeptemberMin") . '</td><td align="center">' . $langs->trans("OctoberMin") . '</td><td align="center">' . $langs->trans("NovemberMin") . '</td><td align="center">' . $langs->trans("DecemberMin") . '</td><td align="center"><b>Total</b></td></tr>';
|
||||
|
||||
@ -102,7 +101,7 @@ if ($resql) {
|
||||
|
||||
$row = $db->fetch_row($resql);
|
||||
|
||||
print '<tr><td width="14%">' . length_accountg($row[0]) . '</td>';
|
||||
print '<tr class="oddeven"><td width="14%">' . length_accountg($row[0]) . '</td>';
|
||||
print '<td align="right" width="6.5%">' . price($row[1]) . '</td>';
|
||||
print '<td align="right" width="6.5%">' . price($row[2]) . '</td>';
|
||||
print '<td align="right" width="6.5%">' . price($row[3]) . '</td>';
|
||||
|
||||
@ -35,7 +35,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
|
||||
$langs->loadLangs(array("compta","bills","other","accountancy","productbatch"));
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("bills","compta","accountancy","other","productbatch"));
|
||||
|
||||
$action=GETPOST('action','alpha');
|
||||
$massaction=GETPOST('massaction','alpha');
|
||||
|
||||
@ -34,7 +34,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
|
||||
$langs->loadLangs(array("compta","bills","other","trips","accountancy","productbatch"));
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("bills","compta","accountancy","other","trips","productbatch"));
|
||||
|
||||
$action=GETPOST('action','alpha');
|
||||
$massaction=GETPOST('massaction','alpha');
|
||||
@ -337,7 +338,6 @@ if ($result) {
|
||||
$expensereport_static = new ExpenseReport($db);
|
||||
$form = new Form($db);
|
||||
|
||||
$var = true;
|
||||
while ( $i < min($num_lines, $limit) ) {
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
|
||||
@ -35,7 +35,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
|
||||
$langs->loadLangs(array("compta","bills","other","accountancy","productbatch"));
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("bills","compta","accountancy","other","productbatch"));
|
||||
|
||||
$action=GETPOST('action','alpha');
|
||||
$massaction=GETPOST('massaction','alpha');
|
||||
|
||||
@ -1588,7 +1588,7 @@ else
|
||||
|
||||
if ($action != 'editline' || GETPOST('rowid') != $objp->rowid)
|
||||
{
|
||||
print '<tr '.$bcnd[$var].' class="tdtop">';
|
||||
print '<tr class="tdtop oddeven">';
|
||||
// Label
|
||||
if ($objp->fk_product > 0)
|
||||
{
|
||||
@ -1684,7 +1684,7 @@ else
|
||||
$colspan = 7;
|
||||
}
|
||||
|
||||
print '<tr '.$bcnd[$var].'>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td colspan="'.$colspan.'">';
|
||||
|
||||
// Date planned
|
||||
@ -1721,14 +1721,14 @@ else
|
||||
if (is_array($extralabelslines) && count($extralabelslines)>0) {
|
||||
$line = new ContratLigne($db);
|
||||
$line->fetch_optionals($objp->rowid);
|
||||
print $line->showOptionals($extrafieldsline, 'view', array('style'=>$bcnd[$var], 'colspan'=>$colspan), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
|
||||
print $line->showOptionals($extrafieldsline, 'view', array('style'=>'class="oddeven"', 'colspan'=>$colspan), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
|
||||
}
|
||||
}
|
||||
// Ligne en mode update
|
||||
else
|
||||
{
|
||||
// Ligne carac
|
||||
print "<tr ".$bcnd[$var].">";
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
if ($objp->fk_product)
|
||||
{
|
||||
@ -1783,7 +1783,7 @@ else
|
||||
if($conf->global->PRODUCT_USE_UNITS) $colspan++;
|
||||
|
||||
// Ligne dates prevues
|
||||
print "<tr ".$bcnd[$var].">";
|
||||
print '<tr class="oddeven">';
|
||||
print '<td colspan="'.$colspan.'">';
|
||||
print $langs->trans("DateStartPlanned").' ';
|
||||
$form->select_date($db->jdate($objp->date_debut),"date_start_update",$usehm,$usehm,($db->jdate($objp->date_debut)>0?0:1),"update");
|
||||
@ -1795,7 +1795,7 @@ else
|
||||
if (is_array($extralabelslines) && count($extralabelslines)>0) {
|
||||
$line = new ContratLigne($db);
|
||||
$line->fetch_optionals($objp->rowid);
|
||||
print $line->showOptionals($extrafieldsline, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$colspan), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
|
||||
print $line->showOptionals($extrafieldsline, 'edit', array('style'=>'class="oddeven"', 'colspan'=>$colspan), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1808,7 +1808,7 @@ else
|
||||
|
||||
if ($object->statut > 0)
|
||||
{
|
||||
print '<tr '.$bcnd[$var].'>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="tdhrthin" colspan="'.($conf->margin->enabled?7:6).'"><hr class="opacitymedium tdhrthin"></td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
@ -1886,7 +1886,7 @@ else
|
||||
{
|
||||
print '<table class="notopnoleftnoright tableforservicepart2'.($cursorline < $nbofservices ?' boxtablenobottom':'').'" width="100%">';
|
||||
|
||||
print '<tr '.$bcnd[$var].'>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("ServiceStatus").': '.$object->lines[$cursorline-1]->getLibStatut(4).'</td>';
|
||||
print '<td width="30" align="right">';
|
||||
if ($user->societe_id == 0)
|
||||
@ -1913,7 +1913,7 @@ else
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr '.$bcnd[$var].'>';
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
print '<td>';
|
||||
// Si pas encore active
|
||||
@ -1969,7 +1969,7 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
print '<tr '.$bc[false].'>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nohover">'.$langs->trans("DateServiceActivate").'</td><td class="nohover">';
|
||||
print $form->select_date($dateactstart,'',$usehm,$usehm,'',"active",1,0,1);
|
||||
print '</td>';
|
||||
@ -1981,7 +1981,7 @@ else
|
||||
|
||||
print '</tr>';
|
||||
|
||||
print '<tr '.$bc[false].'>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nohover">'.$langs->trans("Comment").'</td><td colspan="3" class="nohover" colspan="'.($conf->margin->enabled?4:3).'"><input size="80" type="text" name="comment" value="'.$_POST["comment"].'"></td>';
|
||||
print '<td class="nohover right">';
|
||||
print '<input type="submit" class="button" name="activate" value="'.$langs->trans("Activate").'"> ';
|
||||
@ -2026,7 +2026,7 @@ else
|
||||
$now=dol_now();
|
||||
if ($dateactend > $now) $dateactend=$now;
|
||||
|
||||
print '<tr '.$bc[false].'><td colspan="2" class="nohover">';
|
||||
print '<tr class="oddeven"><td colspan="2" class="nohover">';
|
||||
if ($objp->statut >= 4)
|
||||
{
|
||||
if ($objp->statut == 4)
|
||||
@ -2039,7 +2039,7 @@ else
|
||||
print '<td class="center nohover">';
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr '.$bc[false].'>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nohover">'.$langs->trans("Comment").'</td><td class="nohover"><input size="70" type="text" class="flat" name="comment" value="'.dol_escape_htmltag(GETPOST('comment', 'alpha')).'"></td>';
|
||||
print '<td class="nohover right">';
|
||||
print '<input type="submit" class="button" name="close" value="'.$langs->trans("Disable").'"> ';
|
||||
@ -2079,8 +2079,6 @@ else
|
||||
// Form to add new line
|
||||
if ($action != 'editline')
|
||||
{
|
||||
$var = true;
|
||||
|
||||
$forcetoshowtitlelines=1;
|
||||
|
||||
// Add free products/services
|
||||
@ -2201,8 +2199,7 @@ else
|
||||
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
|
||||
$genallowed = $user->rights->contrat->lire;
|
||||
$delallowed = $user->rights->contrat->creer;
|
||||
|
||||
$var = true;
|
||||
|
||||
|
||||
print $formfile->showdocuments('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user