Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop-work-on-warehouse-status
This commit is contained in:
commit
c911f906c8
@ -60,10 +60,10 @@ class AccountingAccount extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Load record in memory
|
* Load record in memory
|
||||||
*
|
*
|
||||||
* @param int $rowid Id
|
* @param int $rowid Id
|
||||||
* @param string $account_number Account number
|
* @param string $account_number Account number
|
||||||
* @param int $limittocurrentchart 1=Do not load record if it is into another accounting system
|
* @param int $limittocurrentchart 1=Do not load record if it is into another accounting system
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, Id of record if OK and found
|
||||||
*/
|
*/
|
||||||
function fetch($rowid = null, $account_number = null, $limittocurrentchart = 0) {
|
function fetch($rowid = null, $account_number = null, $limittocurrentchart = 0) {
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|||||||
@ -306,12 +306,12 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><th width="35%">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
|
print '<tr class="liste_titre"><th class="titlefield">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
|
||||||
|
|
||||||
// Name
|
// Name
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td class="fieldrequired"><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td class="fieldrequired"><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
|
||||||
print '<input name="nom" id="name" size="30" value="'. ($conf->global->MAIN_INFO_SOCIETE_NOM?$conf->global->MAIN_INFO_SOCIETE_NOM:$_POST["nom"]) . '" autofocus="autofocus"></td></tr>'."\n";
|
print '<input name="nom" id="name" class="minwidth200" value="'. ($conf->global->MAIN_INFO_SOCIETE_NOM?$conf->global->MAIN_INFO_SOCIETE_NOM:$_POST["nom"]) . '" autofocus="autofocus"></td></tr>'."\n";
|
||||||
|
|
||||||
// Addresse
|
// Addresse
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
@ -320,11 +320,11 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td><label for="zipcode">'.$langs->trans("CompanyZip").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="zipcode">'.$langs->trans("CompanyZip").'</label></td><td>';
|
||||||
print '<input name="zipcode" id="zipcode" value="'. ($conf->global->MAIN_INFO_SOCIETE_ZIP?$conf->global->MAIN_INFO_SOCIETE_ZIP:$_POST["zipcode"]) . '" size="10"></td></tr>'."\n";
|
print '<input class="minwidth100" name="zipcode" id="zipcode" value="'. ($conf->global->MAIN_INFO_SOCIETE_ZIP?$conf->global->MAIN_INFO_SOCIETE_ZIP:$_POST["zipcode"]) . '"></td></tr>'."\n";
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td><label for="town">'.$langs->trans("CompanyTown").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="town">'.$langs->trans("CompanyTown").'</label></td><td>';
|
||||||
print '<input name="town" id="town" size="30" value="'. ($conf->global->MAIN_INFO_SOCIETE_TOWN?$conf->global->MAIN_INFO_SOCIETE_TOWN:$_POST["town"]) . '"></td></tr>'."\n";
|
print '<input name="town" class="minwidth100" id="town" value="'. ($conf->global->MAIN_INFO_SOCIETE_TOWN?$conf->global->MAIN_INFO_SOCIETE_TOWN:$_POST["town"]) . '"></td></tr>'."\n";
|
||||||
|
|
||||||
// Country
|
// Country
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
@ -356,20 +356,20 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td><label for="email">'.$langs->trans("EMail").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="email">'.$langs->trans("EMail").'</label></td><td>';
|
||||||
print '<input name="mail" id="email" size="60" value="'. $conf->global->MAIN_INFO_SOCIETE_MAIL . '"></td></tr>';
|
print '<input name="mail" id="email" class="minwidth200" value="'. $conf->global->MAIN_INFO_SOCIETE_MAIL . '"></td></tr>';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
// Web
|
// Web
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td><label for="web">'.$langs->trans("Web").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="web">'.$langs->trans("Web").'</label></td><td>';
|
||||||
print '<input name="web" id="web" size="60" value="'. $conf->global->MAIN_INFO_SOCIETE_WEB . '"></td></tr>';
|
print '<input name="web" id="web" class="minwidth300" value="'. $conf->global->MAIN_INFO_SOCIETE_WEB . '"></td></tr>';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
// Barcode
|
// Barcode
|
||||||
if (! empty($conf->barcode->enabled)) {
|
if (! empty($conf->barcode->enabled)) {
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td><label for="barcode">'.$langs->trans("Gencod").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="barcode">'.$langs->trans("Gencod").'</label></td><td>';
|
||||||
print '<input name="barcode" id="barcode" size="40" value="'. $conf->global->MAIN_INFO_SOCIETE_GENCOD . '"></td></tr>';
|
print '<input name="barcode" id="barcode" class="minwidth150" value="'. $conf->global->MAIN_INFO_SOCIETE_GENCOD . '"></td></tr>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -377,7 +377,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr'.dol_bc($var,'hideonsmartphone').'><td><label for="logo">'.$langs->trans("Logo").' (png,jpg)</label></td><td>';
|
print '<tr'.dol_bc($var,'hideonsmartphone').'><td><label for="logo">'.$langs->trans("Logo").' (png,jpg)</label></td><td>';
|
||||||
print '<table width="100%" class="nobordernopadding"><tr class="nocellnopadd"><td valign="middle" class="nocellnopadd">';
|
print '<table width="100%" class="nobordernopadding"><tr class="nocellnopadd"><td valign="middle" class="nocellnopadd">';
|
||||||
print '<input type="file" class="flat" name="logo" id="logo" size="50">';
|
print '<input type="file" class="flat class=minwidth200" name="logo" id="logo">';
|
||||||
print '</td><td class="nocellnopadd" valign="middle" align="right">';
|
print '</td><td class="nocellnopadd" valign="middle" align="right">';
|
||||||
if (! empty($mysoc->logo_mini)) {
|
if (! empty($mysoc->logo_mini)) {
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=removelogo">'.img_delete($langs->trans("Delete")).'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=removelogo">'.img_delete($langs->trans("Delete")).'</a>';
|
||||||
@ -393,7 +393,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
|
|
||||||
// Note
|
// Note
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td valign="top"><label for="note">'.$langs->trans("Note").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td class="tdtop"><label for="note">'.$langs->trans("Note").'</label></td><td>';
|
||||||
print '<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.'">'.(! empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? $conf->global->MAIN_INFO_SOCIETE_NOTE : '').'</textarea></td></tr>';
|
print '<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.'">'.(! empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? $conf->global->MAIN_INFO_SOCIETE_NOTE : '').'</textarea></td></tr>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -410,13 +410,13 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
|
|
||||||
// Managing Director(s)
|
// Managing Director(s)
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%"><label for="director">'.$langs->trans("ManagingDirectors").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="director">'.$langs->trans("ManagingDirectors").'</label></td><td>';
|
||||||
print '<input name="MAIN_INFO_SOCIETE_MANAGERS" id="director" size="80" value="' . $conf->global->MAIN_INFO_SOCIETE_MANAGERS . '"></td></tr>';
|
print '<input name="MAIN_INFO_SOCIETE_MANAGERS" id="director" class="minwidth200" value="' . $conf->global->MAIN_INFO_SOCIETE_MANAGERS . '"></td></tr>';
|
||||||
|
|
||||||
// Capital
|
// Capital
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%"><label for="capital">'.$langs->trans("Capital").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="capital">'.$langs->trans("Capital").'</label></td><td>';
|
||||||
print '<input name="capital" id="capital" size="20" value="' . $conf->global->MAIN_INFO_CAPITAL . '"></td></tr>';
|
print '<input name="capital" id="capital" class="minwidth100" value="' . $conf->global->MAIN_INFO_CAPITAL . '"></td></tr>';
|
||||||
|
|
||||||
// Juridical Status
|
// Juridical Status
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
@ -432,10 +432,10 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
if ($langs->transcountry("ProfId1",$mysoc->country_code) != '-')
|
if ($langs->transcountry("ProfId1",$mysoc->country_code) != '-')
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%"><label for="profid1">'.$langs->transcountry("ProfId1",$mysoc->country_code).'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="profid1">'.$langs->transcountry("ProfId1",$mysoc->country_code).'</label></td><td>';
|
||||||
if (! empty($mysoc->country_code))
|
if (! empty($mysoc->country_code))
|
||||||
{
|
{
|
||||||
print '<input name="siren" id="profid1" size="20" value="' . (! empty($conf->global->MAIN_INFO_SIREN) ? $conf->global->MAIN_INFO_SIREN : '') . '">';
|
print '<input name="siren" id="profid1" class="minwidth200" value="' . (! empty($conf->global->MAIN_INFO_SIREN) ? $conf->global->MAIN_INFO_SIREN : '') . '">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -448,10 +448,10 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
if ($langs->transcountry("ProfId2",$mysoc->country_code) != '-')
|
if ($langs->transcountry("ProfId2",$mysoc->country_code) != '-')
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%"><label for="profid2">'.$langs->transcountry("ProfId2",$mysoc->country_code).'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="profid2">'.$langs->transcountry("ProfId2",$mysoc->country_code).'</label></td><td>';
|
||||||
if (! empty($mysoc->country_code))
|
if (! empty($mysoc->country_code))
|
||||||
{
|
{
|
||||||
print '<input name="siret" id="profid2" size="20" value="' . (! empty($conf->global->MAIN_INFO_SIRET) ? $conf->global->MAIN_INFO_SIRET : '' ) . '">';
|
print '<input name="siret" id="profid2" class="minwidth200" value="' . (! empty($conf->global->MAIN_INFO_SIRET) ? $conf->global->MAIN_INFO_SIRET : '' ) . '">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -464,10 +464,10 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
if ($langs->transcountry("ProfId3",$mysoc->country_code) != '-')
|
if ($langs->transcountry("ProfId3",$mysoc->country_code) != '-')
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%"><label for="profid3">'.$langs->transcountry("ProfId3",$mysoc->country_code).'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="profid3">'.$langs->transcountry("ProfId3",$mysoc->country_code).'</label></td><td>';
|
||||||
if (! empty($mysoc->country_code))
|
if (! empty($mysoc->country_code))
|
||||||
{
|
{
|
||||||
print '<input name="ape" id="profid3" size="20" value="' . (! empty($conf->global->MAIN_INFO_APE) ? $conf->global->MAIN_INFO_APE : '') . '">';
|
print '<input name="ape" id="profid3" class="minwidth200" value="' . (! empty($conf->global->MAIN_INFO_APE) ? $conf->global->MAIN_INFO_APE : '') . '">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -480,10 +480,10 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
if ($langs->transcountry("ProfId4",$mysoc->country_code) != '-')
|
if ($langs->transcountry("ProfId4",$mysoc->country_code) != '-')
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%"><label for="profid4">'.$langs->transcountry("ProfId4",$mysoc->country_code).'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="profid4">'.$langs->transcountry("ProfId4",$mysoc->country_code).'</label></td><td>';
|
||||||
if (! empty($mysoc->country_code))
|
if (! empty($mysoc->country_code))
|
||||||
{
|
{
|
||||||
print '<input name="rcs" id="profid4" size="20" value="' . (! empty($conf->global->MAIN_INFO_RCS) ? $conf->global->MAIN_INFO_RCS : '') . '">';
|
print '<input name="rcs" id="profid4" class="minwidth200" value="' . (! empty($conf->global->MAIN_INFO_RCS) ? $conf->global->MAIN_INFO_RCS : '') . '">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -496,10 +496,10 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
if ($langs->transcountry("ProfId5",$mysoc->country_code) != '-')
|
if ($langs->transcountry("ProfId5",$mysoc->country_code) != '-')
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%"><label for="profid5">'.$langs->transcountry("ProfId5",$mysoc->country_code).'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="profid5">'.$langs->transcountry("ProfId5",$mysoc->country_code).'</label></td><td>';
|
||||||
if (! empty($mysoc->country_code))
|
if (! empty($mysoc->country_code))
|
||||||
{
|
{
|
||||||
print '<input name="MAIN_INFO_PROFID5" id="profid5" size="20" value="' . (! empty($conf->global->MAIN_INFO_PROFID5) ? $conf->global->MAIN_INFO_PROFID5 : '') . '">';
|
print '<input name="MAIN_INFO_PROFID5" id="profid5" class="minwidth200" value="' . (! empty($conf->global->MAIN_INFO_PROFID5) ? $conf->global->MAIN_INFO_PROFID5 : '') . '">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -512,10 +512,10 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
if ($langs->transcountry("ProfId6",$mysoc->country_code) != '-')
|
if ($langs->transcountry("ProfId6",$mysoc->country_code) != '-')
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%"><label for="profid6">'.$langs->transcountry("ProfId6",$mysoc->country_code).'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="profid6">'.$langs->transcountry("ProfId6",$mysoc->country_code).'</label></td><td>';
|
||||||
if (! empty($mysoc->country_code))
|
if (! empty($mysoc->country_code))
|
||||||
{
|
{
|
||||||
print '<input name="MAIN_INFO_PROFID6" id="profid6" size="20" value="' . (! empty($conf->global->MAIN_INFO_PROFID6) ? $conf->global->MAIN_INFO_PROFID6 : '') . '">';
|
print '<input name="MAIN_INFO_PROFID6" id="profid6" class="minwidth200" value="' . (! empty($conf->global->MAIN_INFO_PROFID6) ? $conf->global->MAIN_INFO_PROFID6 : '') . '">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -526,13 +526,13 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
|
|
||||||
// TVA Intra
|
// TVA Intra
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%"><label for="intra_vat">'.$langs->trans("VATIntra").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="intra_vat">'.$langs->trans("VATIntra").'</label></td><td>';
|
||||||
print '<input name="tva" id="intra_vat" size="20" value="' . (! empty($conf->global->MAIN_INFO_TVAINTRA) ? $conf->global->MAIN_INFO_TVAINTRA : '') . '">';
|
print '<input name="tva" id="intra_vat" class="minwidth200" value="' . (! empty($conf->global->MAIN_INFO_TVAINTRA) ? $conf->global->MAIN_INFO_TVAINTRA : '') . '">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Object of the company
|
// Object of the company
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%"><label for="object">'.$langs->trans("CompanyObject").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="object">'.$langs->trans("CompanyObject").'</label></td><td>';
|
||||||
print '<textarea class="flat quatrevingtpercent" name="object" id="object" rows="'.ROWS_5.'">'.(! empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? $conf->global->MAIN_INFO_SOCIETE_OBJECT : '').'</textarea></td></tr>';
|
print '<textarea class="flat quatrevingtpercent" name="object" id="object" rows="'.ROWS_5.'">'.(! empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? $conf->global->MAIN_INFO_SOCIETE_OBJECT : '').'</textarea></td></tr>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -543,12 +543,12 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
print '<br>';
|
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("FiscalYearInformation").'</td><td>'.$langs->trans("Value").'</td>';
|
print '<td class="titlefield">'.$langs->trans("FiscalYearInformation").'</td><td>'.$langs->trans("Value").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%"><label for="fiscalmonthstart">'.$langs->trans("FiscalMonthStart").'</label></td><td>';
|
print '<tr '.$bc[$var].'><td><label for="fiscalmonthstart">'.$langs->trans("FiscalMonthStart").'</label></td><td>';
|
||||||
print $formother->select_month($conf->global->SOCIETE_FISCAL_MONTH_START,'fiscalmonthstart',0,1) . '</td></tr>';
|
print $formother->select_month($conf->global->SOCIETE_FISCAL_MONTH_START,'fiscalmonthstart',0,1) . '</td></tr>';
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
@ -558,7 +558,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
|||||||
print '<br>';
|
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("VATManagement").'</td><td>'.$langs->trans("Description").'</td>';
|
print '<td class="titlefield">'.$langs->trans("VATManagement").'</td><td>'.$langs->trans("Description").'</td>';
|
||||||
print '<td align="right"> </td>';
|
print '<td align="right"> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$var=true;
|
$var=true;
|
||||||
@ -699,19 +699,19 @@ else
|
|||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyName").'</td><td>';
|
print '<tr '.$bc[$var].'><td class="titlefield">'.$langs->trans("CompanyName").'</td><td>';
|
||||||
if (! empty($conf->global->MAIN_INFO_SOCIETE_NOM)) print $conf->global->MAIN_INFO_SOCIETE_NOM;
|
if (! empty($conf->global->MAIN_INFO_SOCIETE_NOM)) print $conf->global->MAIN_INFO_SOCIETE_NOM;
|
||||||
else print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyName")).'</font>';
|
else print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyName")).'</font>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyAddress").'</td><td>' . nl2br(empty($conf->global->MAIN_INFO_SOCIETE_ADDRESS)?'':$conf->global->MAIN_INFO_SOCIETE_ADDRESS) . '</td></tr>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyAddress").'</td><td>' . nl2br(empty($conf->global->MAIN_INFO_SOCIETE_ADDRESS)?'':$conf->global->MAIN_INFO_SOCIETE_ADDRESS) . '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyZip").'</td><td>' . (empty($conf->global->MAIN_INFO_SOCIETE_ZIP)?'':$conf->global->MAIN_INFO_SOCIETE_ZIP) . '</td></tr>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyZip").'</td><td>' . (empty($conf->global->MAIN_INFO_SOCIETE_ZIP)?'':$conf->global->MAIN_INFO_SOCIETE_ZIP) . '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyTown").'</td><td>' . (empty($conf->global->MAIN_INFO_SOCIETE_TOWN)?'':$conf->global->MAIN_INFO_SOCIETE_TOWN) . '</td></tr>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyTown").'</td><td>' . (empty($conf->global->MAIN_INFO_SOCIETE_TOWN)?'':$conf->global->MAIN_INFO_SOCIETE_TOWN) . '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyCountry").'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyCountry").'</td><td>';
|
||||||
@ -731,7 +731,7 @@ else
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyCurrency").'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyCurrency").'</td><td>';
|
||||||
print currency_name($conf->currency,1);
|
print currency_name($conf->currency,1);
|
||||||
print ' ('.$conf->currency;
|
print ' ('.$conf->currency;
|
||||||
print ($conf->currency != $langs->getCurrencySymbol($conf->currency) ? ' - '.$langs->getCurrencySymbol($conf->currency) : '');
|
print ($conf->currency != $langs->getCurrencySymbol($conf->currency) ? ' - '.$langs->getCurrencySymbol($conf->currency) : '');
|
||||||
@ -739,52 +739,54 @@ else
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Phone").'</td><td>' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_TEL,$mysoc->country_code) . '</td></tr>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("Phone").'</td><td>' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_TEL,$mysoc->country_code) . '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Fax").'</td><td>' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_FAX,$mysoc->country_code) . '</td></tr>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("Fax").'</td><td>' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_FAX,$mysoc->country_code) . '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Mail").'</td><td>' . dol_print_email($conf->global->MAIN_INFO_SOCIETE_MAIL,0,0,0,80) . '</td></tr>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("Mail").'</td><td>' . dol_print_email($conf->global->MAIN_INFO_SOCIETE_MAIL,0,0,0,80) . '</td></tr>';
|
||||||
|
|
||||||
// Web
|
// Web
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Web").'</td><td>' . dol_print_url($conf->global->MAIN_INFO_SOCIETE_WEB,'_blank',80) . '</td></tr>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("Web").'</td><td>' . dol_print_url($conf->global->MAIN_INFO_SOCIETE_WEB,'_blank',80) . '</td></tr>';
|
||||||
|
|
||||||
// Barcode
|
// Barcode
|
||||||
if (! empty($conf->barcode->enabled))
|
if (! empty($conf->barcode->enabled))
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Gencod").'</td><td>' . $conf->global->MAIN_INFO_SOCIETE_GENCOD . '</td></tr>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("Gencod").'</td><td>' . $conf->global->MAIN_INFO_SOCIETE_GENCOD . '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Logo
|
// Logo
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Logo").'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("Logo").'</td><td>';
|
||||||
|
|
||||||
print '<table width="100%" class="nobordernopadding"><tr class="nocellnopadd"><td valign="middle" class="nocellnopadd">';
|
$tagtd='tagtd ';
|
||||||
|
if ($conf->browser->layout == 'phone') $tagtd='';
|
||||||
|
print '<div class="tagtable centpercent"><div class="tagtr inline-block centpercent valignmiddle"><div class="'.$tagtd.'inline-block valignmiddle left">';
|
||||||
print $mysoc->logo;
|
print $mysoc->logo;
|
||||||
print '</td><td class="nocellnopadd" valign="center" align="right">';
|
print '</div><div class="'.$tagtd.'inline-block valignmiddle left">';
|
||||||
|
|
||||||
// It offers the generation of the thumbnail if it does not exist
|
// It offers the generation of the thumbnail if it does not exist
|
||||||
if (!is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini) && preg_match('/(\.jpg|\.jpeg|\.png)$/i',$mysoc->logo))
|
if (!is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini) && preg_match('/(\.jpg|\.jpeg|\.png)$/i',$mysoc->logo))
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=addthumb&file='.urlencode($mysoc->logo).'">'.img_picto($langs->trans('GenerateThumb'),'refresh').'</a> ';
|
print '<a class="img_logo" href="'.$_SERVER["PHP_SELF"].'?action=addthumb&file='.urlencode($mysoc->logo).'">'.img_picto($langs->trans('GenerateThumb'),'refresh').'</a> ';
|
||||||
}
|
}
|
||||||
else if ($mysoc->logo_mini && is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
|
else if ($mysoc->logo_mini && is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
|
||||||
{
|
{
|
||||||
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('/thumbs/'.$mysoc->logo_mini).'">';
|
print '<img class="img_logo" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('/thumbs/'.$mysoc->logo_mini).'">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<img height="30" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
|
print '<img class="img_logo" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
|
||||||
}
|
}
|
||||||
print '</td></tr></table>';
|
print '</div></div></div>';
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%" valign="top">'.$langs->trans("Note").'</td><td>' . (! empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? nl2br($conf->global->MAIN_INFO_SOCIETE_NOTE) : '') . '</td></tr>';
|
print '<tr '.$bc[$var].'><td valign="top">'.$langs->trans("Note").'</td><td>' . (! empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? nl2br($conf->global->MAIN_INFO_SOCIETE_NOTE) : '') . '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
@ -796,22 +798,22 @@ else
|
|||||||
print '<form name="formsoc" method="post">';
|
print '<form name="formsoc" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
// Managing Director(s)
|
// Managing Director(s)
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("ManagingDirectors").'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("ManagingDirectors").'</td><td>';
|
||||||
print $conf->global->MAIN_INFO_SOCIETE_MANAGERS . '</td></tr>';
|
print $conf->global->MAIN_INFO_SOCIETE_MANAGERS . '</td></tr>';
|
||||||
|
|
||||||
// Capital
|
// Capital
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Capital").'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("Capital").'</td><td>';
|
||||||
print $conf->global->MAIN_INFO_CAPITAL . '</td></tr>';
|
print $conf->global->MAIN_INFO_CAPITAL . '</td></tr>';
|
||||||
|
|
||||||
// Juridical Status
|
// Juridical Status
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("JuridicalStatus").'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("JuridicalStatus").'</td><td>';
|
||||||
print getFormeJuridiqueLabel($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE);
|
print getFormeJuridiqueLabel($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -819,7 +821,7 @@ else
|
|||||||
if ($langs->transcountry("ProfId1",$mysoc->country_code) != '-')
|
if ($langs->transcountry("ProfId1",$mysoc->country_code) != '-')
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId1",$mysoc->country_code).'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->transcountry("ProfId1",$mysoc->country_code).'</td><td>';
|
||||||
if (! empty($conf->global->MAIN_INFO_SIREN))
|
if (! empty($conf->global->MAIN_INFO_SIREN))
|
||||||
{
|
{
|
||||||
print $conf->global->MAIN_INFO_SIREN;
|
print $conf->global->MAIN_INFO_SIREN;
|
||||||
@ -835,7 +837,7 @@ else
|
|||||||
if ($langs->transcountry("ProfId2",$mysoc->country_code) != '-')
|
if ($langs->transcountry("ProfId2",$mysoc->country_code) != '-')
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId2",$mysoc->country_code).'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->transcountry("ProfId2",$mysoc->country_code).'</td><td>';
|
||||||
if (! empty($conf->global->MAIN_INFO_SIRET))
|
if (! empty($conf->global->MAIN_INFO_SIRET))
|
||||||
{
|
{
|
||||||
print $conf->global->MAIN_INFO_SIRET;
|
print $conf->global->MAIN_INFO_SIRET;
|
||||||
@ -851,7 +853,7 @@ else
|
|||||||
if ($langs->transcountry("ProfId3",$mysoc->country_code) != '-')
|
if ($langs->transcountry("ProfId3",$mysoc->country_code) != '-')
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId3",$mysoc->country_code).'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->transcountry("ProfId3",$mysoc->country_code).'</td><td>';
|
||||||
if (! empty($conf->global->MAIN_INFO_APE))
|
if (! empty($conf->global->MAIN_INFO_APE))
|
||||||
{
|
{
|
||||||
print $conf->global->MAIN_INFO_APE;
|
print $conf->global->MAIN_INFO_APE;
|
||||||
@ -867,7 +869,7 @@ else
|
|||||||
if ($langs->transcountry("ProfId4",$mysoc->country_code) != '-')
|
if ($langs->transcountry("ProfId4",$mysoc->country_code) != '-')
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId4",$mysoc->country_code).'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->transcountry("ProfId4",$mysoc->country_code).'</td><td>';
|
||||||
if (! empty($conf->global->MAIN_INFO_RCS))
|
if (! empty($conf->global->MAIN_INFO_RCS))
|
||||||
{
|
{
|
||||||
print $conf->global->MAIN_INFO_RCS;
|
print $conf->global->MAIN_INFO_RCS;
|
||||||
@ -883,7 +885,7 @@ else
|
|||||||
if ($langs->transcountry("ProfId5",$mysoc->country_code) != '-')
|
if ($langs->transcountry("ProfId5",$mysoc->country_code) != '-')
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId5",$mysoc->country_code).'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->transcountry("ProfId5",$mysoc->country_code).'</td><td>';
|
||||||
if (! empty($conf->global->MAIN_INFO_PROFID5))
|
if (! empty($conf->global->MAIN_INFO_PROFID5))
|
||||||
{
|
{
|
||||||
print $conf->global->MAIN_INFO_PROFID5;
|
print $conf->global->MAIN_INFO_PROFID5;
|
||||||
@ -899,7 +901,7 @@ else
|
|||||||
if ($langs->transcountry("ProfId6",$mysoc->country_code) != '-')
|
if ($langs->transcountry("ProfId6",$mysoc->country_code) != '-')
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId6",$mysoc->country_code).'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->transcountry("ProfId6",$mysoc->country_code).'</td><td>';
|
||||||
if (! empty($conf->global->MAIN_INFO_PROFID6))
|
if (! empty($conf->global->MAIN_INFO_PROFID6))
|
||||||
{
|
{
|
||||||
print $conf->global->MAIN_INFO_PROFID6;
|
print $conf->global->MAIN_INFO_PROFID6;
|
||||||
@ -950,7 +952,7 @@ else
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%" valign="top">'.$langs->trans("CompanyObject").'</td><td>' . (! empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? nl2br($conf->global->MAIN_INFO_SOCIETE_OBJECT) : '') . '</td></tr>';
|
print '<tr '.$bc[$var].'><td valign="top">'.$langs->trans("CompanyObject").'</td><td>' . (! empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? nl2br($conf->global->MAIN_INFO_SOCIETE_OBJECT) : '') . '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
@ -961,12 +963,12 @@ else
|
|||||||
print '<br>';
|
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("FiscalYearInformation").'</td><td>'.$langs->trans("Value").'</td>';
|
print '<td class="titlefield">'.$langs->trans("FiscalYearInformation").'</td><td>'.$langs->trans("Value").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("FiscalMonthStart").'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("FiscalMonthStart").'</td><td>';
|
||||||
$monthstart=(! empty($conf->global->SOCIETE_FISCAL_MONTH_START)) ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1;
|
$monthstart=(! empty($conf->global->SOCIETE_FISCAL_MONTH_START)) ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1;
|
||||||
print dol_print_date(dol_mktime(12,0,0,$monthstart,1,2000,1),'%B','gm') . '</td></tr>';
|
print dol_print_date(dol_mktime(12,0,0,$monthstart,1,2000,1),'%B','gm') . '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -39,6 +39,7 @@ $langs->load("products");
|
|||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
$langs->load("projects");
|
$langs->load("projects");
|
||||||
$langs->load("hrm");
|
$langs->load("hrm");
|
||||||
|
$langs->load("agenda");
|
||||||
|
|
||||||
if (! $user->admin) accessforbidden();
|
if (! $user->admin) accessforbidden();
|
||||||
|
|
||||||
|
|||||||
@ -33,5 +33,5 @@ NETWORK:
|
|||||||
# If the browser is unable to retrieve the original content, the fallback resource will be used.
|
# If the browser is unable to retrieve the original content, the fallback resource will be used.
|
||||||
# In the example above, we display a static image in case the dynamic one is unavailable.
|
# In the example above, we display a static image in case the dynamic one is unavailable.
|
||||||
FALLBACK:
|
FALLBACK:
|
||||||
#/ public/offline.php
|
#/ public/notice.php
|
||||||
#theme/amarok/img/* theme/eldy/img/
|
#theme/eldy/img/* theme/md/img/*
|
||||||
|
|||||||
@ -670,6 +670,7 @@ class Propal extends CommonObject
|
|||||||
//Fetch current line from the database and then clone the object and set it in $oldline property
|
//Fetch current line from the database and then clone the object and set it in $oldline property
|
||||||
$line = new PropaleLigne($this->db);
|
$line = new PropaleLigne($this->db);
|
||||||
$line->fetch($rowid);
|
$line->fetch($rowid);
|
||||||
|
$line->fetch_optionals(); // Fetch extrafields for oldcopy
|
||||||
|
|
||||||
$staticline = clone $line;
|
$staticline = clone $line;
|
||||||
|
|
||||||
|
|||||||
@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||||
|
|
||||||
$langs->load("facture");
|
$langs->load("facture");
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
|
|||||||
@ -32,12 +32,21 @@ $langs->load('propal');
|
|||||||
$langs->load('compta');
|
$langs->load('compta');
|
||||||
|
|
||||||
$id=GETPOST('id','int');
|
$id=GETPOST('id','int');
|
||||||
|
$ref=GETPOST('ref','alpha');
|
||||||
$socid=GETPOST('socid','int');
|
$socid=GETPOST('socid','int');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (! empty($user->societe_id)) $socid=$user->societe_id;
|
if (! empty($user->societe_id)) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'propal', $id);
|
$result = restrictedArea($user, 'propal', $id);
|
||||||
|
|
||||||
|
$object = new Propal($db);
|
||||||
|
if (! $object->fetch($id, $ref) > 0)
|
||||||
|
{
|
||||||
|
dol_print_error($db);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
@ -47,8 +56,6 @@ $form = new Form($db);
|
|||||||
|
|
||||||
llxHeader('',$langs->trans('Proposal'),'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos');
|
llxHeader('',$langs->trans('Proposal'),'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos');
|
||||||
|
|
||||||
$object = new Propal($db);
|
|
||||||
$object->fetch($id);
|
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$head = propal_prepare_head($object);
|
$head = propal_prepare_head($object);
|
||||||
@ -112,7 +119,6 @@ print '<br>';
|
|||||||
|
|
||||||
dol_print_object_info($object);
|
dol_print_object_info($object);
|
||||||
|
|
||||||
print '</div>';
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|||||||
@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||||
|
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
$langs->load("sendings");
|
$langs->load("sendings");
|
||||||
@ -139,6 +140,8 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
if ($object->fetch($id, $ref) > 0)
|
if ($object->fetch($id, $ref) > 0)
|
||||||
{
|
{
|
||||||
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->fetch($object->socid);
|
$soc->fetch($object->socid);
|
||||||
|
|
||||||
@ -146,62 +149,60 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$head = commande_prepare_head($object);
|
$head = commande_prepare_head($object);
|
||||||
dol_fiche_head($head, 'contact', $langs->trans("CustomerOrder"), 0, 'order');
|
dol_fiche_head($head, 'contact', $langs->trans("CustomerOrder"), 0, 'order');
|
||||||
|
|
||||||
|
|
||||||
|
// Order card
|
||||||
|
|
||||||
|
$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||||
|
|
||||||
|
|
||||||
|
$morehtmlref='<div class="refidno">';
|
||||||
|
// Ref customer
|
||||||
|
$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
|
||||||
|
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
|
||||||
|
// Thirdparty
|
||||||
|
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1);
|
||||||
|
// Project
|
||||||
|
if (! empty($conf->projet->enabled))
|
||||||
|
{
|
||||||
|
$langs->load("projects");
|
||||||
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
|
if ($user->rights->commande->creer)
|
||||||
|
{
|
||||||
|
if ($action != 'classify')
|
||||||
|
//$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
$morehtmlref.=' : ';
|
||||||
|
if ($action == 'classify') {
|
||||||
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
$morehtmlref.='<input type="hidden" name="action" value="classin">';
|
||||||
|
$morehtmlref.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
$morehtmlref.=$formproject->select_projects($object->thirdparty->id, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
|
||||||
|
$morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
|
||||||
|
$morehtmlref.='</form>';
|
||||||
|
} else {
|
||||||
|
$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->thirdparty->id, $object->fk_project, 'none', 0, 0, 0, 1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (! empty($object->fk_project)) {
|
||||||
|
$proj = new Project($db);
|
||||||
|
$proj->fetch($object->fk_project);
|
||||||
|
$morehtmlref.='<a href="'.DOL_URL_ROOT.'/projet/card.php?id=' . $object->fk_project . '" title="' . $langs->trans('ShowProject') . '">';
|
||||||
|
$morehtmlref.=$proj->ref;
|
||||||
|
$morehtmlref.='</a>';
|
||||||
|
} else {
|
||||||
|
$morehtmlref.='';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$morehtmlref.='</div>';
|
||||||
|
|
||||||
/*
|
// Order card
|
||||||
* Facture synthese pour rappel
|
|
||||||
*/
|
|
||||||
print '<table class="border" width="100%">';
|
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/commande/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||||
|
|
||||||
|
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0, '', '', 1);
|
||||||
|
|
||||||
// Ref
|
dol_fiche_end();
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td colspan="3">';
|
|
||||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
|
|
||||||
print "</td></tr>";
|
|
||||||
|
|
||||||
// Ref commande client
|
|
||||||
print '<tr><td>';
|
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap">';
|
|
||||||
print $langs->trans('RefCustomer').'</td><td align="left">';
|
|
||||||
print '</td>';
|
|
||||||
print '</tr></table>';
|
|
||||||
print '</td><td colspan="3">';
|
|
||||||
print $object->ref_client;
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Customer
|
|
||||||
if (is_null($object->thirdparty)) $object->fetch_thirdparty();
|
|
||||||
|
|
||||||
print "<tr><td>".$langs->trans("Company")."</td>";
|
|
||||||
print '<td colspan="3">'.$object->thirdparty->getNomUrl(1).'</td></tr>';
|
|
||||||
|
|
||||||
// Delivery address
|
|
||||||
if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT))
|
|
||||||
{
|
|
||||||
print '<tr><td>';
|
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
|
||||||
print $langs->trans('DeliveryAddress');
|
|
||||||
print '</td>';
|
|
||||||
|
|
||||||
if ($action != 'editdelivery_address' && $object->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdelivery_address&socid='.$object->socid.'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetDeliveryAddress'),1).'</a></td>';
|
|
||||||
print '</tr></table>';
|
|
||||||
print '</td><td colspan="3">';
|
|
||||||
|
|
||||||
if ($action == 'editdelivery_address')
|
|
||||||
{
|
|
||||||
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid','int'),'fk_address','commande',$object->id);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid','int'),'none','commande',$object->id);
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print "</table>";
|
|
||||||
|
|
||||||
print '</div>';
|
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|||||||
@ -94,30 +94,79 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$head = commande_prepare_head($object);
|
$head = commande_prepare_head($object);
|
||||||
dol_fiche_head($head, 'documents', $langs->trans('CustomerOrder'), 0, 'order');
|
dol_fiche_head($head, 'documents', $langs->trans('CustomerOrder'), 0, 'order');
|
||||||
|
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Construit liste des fichiers
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
foreach($filearray as $key => $file)
|
foreach($filearray as $key => $file)
|
||||||
{
|
{
|
||||||
$totalsize+=$file['size'];
|
$totalsize+=$file['size'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Order card
|
||||||
|
|
||||||
|
$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||||
|
|
||||||
|
|
||||||
|
$morehtmlref='<div class="refidno">';
|
||||||
|
// Ref customer
|
||||||
|
$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
|
||||||
|
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
|
||||||
|
// Thirdparty
|
||||||
|
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
|
||||||
|
// Project
|
||||||
|
if (! empty($conf->projet->enabled))
|
||||||
|
{
|
||||||
|
$langs->load("projects");
|
||||||
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
|
if ($user->rights->commande->creer)
|
||||||
|
{
|
||||||
|
if ($action != 'classify')
|
||||||
|
//$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
$morehtmlref.=' : ';
|
||||||
|
if ($action == 'classify') {
|
||||||
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
$morehtmlref.='<input type="hidden" name="action" value="classin">';
|
||||||
|
$morehtmlref.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
$morehtmlref.=$formproject->select_projects($object->thirdparty->id, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
|
||||||
|
$morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
|
||||||
|
$morehtmlref.='</form>';
|
||||||
|
} else {
|
||||||
|
$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->thirdparty->id, $object->fk_project, 'none', 0, 0, 0, 1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (! empty($object->fk_project)) {
|
||||||
|
$proj = new Project($db);
|
||||||
|
$proj->fetch($object->fk_project);
|
||||||
|
$morehtmlref.='<a href="'.DOL_URL_ROOT.'/projet/card.php?id=' . $object->fk_project . '" title="' . $langs->trans('ShowProject') . '">';
|
||||||
|
$morehtmlref.=$proj->ref;
|
||||||
|
$morehtmlref.='</a>';
|
||||||
|
} else {
|
||||||
|
$morehtmlref.='';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$morehtmlref.='</div>';
|
||||||
|
|
||||||
|
// Order card
|
||||||
|
|
||||||
|
$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||||
|
|
||||||
|
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||||
|
|
||||||
|
print '<div class="fichecenter">';
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/commande/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
|
||||||
|
|
||||||
// Ref
|
|
||||||
print '<tr><td width="30%">'.$langs->trans('Ref').'</td><td colspan="3">';
|
|
||||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans('Company').'</td><td colspan="3">'.$object->thirdparty->getNomUrl(1).'</td></tr>';
|
|
||||||
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
|
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
print "</div>\n";
|
print "</div>\n";
|
||||||
|
|
||||||
|
print dol_fiche_end();
|
||||||
|
|
||||||
$modulepart = 'commande';
|
$modulepart = 'commande';
|
||||||
$permission = $user->rights->commande->creer;
|
$permission = $user->rights->commande->creer;
|
||||||
|
|||||||
@ -32,12 +32,21 @@ if (!$user->rights->commande->lire) accessforbidden();
|
|||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
$langs->load("sendings");
|
$langs->load("sendings");
|
||||||
|
|
||||||
// Security check
|
|
||||||
$socid=0;
|
$socid=0;
|
||||||
$comid = GETPOST("id",'int');
|
$comid = GETPOST("id",'int');
|
||||||
|
$id = GETPOST("id",'int');
|
||||||
|
$ref=GETPOST('ref','alpha');
|
||||||
|
|
||||||
|
// Security check
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'commande',$comid,'');
|
$result=restrictedArea($user,'commande',$comid,'');
|
||||||
|
|
||||||
|
$object = new Commande($db);
|
||||||
|
if (! $object->fetch($id, $ref) > 0)
|
||||||
|
{
|
||||||
|
dol_print_error($db);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -46,21 +55,76 @@ $result=restrictedArea($user,'commande',$comid,'');
|
|||||||
|
|
||||||
llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
|
llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
|
||||||
|
|
||||||
$commande = new Commande($db);
|
$object->fetch_thirdparty();
|
||||||
$commande->fetch($comid);
|
$object->info($object->id);
|
||||||
$commande->info($comid);
|
|
||||||
$soc = new Societe($db);
|
|
||||||
$soc->fetch($commande->socid);
|
|
||||||
|
|
||||||
$head = commande_prepare_head($commande);
|
$soc = new Societe($db);
|
||||||
|
$soc->fetch($object->thirdparty->id);
|
||||||
|
|
||||||
|
$head = commande_prepare_head($object);
|
||||||
dol_fiche_head($head, 'info', $langs->trans("CustomerOrder"), 0, 'order');
|
dol_fiche_head($head, 'info', $langs->trans("CustomerOrder"), 0, 'order');
|
||||||
|
|
||||||
|
// Order card
|
||||||
|
|
||||||
|
$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||||
|
|
||||||
|
|
||||||
|
$morehtmlref='<div class="refidno">';
|
||||||
|
// Ref customer
|
||||||
|
$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
|
||||||
|
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
|
||||||
|
// Thirdparty
|
||||||
|
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1);
|
||||||
|
// Project
|
||||||
|
if (! empty($conf->projet->enabled))
|
||||||
|
{
|
||||||
|
$langs->load("projects");
|
||||||
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
|
if ($user->rights->commande->creer)
|
||||||
|
{
|
||||||
|
if ($action != 'classify')
|
||||||
|
//$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
$morehtmlref.=' : ';
|
||||||
|
if ($action == 'classify') {
|
||||||
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
$morehtmlref.='<input type="hidden" name="action" value="classin">';
|
||||||
|
$morehtmlref.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
$morehtmlref.=$formproject->select_projects($object->thirdparty->id, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
|
||||||
|
$morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
|
||||||
|
$morehtmlref.='</form>';
|
||||||
|
} else {
|
||||||
|
$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->thirdparty->id, $object->fk_project, 'none', 0, 0, 0, 1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (! empty($object->fk_project)) {
|
||||||
|
$proj = new Project($db);
|
||||||
|
$proj->fetch($object->fk_project);
|
||||||
|
$morehtmlref.='<a href="'.DOL_URL_ROOT.'/projet/card.php?id=' . $object->fk_project . '" title="' . $langs->trans('ShowProject') . '">';
|
||||||
|
$morehtmlref.=$proj->ref;
|
||||||
|
$morehtmlref.='</a>';
|
||||||
|
} else {
|
||||||
|
$morehtmlref.='';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$morehtmlref.='</div>';
|
||||||
|
|
||||||
|
|
||||||
|
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||||
|
|
||||||
|
print '<div class="fichecenter">';
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
print '<table width="100%"><tr><td>';
|
print '<table width="100%"><tr><td>';
|
||||||
dol_print_object_info($commande);
|
dol_print_object_info($object);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -48,6 +48,7 @@ $object = new Commande($db);
|
|||||||
if (! $object->fetch($id, $ref) > 0)
|
if (! $object->fetch($id, $ref) > 0)
|
||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$permissionnote=$user->rights->commande->creer; // Used by the include of actions_setnotes.inc.php
|
$permissionnote=$user->rights->commande->creer; // Used by the include of actions_setnotes.inc.php
|
||||||
@ -77,38 +78,66 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
dol_fiche_head($head, 'note', $langs->trans("CustomerOrder"), 0, 'order');
|
dol_fiche_head($head, 'note', $langs->trans("CustomerOrder"), 0, 'order');
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
// Order card
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/commande/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||||
|
|
||||||
// Ref
|
|
||||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
$morehtmlref='<div class="refidno">';
|
||||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
|
// Ref customer
|
||||||
print "</td></tr>";
|
$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
|
||||||
|
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
|
||||||
// Ref commande client
|
// Thirdparty
|
||||||
print '<tr><td>';
|
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1);
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap">';
|
// Project
|
||||||
print $langs->trans('RefCustomer').'</td><td align="left">';
|
if (! empty($conf->projet->enabled))
|
||||||
print '</td>';
|
{
|
||||||
print '</tr></table>';
|
$langs->load("projects");
|
||||||
print '</td><td colspan="3">';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
print $object->ref_client;
|
if ($user->rights->commande->creer)
|
||||||
print '</td>';
|
{
|
||||||
print '</tr>';
|
if ($action != 'classify')
|
||||||
|
//$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
// Customer
|
$morehtmlref.=' : ';
|
||||||
print "<tr><td>".$langs->trans("Company")."</td>";
|
if ($action == 'classify') {
|
||||||
print '<td colspan="3">'.$soc->getNomUrl(1).'</td></tr>';
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
print "</table>";
|
$morehtmlref.='<input type="hidden" name="action" value="classin">';
|
||||||
|
$morehtmlref.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<br>';
|
$morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
|
||||||
|
$morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
|
||||||
|
$morehtmlref.='</form>';
|
||||||
|
} else {
|
||||||
|
$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (! empty($object->fk_project)) {
|
||||||
|
$proj = new Project($db);
|
||||||
|
$proj->fetch($object->fk_project);
|
||||||
|
$morehtmlref.='<a href="'.DOL_URL_ROOT.'/projet/card.php?id=' . $object->fk_project . '" title="' . $langs->trans('ShowProject') . '">';
|
||||||
|
$morehtmlref.=$proj->ref;
|
||||||
|
$morehtmlref.='</a>';
|
||||||
|
} else {
|
||||||
|
$morehtmlref.='';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$morehtmlref.='</div>';
|
||||||
|
|
||||||
|
|
||||||
|
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||||
|
|
||||||
|
|
||||||
|
print '<div class="fichecenter">';
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
|
|
||||||
$cssclass="titlefield";
|
$cssclass="titlefield";
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -898,7 +898,7 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Standard or deposit or proforma invoice
|
// Standard or deposit or proforma invoice, not from a Predefined template invoice
|
||||||
if (($_POST['type'] == Facture::TYPE_STANDARD || $_POST['type'] == Facture::TYPE_DEPOSIT || $_POST['type'] == Facture::TYPE_PROFORMA || ($_POST['type'] == Facture::TYPE_SITUATION && empty($_POST['situations']))) && GETPOST('fac_rec') <= 0)
|
if (($_POST['type'] == Facture::TYPE_STANDARD || $_POST['type'] == Facture::TYPE_DEPOSIT || $_POST['type'] == Facture::TYPE_PROFORMA || ($_POST['type'] == Facture::TYPE_SITUATION && empty($_POST['situations']))) && GETPOST('fac_rec') <= 0)
|
||||||
{
|
{
|
||||||
if (GETPOST('socid', 'int') < 1)
|
if (GETPOST('socid', 'int') < 1)
|
||||||
@ -2075,6 +2075,8 @@ if ($action == 'create')
|
|||||||
}
|
}
|
||||||
print '</tr>' . "\n";
|
print '</tr>' . "\n";
|
||||||
|
|
||||||
|
$exampletemplateinvoice=new FactureRec($db);
|
||||||
|
|
||||||
// Overwrite value if creation of invoice is from a predefined invoice
|
// Overwrite value if creation of invoice is from a predefined invoice
|
||||||
if (empty($origin) && empty($originid) && GETPOST('fac_rec','int') > 0)
|
if (empty($origin) && empty($originid) && GETPOST('fac_rec','int') > 0)
|
||||||
{
|
{
|
||||||
@ -2109,7 +2111,10 @@ if ($action == 'create')
|
|||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
print '<option value="' . $objp->rowid . '"';
|
print '<option value="' . $objp->rowid . '"';
|
||||||
if (GETPOST('fac_rec') == $objp->rowid)
|
if (GETPOST('fac_rec') == $objp->rowid)
|
||||||
print ' selected';
|
{
|
||||||
|
print ' selected';
|
||||||
|
$exampletemplateinvoice->fetch(GETPOST('fac_rec'));
|
||||||
|
}
|
||||||
print '>' . $objp->titre . ' (' . price($objp->total_ttc) . ' ' . $langs->trans("TTC") . ')</option>';
|
print '>' . $objp->titre . ' (' . price($objp->total_ttc) . ' ' . $langs->trans("TTC") . ')</option>';
|
||||||
$i ++;
|
$i ++;
|
||||||
}
|
}
|
||||||
@ -2387,9 +2392,10 @@ if ($action == 'create')
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
|
||||||
|
|
||||||
// Date invoice
|
// Date invoice
|
||||||
print '<tr><td class="fieldrequired">' . $langs->trans('DateInvoice') . '</td><td colspan="2">';
|
print '<tr><td class="fieldrequired">' . $langs->trans('DateInvoice') . '</td><td colspan="2">';
|
||||||
$datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
|
|
||||||
print $form->select_date($datefacture?$datefacture:$dateinvoice, '', '', '', '', "add", 1, 1, 1);
|
print $form->select_date($datefacture?$datefacture:$dateinvoice, '', '', '', '', "add", 1, 1, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -2474,9 +2480,39 @@ if ($action == 'create')
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Help of substitution key
|
||||||
|
$htmltext='';
|
||||||
|
if (GETPOST('fac_rec','int') > 0)
|
||||||
|
{
|
||||||
|
$dateexample=dol_now();
|
||||||
|
if (! empty($datefacture?$datefacture:$dateinvoice)) $dateexample=($datefacture?$datefacture:$dateinvoice);
|
||||||
|
$substitutionarray=array(
|
||||||
|
'__TOTAL_HT__' => $langs->trans("AmountHT").' ('.$langs->trans("Example").': '.price($exampletemplateinvoice->total_ht).')',
|
||||||
|
'__TOTAL_TTC__' => $langs->trans("AmountTTC").' ('.$langs->trans("Example").': '.price($exampletemplateinvoice->total_ttc).')',
|
||||||
|
'__INVOICE_PREVIOUS_MONTH__' => $langs->trans("PreviousMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, -1, 'm'),'%m').')',
|
||||||
|
'__INVOICE_MONTH__' => $langs->trans("MonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($dateexample,'%m').')',
|
||||||
|
'__INVOICE_NEXT_MONTH__' => $langs->trans("NextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, 1, 'm'),'%m').')',
|
||||||
|
'__INVOICE_PREVIOUS_MONTH_TEXT__' => $langs->trans("TextPreviousMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, -1, 'm'),'%B').')',
|
||||||
|
'__INVOICE_MONTH_TEXT__' => $langs->trans("TextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($dateexample,'%B').')',
|
||||||
|
'__INVOICE_NEXT_MONTH_TEXT__' => $langs->trans("TextNextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, 1, 'm'), '%B').')',
|
||||||
|
'__INVOICE_PREVIOUS_YEAR__' => $langs->trans("YearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, -1, 'y'),'%Y').')',
|
||||||
|
'__INVOICE_YEAR__' => $langs->trans("PreviousYearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($dateexample,'%Y').')',
|
||||||
|
'__INVOICE_NEXT_YEAR__' => $langs->trans("NextYearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, 1, 'y'),'%Y').')'
|
||||||
|
);
|
||||||
|
|
||||||
|
$htmltext = '<i>'.$langs->trans("FollowingConstantsWillBeSubstituted").':<br>';
|
||||||
|
foreach($substitutionarray as $key => $val)
|
||||||
|
{
|
||||||
|
$htmltext.=$key.' = '.$langs->trans($val).'<br>';
|
||||||
|
}
|
||||||
|
$htmltext.='</i>';
|
||||||
|
}
|
||||||
|
|
||||||
// Public note
|
// Public note
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td class="border" valign="top">' . $langs->trans('NotePublic') . '</td>';
|
print '<td class="border tdtop">';
|
||||||
|
print $form->textwithpicto($langs->trans('NotePublic'), $htmltext);
|
||||||
|
print '</td>';
|
||||||
print '<td valign="top" colspan="2">';
|
print '<td valign="top" colspan="2">';
|
||||||
$doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
|
$doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
|
||||||
print $doleditor->Create(1);
|
print $doleditor->Create(1);
|
||||||
@ -2485,7 +2521,9 @@ if ($action == 'create')
|
|||||||
if (empty($user->societe_id))
|
if (empty($user->societe_id))
|
||||||
{
|
{
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td class="border" valign="top">' . $langs->trans('NotePrivate') . '</td>';
|
print '<td class="border tdtop">';
|
||||||
|
print $form->textwithpicto($langs->trans('NotePrivate'), $htmltext);
|
||||||
|
print '</td>';
|
||||||
print '<td valign="top" colspan="2">';
|
print '<td valign="top" colspan="2">';
|
||||||
$doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
|
$doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
|
||||||
print $doleditor->Create(1);
|
print $doleditor->Create(1);
|
||||||
|
|||||||
@ -296,6 +296,10 @@ class Facture extends CommonInvoice
|
|||||||
$this->mode_reglement_id = GETPOST('mode_reglement_id') > 0 ? GETPOST('mode_reglement_id') : $_facrec->mode_reglement_id;
|
$this->mode_reglement_id = GETPOST('mode_reglement_id') > 0 ? GETPOST('mode_reglement_id') : $_facrec->mode_reglement_id;
|
||||||
$this->fk_account = GETPOST('fk_account') > 0 ? GETPOST('fk_account') : $_facrec->fk_account;
|
$this->fk_account = GETPOST('fk_account') > 0 ? GETPOST('fk_account') : $_facrec->fk_account;
|
||||||
|
|
||||||
|
// Set here to have this defined for substitution into notes, should be recalculated after adding lines to get same result
|
||||||
|
$this->total_ht = $_facrec->total_ht;
|
||||||
|
$this->total_ttc = $_facrec->total_ttc;
|
||||||
|
|
||||||
// Fields always coming from template
|
// Fields always coming from template
|
||||||
$this->remise_absolue = $_facrec->remise_absolue;
|
$this->remise_absolue = $_facrec->remise_absolue;
|
||||||
$this->remise_percent = $_facrec->remise_percent;
|
$this->remise_percent = $_facrec->remise_percent;
|
||||||
@ -314,7 +318,7 @@ class Facture extends CommonInvoice
|
|||||||
$this->brouillon = 1;
|
$this->brouillon = 1;
|
||||||
|
|
||||||
$this->linked_objects = $_facrec->linkedObjectsIds;
|
$this->linked_objects = $_facrec->linkedObjectsIds;
|
||||||
|
|
||||||
$forceduedate = $this->calculate_date_lim_reglement();
|
$forceduedate = $this->calculate_date_lim_reglement();
|
||||||
|
|
||||||
// For recurring invoices, update date and number of last generation of recurring template invoice, before inserting new invoice
|
// For recurring invoices, update date and number of last generation of recurring template invoice, before inserting new invoice
|
||||||
@ -327,6 +331,39 @@ class Facture extends CommonInvoice
|
|||||||
//$_facrec->setValueFrom('nb_gen_done', $_facrec->nb_gen_done + 1); // Not required, +1 already included into setNextDate when second param is 1.
|
//$_facrec->setValueFrom('nb_gen_done', $_facrec->nb_gen_done + 1); // Not required, +1 already included into setNextDate when second param is 1.
|
||||||
$result = $_facrec->setNextDate($next_date,1);
|
$result = $_facrec->setNextDate($next_date,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Define lang of customer
|
||||||
|
$outputlangs = $langs;
|
||||||
|
$newlang='';
|
||||||
|
|
||||||
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($this->thirdparty->default_lang)) $newlang=$this->thirdparty->default_lang; // for proposal, order, invoice, ...
|
||||||
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($this->default_lang)) $newlang=$this->default_lang; // for thirdparty
|
||||||
|
if (! empty($newlang))
|
||||||
|
{
|
||||||
|
$outputlangs = new Translate("",$conf);
|
||||||
|
$outputlangs->setDefaultLang($newlang);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Array of possible substitutions (See also file mailing-send.php that should manage same substitutions)
|
||||||
|
$substitutionarray=array(
|
||||||
|
'__TOTAL_HT__' => price($this->total_ht, 0, $outputlangs, 0, 0, -1, $conf->currency_code),
|
||||||
|
'__TOTAL_TTC__' => price($this->total_ttc, 0, $outputlangs, 0, 0, -1, $conf->currency_code),
|
||||||
|
'__INVOICE_PREVIOUS_MONTH__' => dol_print_date(dol_time_plus_duree($this->date, -1, 'm'), '%m'),
|
||||||
|
'__INVOICE_MONTH__' => dol_print_date($this->date, '%m'),
|
||||||
|
'__INVOICE_NEXT_MONTH__' => dol_print_date(dol_time_plus_duree($this->date, 1, 'm'), '%m'),
|
||||||
|
'__INVOICE_PREVIOUS_MONTH_TEXT__' => dol_print_date(dol_time_plus_duree($this->date, -1, 'm'), '%B'),
|
||||||
|
'__INVOICE_MONTH_TEXT__' => dol_print_date($this->date, '%B'),
|
||||||
|
'__INVOICE_NEXT_MONTH_TEXT__' => dol_print_date(dol_time_plus_duree($this->date, 1, 'm'), '%B'),
|
||||||
|
'__INVOICE_PREVIOUS_YEAR__' => dol_print_date(dol_time_plus_duree($this->date, -1, 'y'), '%Y'),
|
||||||
|
'__INVOICE_YEAR__' => dol_print_date($this->date, '%Y'),
|
||||||
|
'__INVOICE_NEXT_YEAR__' => dol_print_date(dol_time_plus_duree($this->date, 1, 'y'), '%Y'),
|
||||||
|
);
|
||||||
|
|
||||||
|
$substitutionisok=true;
|
||||||
|
complete_substitutions_array($substitutionarray, $outputlangs);
|
||||||
|
|
||||||
|
$this->note_public=make_substitutions($this->note_public,$substitutionarray);
|
||||||
|
$this->note_private=make_substitutions($this->note_private,$substitutionarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define due date if not already defined
|
// Define due date if not already defined
|
||||||
|
|||||||
@ -37,6 +37,7 @@ if (! empty($conf->projet->enabled)) {
|
|||||||
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
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 . '/core/class/doleditor.class.php';
|
||||||
|
|
||||||
$langs->load('bills');
|
$langs->load('bills');
|
||||||
$langs->load('compta');
|
$langs->load('compta');
|
||||||
@ -915,15 +916,53 @@ if ($action == 'create')
|
|||||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("Customer").'</td><td>'.$object->thirdparty->getNomUrl(1,'customer').'</td>';
|
print '<tr><td class="titlefieldcreate">'.$langs->trans("Customer").'</td><td>'.$object->thirdparty->getNomUrl(1,'customer').'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Note public
|
$note_public=GETPOST('note_public')?GETPOST('note_public'):$object->note_public;
|
||||||
print '<tr><td>'.$langs->trans("NotePublic").'</td><td valign="top">';
|
$note_private=GETPOST('note_private')?GETPOST('note_private'):$object->note_private;
|
||||||
print '<textarea class="flat centpercent" name="note_public" wrap="soft" rows="'.ROWS_4.'"></textarea>';
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Note private
|
// Help of substitution key
|
||||||
print '<tr><td>'.$langs->trans("NotePrivate").'</td><td valign="top">';
|
$substitutionarray=array(
|
||||||
print '<textarea class="flat centpercent" name="note_private" wrap="soft" rows="'.ROWS_4.'"></textarea>';
|
'__TOTAL_HT__' => $langs->trans("AmountHT").' ('.$langs->trans("Example").': '.price($object->total_ht).')',
|
||||||
print '</td></tr>';
|
'__TOTAL_TTC__' => $langs->trans("AmountTTC").' ('.$langs->trans("Example").': '.price($object->total_ttc).')',
|
||||||
|
'__INVOICE_PREVIOUS_MONTH__' => $langs->trans("PreviousMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, -1, 'm'),'%m').')',
|
||||||
|
'__INVOICE_MONTH__' => $langs->trans("MonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($object->date,'%m').')',
|
||||||
|
'__INVOICE_NEXT_MONTH__' => $langs->trans("NextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, 1, 'm'),'%m').')',
|
||||||
|
'__INVOICE_PREVIOUS_MONTH_TEXT__' => $langs->trans("TextPreviousMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, -1, 'm'),'%B').')',
|
||||||
|
'__INVOICE_MONTH_TEXT__' => $langs->trans("TextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($object->date,'%B').')',
|
||||||
|
'__INVOICE_NEXT_MONTH_TEXT__' => $langs->trans("TextNextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, 1, 'm'), '%B').')',
|
||||||
|
'__INVOICE_PREVIOUS_YEAR__' => $langs->trans("YearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, -1, 'y'),'%Y').')',
|
||||||
|
'__INVOICE_YEAR__' => $langs->trans("PreviousYearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($object->date,'%Y').')',
|
||||||
|
'__INVOICE_NEXT_YEAR__' => $langs->trans("NextYearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, 1, 'y'),'%Y').')'
|
||||||
|
);
|
||||||
|
|
||||||
|
$htmltext = '<i>'.$langs->trans("FollowingConstantsWillBeSubstituted").':<br>';
|
||||||
|
foreach($substitutionarray as $key => $val)
|
||||||
|
{
|
||||||
|
$htmltext.=$key.' = '.$langs->trans($val).'<br>';
|
||||||
|
}
|
||||||
|
$htmltext.='</i>';
|
||||||
|
|
||||||
|
// Public note
|
||||||
|
print '<tr>';
|
||||||
|
print '<td class="border tdtop">';
|
||||||
|
print $form->textwithpicto($langs->trans('NotePublic'), $htmltext);
|
||||||
|
print '</td>';
|
||||||
|
print '<td valign="top" colspan="2">';
|
||||||
|
$doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
|
||||||
|
print $doleditor->Create(1);
|
||||||
|
|
||||||
|
// Private note
|
||||||
|
if (empty($user->societe_id))
|
||||||
|
{
|
||||||
|
print '<tr>';
|
||||||
|
print '<td class="border tdtop">';
|
||||||
|
print $form->textwithpicto($langs->trans('NotePrivate'), $htmltext);
|
||||||
|
print '</td>';
|
||||||
|
print '<td valign="top" colspan="2">';
|
||||||
|
$doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
|
||||||
|
print $doleditor->Create(1);
|
||||||
|
// print '<textarea name="note_private" wrap="soft" cols="70" rows="'.ROWS_3.'">'.$note_private.'.</textarea>
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Author
|
// Author
|
||||||
print "<tr><td>".$langs->trans("Author")."</td><td>".$user->getFullName($langs)."</td></tr>";
|
print "<tr><td>".$langs->trans("Author")."</td><td>".$user->getFullName($langs)."</td></tr>";
|
||||||
@ -941,7 +980,7 @@ if ($action == 'create')
|
|||||||
// Project
|
// Project
|
||||||
if (! empty($conf->projet->enabled) && is_object($object->thirdparty) && $object->thirdparty->id > 0)
|
if (! empty($conf->projet->enabled) && is_object($object->thirdparty) && $object->thirdparty->id > 0)
|
||||||
{
|
{
|
||||||
$projectid = $object->fk_project;
|
$projectid = GETPOST('projectid')?GETPOST('projectid'):$object->fk_project;
|
||||||
$langs->load('projects');
|
$langs->load('projects');
|
||||||
print '<tr><td>' . $langs->trans('Project') . '</td><td>';
|
print '<tr><td>' . $langs->trans('Project') . '</td><td>';
|
||||||
$numprojet = $formproject->select_projects($socid, $projectid, 'projectid', 0);
|
$numprojet = $formproject->select_projects($socid, $projectid, 'projectid', 0);
|
||||||
@ -970,7 +1009,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
// Frequency
|
// Frequency
|
||||||
print '<tr><td class="titlefieldcreate">'.$form->textwithpicto($langs->trans("Frequency"), $langs->transnoentitiesnoconv('toolTipFrequency'))."</td><td>";
|
print '<tr><td class="titlefieldcreate">'.$form->textwithpicto($langs->trans("Frequency"), $langs->transnoentitiesnoconv('toolTipFrequency'))."</td><td>";
|
||||||
print "<input type='text' name='frequency' value='".GETPOST('frequency', 'int')."' size='5' /> ".$form->selectarray('unit_frequency', array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), (GETPOST('unit_frequency')?GETPOST('unit_frequency'):'m'));
|
print "<input type='text' name='frequency' value='".GETPOST('frequency', 'int')."' size='4' /> ".$form->selectarray('unit_frequency', array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), (GETPOST('unit_frequency')?GETPOST('unit_frequency'):'m'));
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
// First date of execution for cron
|
// First date of execution for cron
|
||||||
@ -1130,21 +1169,6 @@ else
|
|||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Ref
|
|
||||||
/*
|
|
||||||
print '<tr><td class="titlefield">';
|
|
||||||
//print $langs->trans('Ref');
|
|
||||||
print $form->editfieldkey($langs->trans("Ref"), 'ref', $object->ref, $object, $user->rights->facture->creer);
|
|
||||||
print '</td>';
|
|
||||||
print '<td colspan="3">';
|
|
||||||
$morehtmlref = $form->editfieldval($langs->trans("Ref"), 'ref', $object->ref, $object, $user->rights->facture->creer, 'string');
|
|
||||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'titre', 'none', $morehtmlref);
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Customer").'</td>';
|
|
||||||
print '<td colspan="3">'.$object->thirdparty->getNomUrl(1,'customer').'</td></tr>';
|
|
||||||
*/
|
|
||||||
|
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Author").'</td><td colspan="3">'.$author->getFullName($langs)."</td></tr>";
|
print '<tr><td class="titlefield">'.$langs->trans("Author").'</td><td colspan="3">'.$author->getFullName($langs)."</td></tr>";
|
||||||
|
|
||||||
@ -1200,9 +1224,33 @@ else
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Help of substitution key
|
||||||
|
$dateexample=dol_now();
|
||||||
|
if (! empty($object->frequency) && ! empty($object->date_when)) $dateexample=$object->date_when;
|
||||||
|
$substitutionarray=array(
|
||||||
|
'__TOTAL_HT__' => $langs->trans("AmountHT").' ('.$langs->trans("Example").': '.price($object->total_ht).')',
|
||||||
|
'__TOTAL_TTC__' => $langs->trans("AmountTTC").' ('.$langs->trans("Example").': '.price($object->total_ttc).')',
|
||||||
|
'__INVOICE_PREVIOUS_MONTH__' => $langs->trans("PreviousMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, -1, 'm'),'%m').')',
|
||||||
|
'__INVOICE_MONTH__' => $langs->trans("MonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($dateexample,'%m').')',
|
||||||
|
'__INVOICE_NEXT_MONTH__' => $langs->trans("NextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, 1, 'm'),'%m').')',
|
||||||
|
'__INVOICE_PREVIOUS_MONTH_TEXT__' => $langs->trans("TextPreviousMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, -1, 'm'),'%B').')',
|
||||||
|
'__INVOICE_MONTH_TEXT__' => $langs->trans("TextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($dateexample,'%B').')',
|
||||||
|
'__INVOICE_NEXT_MONTH_TEXT__' => $langs->trans("TextNextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, 1, 'm'), '%B').')',
|
||||||
|
'__INVOICE_PREVIOUS_YEAR__' => $langs->trans("YearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, -1, 'y'),'%Y').')',
|
||||||
|
'__INVOICE_YEAR__' => $langs->trans("PreviousYearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($dateexample,'%Y').')',
|
||||||
|
'__INVOICE_NEXT_YEAR__' => $langs->trans("NextYearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, 1, 'y'),'%Y').')'
|
||||||
|
);
|
||||||
|
|
||||||
|
$htmltext = '<i>'.$langs->trans("FollowingConstantsWillBeSubstituted").':<br>';
|
||||||
|
foreach($substitutionarray as $key => $val)
|
||||||
|
{
|
||||||
|
$htmltext.=$key.' = '.$langs->trans($val).'<br>';
|
||||||
|
}
|
||||||
|
$htmltext.='</i>';
|
||||||
|
|
||||||
// Note public
|
// Note public
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $form->editfieldkey($langs->trans("NotePublic"), 'note_public', $object->note_public, $object, $user->rights->facture->creer);
|
print $form->editfieldkey($form->textwithpicto($langs->trans('NotePublic'), $htmltext), 'note_public', $object->note_public, $object, $user->rights->facture->creer);
|
||||||
print '</td><td colspan="5">';
|
print '</td><td colspan="5">';
|
||||||
print $form->editfieldval($langs->trans("NotePublic"), 'note_public', $object->note_public, $object, $user->rights->facture->creer, 'textarea:'.ROWS_4.':60');
|
print $form->editfieldval($langs->trans("NotePublic"), 'note_public', $object->note_public, $object, $user->rights->facture->creer, 'textarea:'.ROWS_4.':60');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -1210,39 +1258,11 @@ else
|
|||||||
|
|
||||||
// Note private
|
// Note private
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $form->editfieldkey($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer);
|
print $form->editfieldkey($form->textwithpicto($langs->trans("NotePrivate"), $htmltext), 'note_private', $object->note_private, $object, $user->rights->facture->creer);
|
||||||
print '</td><td colspan="5">';
|
print '</td><td colspan="5">';
|
||||||
print $form->editfieldval($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer, 'textarea:'.ROWS_4.':60');
|
print $form->editfieldval($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer, 'textarea:'.ROWS_4.':60');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Project
|
|
||||||
/*
|
|
||||||
if (! empty($conf->projet->enabled))
|
|
||||||
{
|
|
||||||
$langs->load('projects');
|
|
||||||
print '<tr>';
|
|
||||||
print '<td>';
|
|
||||||
|
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
|
||||||
print $langs->trans('Project');
|
|
||||||
print '</td>';
|
|
||||||
if ($action != 'classify') {
|
|
||||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=classify&facid=' . $object->id . '">';
|
|
||||||
print img_edit($langs->trans('SetProject'), 1);
|
|
||||||
print '</a></td>';
|
|
||||||
}
|
|
||||||
print '</tr></table>';
|
|
||||||
|
|
||||||
print '</td><td colspan="3">';
|
|
||||||
if ($action == 'classify') {
|
|
||||||
$form->form_project($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1);
|
|
||||||
} else {
|
|
||||||
$form->form_project($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0);
|
|
||||||
}
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
}*/
|
|
||||||
|
|
||||||
// Bank Account
|
// Bank Account
|
||||||
print '<tr><td class="nowrap">';
|
print '<tr><td class="nowrap">';
|
||||||
|
|||||||
@ -133,7 +133,7 @@ $search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search
|
|||||||
$fieldstosearchall = array(
|
$fieldstosearchall = array(
|
||||||
'f.facnumber'=>'Ref',
|
'f.facnumber'=>'Ref',
|
||||||
'f.ref_client'=>'RefCustomer',
|
'f.ref_client'=>'RefCustomer',
|
||||||
'fd.description'=>'Description',
|
'pd.description'=>'Description',
|
||||||
's.nom'=>"ThirdParty",
|
's.nom'=>"ThirdParty",
|
||||||
'f.note_public'=>'NotePublic',
|
'f.note_public'=>'NotePublic',
|
||||||
);
|
);
|
||||||
@ -156,7 +156,7 @@ $arrayfields=array(
|
|||||||
'f.total_ht'=>array('label'=>$langs->trans("AmountHT"), 'checked'=>1),
|
'f.total_ht'=>array('label'=>$langs->trans("AmountHT"), 'checked'=>1),
|
||||||
'f.total_vat'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0),
|
'f.total_vat'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0),
|
||||||
'f.total_ttc'=>array('label'=>$langs->trans("AmountTTC"), 'checked'=>0),
|
'f.total_ttc'=>array('label'=>$langs->trans("AmountTTC"), 'checked'=>0),
|
||||||
'am'=>array('label'=>$langs->trans("Received"), 'checked'=>0),
|
'dynamount_payed'=>array('label'=>$langs->trans("Received"), 'checked'=>0),
|
||||||
'rtp'=>array('label'=>$langs->trans("Rest"), 'checked'=>0),
|
'rtp'=>array('label'=>$langs->trans("Rest"), 'checked'=>0),
|
||||||
'f.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
'f.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
||||||
'f.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
|
'f.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
|
||||||
@ -253,7 +253,9 @@ $sql.= ' f.datec as date_creation, f.tms as date_update,';
|
|||||||
$sql.= ' s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client, ';
|
$sql.= ' s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client, ';
|
||||||
$sql.= " typent.code as typent_code,";
|
$sql.= " typent.code as typent_code,";
|
||||||
$sql.= " state.code_departement as state_code, state.nom as state_name";
|
$sql.= " state.code_departement as state_code, state.nom as state_name";
|
||||||
if (! $sall) $sql.= ', SUM(pf.amount) as am'; // To be able to sort on status
|
// We need dynamount_payed to be able to sort on status (value is surely wrong because we can count several lines several times due to other left join or link with contacts. But what we need is just 0 or > 0)
|
||||||
|
// TODO Better solution to be able to sort on already payed or remain to pay is to store amount_payed in a denormalized field.
|
||||||
|
if (! $sall) $sql.= ', SUM(pf.amount) as dynamount_payed';
|
||||||
// Add fields from extrafields
|
// Add fields from extrafields
|
||||||
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
|
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
|
||||||
// Add fields from hooks
|
// Add fields from hooks
|
||||||
@ -267,7 +269,6 @@ $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s
|
|||||||
$sql.= ', '.MAIN_DB_PREFIX.'facture as f';
|
$sql.= ', '.MAIN_DB_PREFIX.'facture as f';
|
||||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture_extrafields as ef on (f.rowid = ef.fk_object)";
|
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture_extrafields as ef on (f.rowid = ef.fk_object)";
|
||||||
if (! $sall) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiement_facture as pf ON pf.fk_facture = f.rowid';
|
if (! $sall) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiement_facture as pf ON pf.fk_facture = f.rowid';
|
||||||
else $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'facturedet as fd ON fd.fk_facture = f.rowid';
|
|
||||||
if ($sall || $search_product_category > 0) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'facturedet as pd ON f.rowid=pd.fk_facture';
|
if ($sall || $search_product_category > 0) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'facturedet as pd ON f.rowid=pd.fk_facture';
|
||||||
if ($search_product_category > 0) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=pd.fk_product';
|
if ($search_product_category > 0) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=pd.fk_product';
|
||||||
// We'll need this table joined to the select in order to filter by sale
|
// We'll need this table joined to the select in order to filter by sale
|
||||||
@ -655,8 +656,8 @@ if ($resql)
|
|||||||
if (! empty($arrayfields['f.total_ht']['checked'])) print_liste_field_titre($arrayfields['f.total_ht']['label'],$_SERVER['PHP_SELF'],'f.total','',$param,'align="right"',$sortfield,$sortorder);
|
if (! empty($arrayfields['f.total_ht']['checked'])) print_liste_field_titre($arrayfields['f.total_ht']['label'],$_SERVER['PHP_SELF'],'f.total','',$param,'align="right"',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['f.total_vat']['checked'])) print_liste_field_titre($arrayfields['f.total_vat']['label'],$_SERVER['PHP_SELF'],'f.tva','',$param,'align="right"',$sortfield,$sortorder);
|
if (! empty($arrayfields['f.total_vat']['checked'])) print_liste_field_titre($arrayfields['f.total_vat']['label'],$_SERVER['PHP_SELF'],'f.tva','',$param,'align="right"',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['f.total_ttc']['checked'])) print_liste_field_titre($arrayfields['f.total_ttc']['label'],$_SERVER['PHP_SELF'],'f.total_ttc','',$param,'align="right"',$sortfield,$sortorder);
|
if (! empty($arrayfields['f.total_ttc']['checked'])) print_liste_field_titre($arrayfields['f.total_ttc']['label'],$_SERVER['PHP_SELF'],'f.total_ttc','',$param,'align="right"',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['am']['checked'])) print_liste_field_titre($arrayfields['am']['label'],$_SERVER['PHP_SELF'],'am','',$param,'align="right"',$sortfield,$sortorder);
|
if (! empty($arrayfields['dynamount_payed']['checked'])) print_liste_field_titre($arrayfields['dynamount_payed']['label'],$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['rtp']['checked'])) print_liste_field_titre($arrayfields['rtp']['label'],$_SERVER['PHP_SELF'],'rtp','',$param,'align="right"',$sortfield,$sortorder);
|
if (! empty($arrayfields['rtp']['checked'])) print_liste_field_titre($arrayfields['rtp']['label'],$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
|
||||||
// Extra fields
|
// Extra fields
|
||||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
||||||
{
|
{
|
||||||
@ -675,7 +676,7 @@ if ($resql)
|
|||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (! empty($arrayfields['f.datec']['checked'])) print_liste_field_titre($arrayfields['f.datec']['label'],$_SERVER["PHP_SELF"],"f.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
if (! empty($arrayfields['f.datec']['checked'])) print_liste_field_titre($arrayfields['f.datec']['label'],$_SERVER["PHP_SELF"],"f.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['f.tms']['checked'])) print_liste_field_titre($arrayfields['f.tms']['label'],$_SERVER["PHP_SELF"],"f.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
if (! empty($arrayfields['f.tms']['checked'])) print_liste_field_titre($arrayfields['f.tms']['label'],$_SERVER["PHP_SELF"],"f.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['f.fk_statut']['checked'])) print_liste_field_titre($arrayfields['f.fk_statut']['label'],$_SERVER["PHP_SELF"],"fk_statut,paye,am","",$param,'align="right"',$sortfield,$sortorder);
|
if (! empty($arrayfields['f.fk_statut']['checked'])) print_liste_field_titre($arrayfields['f.fk_statut']['label'],$_SERVER["PHP_SELF"],"fk_statut,paye,type,dynamount_payed","",$param,'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -786,7 +787,7 @@ if ($resql)
|
|||||||
print '<input class="flat" type="text" size="5" name="search_montant_ttc" value="'.$search_montant_ttc.'">';
|
print '<input class="flat" type="text" size="5" name="search_montant_ttc" value="'.$search_montant_ttc.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
if (! empty($arrayfields['am']['checked']))
|
if (! empty($arrayfields['dynamount_payed']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre" align="right">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -1025,9 +1026,9 @@ if ($resql)
|
|||||||
$totalarray['totalttc'] += $obj->total_ttc;
|
$totalarray['totalttc'] += $obj->total_ttc;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($arrayfields['am']['checked']))
|
if (! empty($arrayfields['dynamount_payed']['checked']))
|
||||||
{
|
{
|
||||||
print '<td align="right">'.(! empty($paiement)?price($paiement,0,$langs):' ').'</td>';
|
print '<td align="right">'.(! empty($paiement)?price($paiement,0,$langs):' ').'</td>'; // TODO Use a denormalized field
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
if (! $i) $totalarray['totalamfield']=$totalarray['nbfield'];
|
if (! $i) $totalarray['totalamfield']=$totalarray['nbfield'];
|
||||||
$totalarray['totalam'] += $paiement;
|
$totalarray['totalam'] += $paiement;
|
||||||
@ -1035,7 +1036,7 @@ if ($resql)
|
|||||||
|
|
||||||
if (! empty($arrayfields['rtp']['checked']))
|
if (! empty($arrayfields['rtp']['checked']))
|
||||||
{
|
{
|
||||||
print '<td align="right">'.(! empty($remaintopay)?price($remaintopay,0,$langs):' ').'</td>';
|
print '<td align="right">'.(! empty($remaintopay)?price($remaintopay,0,$langs):' ').'</td>'; // TODO Use a denormalized field
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
if (! $i) $totalarray['totalrtpfield']=$totalarray['nbfield'];
|
if (! $i) $totalarray['totalrtpfield']=$totalarray['nbfield'];
|
||||||
$totalarray['totalrtp'] += $remaintopay;
|
$totalarray['totalrtp'] += $remaintopay;
|
||||||
|
|||||||
@ -171,7 +171,7 @@ if ($resql)
|
|||||||
print '</td>';
|
print '</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" align="right">';
|
||||||
print '<input class="flat" type="text" size="6" name="search_amount" value="'.$search_amount.'">';
|
print '<input class="flat maxwidth50" type="text" name="search_amount" value="'.$search_amount.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre" align="right">';
|
||||||
@ -190,7 +190,7 @@ if ($resql)
|
|||||||
print "<tr ".$bc[$var].">";
|
print "<tr ".$bc[$var].">";
|
||||||
|
|
||||||
// Num ref cheque
|
// Num ref cheque
|
||||||
print '<td width="80">';
|
print '<td>';
|
||||||
$checkdepositstatic->id=$objp->rowid;
|
$checkdepositstatic->id=$objp->rowid;
|
||||||
$checkdepositstatic->ref=($objp->ref?$objp->ref:$objp->rowid);
|
$checkdepositstatic->ref=($objp->ref?$objp->ref:$objp->rowid);
|
||||||
$checkdepositstatic->statut=$objp->statut;
|
$checkdepositstatic->statut=$objp->statut;
|
||||||
|
|||||||
@ -52,6 +52,17 @@ if ($user->societe_id > 0) $socid = $user->societe_id;
|
|||||||
if (! empty($conf->comptabilite->enabled)) $result=restrictedArea($user,'compta','','','resultat');
|
if (! empty($conf->comptabilite->enabled)) $result=restrictedArea($user,'compta','','','resultat');
|
||||||
if (! empty($conf->accounting->enabled)) $result=restrictedArea($user,'accounting','','','comptarapport');
|
if (! empty($conf->accounting->enabled)) $result=restrictedArea($user,'accounting','','','comptarapport');
|
||||||
|
|
||||||
|
$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit;
|
||||||
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
|
$page = GETPOST("page",'int');
|
||||||
|
if ($page == -1) { $page = 0; }
|
||||||
|
$offset = $limit * $page;
|
||||||
|
$pageprev = $page - 1;
|
||||||
|
$pagenext = $page + 1;
|
||||||
|
if (! $sortfield) $sortfield='s.nom, s.rowid';
|
||||||
|
if (! $sortorder) $sortorder='ASC';
|
||||||
|
|
||||||
// Date range
|
// Date range
|
||||||
$year=GETPOST("year");
|
$year=GETPOST("year");
|
||||||
if (empty($year))
|
if (empty($year))
|
||||||
@ -155,12 +166,23 @@ if (! empty($conf->accounting->enabled))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Show report array
|
// Show report array
|
||||||
|
$param='&modecompta='.$modecompta;
|
||||||
|
if ($date_startday) $param.='&date_startday='.$date_startday;
|
||||||
|
if ($date_startmonth) $param.='&date_startmonth='.$date_startmonth;
|
||||||
|
if ($date_startyear) $param.='&date_startyear='.$date_startyear;
|
||||||
|
if ($date_endday) $param.='&date_endday='.$date_endday;
|
||||||
|
if ($date_endmonth) $param.='&date_endmonth='.$date_endmonth;
|
||||||
|
if ($date_endyear) $param.='&date_endyear='.$date_startyear;
|
||||||
|
|
||||||
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="10%"> </td><td> </td>';
|
print_liste_field_titre('');
|
||||||
|
print_liste_field_titre($langs->trans("Name"), $_SERVER["PHP_SELF"],'s.nom, s.rowid','',$param,'',$sortfield,$sortorder);
|
||||||
if ($modecompta == 'CREANCES-DETTES')
|
if ($modecompta == 'CREANCES-DETTES')
|
||||||
print "<td align=\"right\">".$langs->trans("AmountHT")."</td>";
|
{
|
||||||
print "<td align=\"right\">".$langs->trans("AmountTTC")."</td>";
|
print_liste_field_titre($langs->trans("AmountHT"), $_SERVER["PHP_SELF"],'amount_ht','',$param,'align="right"',$sortfield,$sortorder);
|
||||||
|
}
|
||||||
|
print_liste_field_titre($langs->trans("AmountTTC"), $_SERVER["PHP_SELF"],'amount_ttc','',$param,'align="right"',$sortfield,$sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -202,7 +224,7 @@ else
|
|||||||
$sql.= " AND f.entity = ".$conf->entity;
|
$sql.= " AND f.entity = ".$conf->entity;
|
||||||
if ($socid) $sql.= " AND f.fk_soc = ".$socid;
|
if ($socid) $sql.= " AND f.fk_soc = ".$socid;
|
||||||
$sql.= " GROUP BY s.nom, s.rowid";
|
$sql.= " GROUP BY s.nom, s.rowid";
|
||||||
$sql.= " ORDER BY s.nom, s.rowid";
|
$sql.= $db->order($sortfield, $sortorder);
|
||||||
|
|
||||||
dol_syslog("get customer invoices", LOG_DEBUG);
|
dol_syslog("get customer invoices", LOG_DEBUG);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
@ -328,7 +350,7 @@ else
|
|||||||
$sql.= " AND f.entity = ".$conf->entity;
|
$sql.= " AND f.entity = ".$conf->entity;
|
||||||
if ($socid) $sql.= " AND f.fk_soc = ".$socid;
|
if ($socid) $sql.= " AND f.fk_soc = ".$socid;
|
||||||
$sql .= " GROUP BY s.nom, s.rowid";
|
$sql .= " GROUP BY s.nom, s.rowid";
|
||||||
$sql .= " ORDER BY s.nom, s.rowid";
|
$sql.= $db->order($sortfield, $sortorder);
|
||||||
|
|
||||||
print '<tr><td colspan="4">'.$langs->trans("SuppliersInvoices").'</td></tr>';
|
print '<tr><td colspan="4">'.$langs->trans("SuppliersInvoices").'</td></tr>';
|
||||||
|
|
||||||
@ -413,7 +435,11 @@ else
|
|||||||
}
|
}
|
||||||
$sql.= " AND cs.entity = ".$conf->entity;
|
$sql.= " AND cs.entity = ".$conf->entity;
|
||||||
$sql.= " GROUP BY c.libelle, c.id";
|
$sql.= " GROUP BY c.libelle, c.id";
|
||||||
$sql.= " ORDER BY c.libelle, c.id";
|
$newsortfield = $sortfield;
|
||||||
|
if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'c.libelle, c.id';
|
||||||
|
if ($newsortfield == 'amount_ht') $newsortfield = 'amount';
|
||||||
|
if ($newsortfield == 'amount_ttc') $newsortfield = 'amount';
|
||||||
|
$sql.= $db->order($newsortfield, $sortorder);
|
||||||
|
|
||||||
dol_syslog("get social contributions deductible=0", LOG_DEBUG);
|
dol_syslog("get social contributions deductible=0", LOG_DEBUG);
|
||||||
$result=$db->query($sql);
|
$result=$db->query($sql);
|
||||||
@ -473,8 +499,6 @@ if ($modecompta == 'CREANCES-DETTES')
|
|||||||
if (! empty($date_start) && ! empty($date_end))
|
if (! empty($date_start) && ! empty($date_end))
|
||||||
$sql.= " AND cs.date_ech >= '".$db->idate($date_start)."' AND cs.date_ech <= '".$db->idate($date_end)."'";
|
$sql.= " AND cs.date_ech >= '".$db->idate($date_start)."' AND cs.date_ech <= '".$db->idate($date_end)."'";
|
||||||
$sql.= " AND cs.entity = ".$conf->entity;
|
$sql.= " AND cs.entity = ".$conf->entity;
|
||||||
$sql.= " GROUP BY c.libelle, c.id";
|
|
||||||
$sql.= " ORDER BY c.libelle, c.id";
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -488,9 +512,13 @@ else
|
|||||||
if (! empty($date_start) && ! empty($date_end))
|
if (! empty($date_start) && ! empty($date_end))
|
||||||
$sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
|
$sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
|
||||||
$sql.= " AND cs.entity = ".$conf->entity;
|
$sql.= " AND cs.entity = ".$conf->entity;
|
||||||
$sql.= " GROUP BY c.libelle, c.id";
|
|
||||||
$sql.= " ORDER BY c.libelle, c.id";
|
|
||||||
}
|
}
|
||||||
|
$sql.= " GROUP BY c.libelle, c.id";
|
||||||
|
$newsortfield = $sortfield;
|
||||||
|
if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'c.libelle, c.id';
|
||||||
|
if ($newsortfield == 'amount_ht') $newsortfield = 'amount';
|
||||||
|
if ($newsortfield == 'amount_ttc') $newsortfield = 'amount';
|
||||||
|
$sql.= $db->order($newsortfield, $sortorder);
|
||||||
|
|
||||||
dol_syslog("get social contributions deductible=1", LOG_DEBUG);
|
dol_syslog("get social contributions deductible=1", LOG_DEBUG);
|
||||||
$result=$db->query($sql);
|
$result=$db->query($sql);
|
||||||
@ -574,8 +602,12 @@ if (! empty($conf->salaries->enabled))
|
|||||||
$sql.= " AND $column >= '".$db->idate($date_start)."' AND $column <= '".$db->idate($date_end)."'";
|
$sql.= " AND $column >= '".$db->idate($date_start)."' AND $column <= '".$db->idate($date_end)."'";
|
||||||
|
|
||||||
$sql.= " GROUP BY u.rowid, u.firstname, u.lastname, p.fk_user, p.label, dm";
|
$sql.= " GROUP BY u.rowid, u.firstname, u.lastname, p.fk_user, p.label, dm";
|
||||||
$sql.= " ORDER BY u.firstname";
|
$newsortfield = $sortfield;
|
||||||
|
if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'u.firstname, u.lastname';
|
||||||
|
if ($newsortfield == 'amount_ht') $newsortfield = 'amount';
|
||||||
|
if ($newsortfield == 'amount_ttc') $newsortfield = 'amount';
|
||||||
|
$sql.= $db->order($newsortfield, $sortorder);
|
||||||
|
|
||||||
dol_syslog("get payment salaries");
|
dol_syslog("get payment salaries");
|
||||||
$result=$db->query($sql);
|
$result=$db->query($sql);
|
||||||
$subtotal_ht = 0;
|
$subtotal_ht = 0;
|
||||||
@ -642,7 +674,7 @@ if (! empty($conf->expensereport->enabled))
|
|||||||
|
|
||||||
$column='p.date_valid';
|
$column='p.date_valid';
|
||||||
} else {
|
} else {
|
||||||
$sql = "SELECT p.rowid, p.ref, u.rowid as userid, u.firstname, u.lastname, date_format(pe.datep,'%Y-%m') as dm, sum(p.total_ht) as amount_ht,sum(p.total_ttc) as amount_ttc";
|
$sql = "SELECT p.rowid, p.ref, u.rowid as userid, u.firstname, u.lastname, date_format(pe.datep,'%Y-%m') as dm, sum(p.total_ht) as amount_ht, sum(p.total_ttc) as amount_ttc";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."expensereport as p";
|
$sql.= " FROM ".MAIN_DB_PREFIX."expensereport as p";
|
||||||
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid=p.fk_user_author";
|
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid=p.fk_user_author";
|
||||||
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."payment_expensereport as pe ON pe.fk_expensereport = p.rowid";
|
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."payment_expensereport as pe ON pe.fk_expensereport = p.rowid";
|
||||||
@ -656,55 +688,59 @@ if (! empty($conf->expensereport->enabled))
|
|||||||
print '<tr><td colspan="4">'.$langs->trans("ExpenseReport").'</td></tr>';
|
print '<tr><td colspan="4">'.$langs->trans("ExpenseReport").'</td></tr>';
|
||||||
|
|
||||||
if (! empty($date_start) && ! empty($date_end))
|
if (! empty($date_start) && ! empty($date_end))
|
||||||
|
{
|
||||||
$sql.= " AND $column >= '".$db->idate($date_start)."' AND $column <= '".$db->idate($date_end)."'";
|
$sql.= " AND $column >= '".$db->idate($date_start)."' AND $column <= '".$db->idate($date_end)."'";
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql.= " GROUP BY u.rowid, p.rowid, p.ref, u.firstname, u.lastname, dm";
|
||||||
|
$newsortfield = $sortfield;
|
||||||
|
if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'p.ref';
|
||||||
|
$sql.= $db->order($newsortfield, $sortorder);
|
||||||
|
|
||||||
$sql.= " GROUP BY u.rowid, p.rowid, p.ref, u.firstname, u.lastname, dm";
|
dol_syslog("get expense report outcome");
|
||||||
$sql.= " ORDER BY p.ref";
|
$result=$db->query($sql);
|
||||||
|
$subtotal_ht = 0;
|
||||||
dol_syslog("get expense report outcome");
|
$subtotal_ttc = 0;
|
||||||
$result=$db->query($sql);
|
if ($result)
|
||||||
$subtotal_ht = 0;
|
{
|
||||||
$subtotal_ttc = 0;
|
$num = $db->num_rows($result);
|
||||||
if ($result)
|
$var=true;
|
||||||
|
if ($num)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($result);
|
while ($obj = $db->fetch_object($result))
|
||||||
$var=true;
|
|
||||||
if ($num)
|
|
||||||
{
|
{
|
||||||
while ($obj = $db->fetch_object($result))
|
$total_ht -= $obj->amount_ht;
|
||||||
{
|
$total_ttc -= $obj->amount_ttc;
|
||||||
$total_ht -= $obj->amount_ht;
|
$subtotal_ht += $obj->amount_ht;
|
||||||
$total_ttc -= $obj->amount_ttc;
|
$subtotal_ttc += $obj->amount_ttc;
|
||||||
$subtotal_ht += $obj->amount_ht;
|
|
||||||
$subtotal_ttc += $obj->amount_ttc;
|
|
||||||
|
|
||||||
$var = !$var;
|
|
||||||
print "<tr ".$bc[$var]."><td> </td>";
|
|
||||||
|
|
||||||
print "<td>".$langs->trans("ExpenseReport")." <a href=\"".DOL_URL_ROOT."/expensereport/list.php?search_user=".$obj->userid."\">".$obj->firstname." ".$obj->lastname."</a></td>\n";
|
|
||||||
|
|
||||||
if ($modecompta == 'CREANCES-DETTES') print '<td align="right">'.price(-$obj->amount_ht).'</td>';
|
|
||||||
print '<td align="right">'.price(-$obj->amount_ttc).'</td>';
|
|
||||||
print '</tr>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$var = !$var;
|
$var = !$var;
|
||||||
print "<tr ".$bc[$var]."><td> </td>";
|
print "<tr ".$bc[$var]."><td> </td>";
|
||||||
print '<td colspan="3" class="opacitymedium">'.$langs->trans("None").'</td>';
|
|
||||||
|
print "<td>".$langs->trans("ExpenseReport")." <a href=\"".DOL_URL_ROOT."/expensereport/list.php?search_user=".$obj->userid."\">".$obj->firstname." ".$obj->lastname."</a></td>\n";
|
||||||
|
|
||||||
|
if ($modecompta == 'CREANCES-DETTES') print '<td align="right">'.price(-$obj->amount_ht).'</td>';
|
||||||
|
print '<td align="right">'.price(-$obj->amount_ttc).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($db);
|
$var = !$var;
|
||||||
}
|
print "<tr ".$bc[$var]."><td> </td>";
|
||||||
print '<tr class="liste_total">';
|
print '<td colspan="3" class="opacitymedium">'.$langs->trans("None").'</td>';
|
||||||
if ($modecompta == 'CREANCES-DETTES')
|
|
||||||
print '<td colspan="3" align="right">'.price(-$subtotal_ht).'</td>';
|
|
||||||
print '<td colspan="3" align="right">'.price(-$subtotal_ttc).'</td>';
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_print_error($db);
|
||||||
|
}
|
||||||
|
print '<tr class="liste_total">';
|
||||||
|
if ($modecompta == 'CREANCES-DETTES')
|
||||||
|
print '<td colspan="3" align="right">'.price(-$subtotal_ht).'</td>';
|
||||||
|
print '<td colspan="3" align="right">'.price(-$subtotal_ttc).'</td>';
|
||||||
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -733,7 +769,11 @@ if (! empty($conf->don->enabled))
|
|||||||
if (! empty($date_start) && ! empty($date_end))
|
if (! empty($date_start) && ! empty($date_end))
|
||||||
$sql.= " AND p.datedon >= '".$db->idate($date_start)."' AND p.datedon <= '".$db->idate($date_end)."'";
|
$sql.= " AND p.datedon >= '".$db->idate($date_start)."' AND p.datedon <= '".$db->idate($date_end)."'";
|
||||||
$sql.= " GROUP BY p.societe, p.firstname, p.lastname, dm";
|
$sql.= " GROUP BY p.societe, p.firstname, p.lastname, dm";
|
||||||
$sql.= " ORDER BY p.societe, p.firstname, p.lastname, dm";
|
$newsortfield = $sortfield;
|
||||||
|
if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'p.societe, p.firstname, p.lastname, dm';
|
||||||
|
if ($newsortfield == 'amount_ht') $newsortfield = 'amount';
|
||||||
|
if ($newsortfield == 'amount_ttc') $newsortfield = 'amount';
|
||||||
|
$sql.= $db->order($newsortfield, $sortorder);
|
||||||
|
|
||||||
dol_syslog("get dunning");
|
dol_syslog("get dunning");
|
||||||
$result=$db->query($sql);
|
$result=$db->query($sql);
|
||||||
@ -808,7 +848,11 @@ if ($modecompta == 'CREANCES-DETTES')
|
|||||||
$sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'";
|
$sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'";
|
||||||
$sql.= " AND f.entity = ".$conf->entity;
|
$sql.= " AND f.entity = ".$conf->entity;
|
||||||
$sql.= " GROUP BY dm";
|
$sql.= " GROUP BY dm";
|
||||||
$sql.= " ORDER BY dm";
|
$newsortfield = $sortfield;
|
||||||
|
if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'dm';
|
||||||
|
if ($newsortfield == 'amount_ht') $newsortfield = 'amount';
|
||||||
|
if ($newsortfield == 'amount_ttc') $newsortfield = 'amount';
|
||||||
|
$sql.= $db->order($newsortfield, $sortorder);
|
||||||
|
|
||||||
dol_syslog("get vat to pay", LOG_DEBUG);
|
dol_syslog("get vat to pay", LOG_DEBUG);
|
||||||
$result=$db->query($sql);
|
$result=$db->query($sql);
|
||||||
@ -853,7 +897,11 @@ if ($modecompta == 'CREANCES-DETTES')
|
|||||||
$sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'";
|
$sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'";
|
||||||
$sql.= " AND f.entity = ".$conf->entity;
|
$sql.= " AND f.entity = ".$conf->entity;
|
||||||
$sql.= " GROUP BY dm";
|
$sql.= " GROUP BY dm";
|
||||||
$sql.= " ORDER BY dm";
|
$newsortfield = $sortfield;
|
||||||
|
if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'dm';
|
||||||
|
if ($newsortfield == 'amount_ht') $newsortfield = 'amount';
|
||||||
|
if ($newsortfield == 'amount_ttc') $newsortfield = 'amount';
|
||||||
|
$sql.= $db->order($newsortfield, $sortorder);
|
||||||
|
|
||||||
dol_syslog("get vat received back", LOG_DEBUG);
|
dol_syslog("get vat received back", LOG_DEBUG);
|
||||||
$result=$db->query($sql);
|
$result=$db->query($sql);
|
||||||
@ -897,7 +945,11 @@ else
|
|||||||
$sql.= " AND t.datev >= '".$db->idate($date_start)."' AND t.datev <= '".$db->idate($date_end)."'";
|
$sql.= " AND t.datev >= '".$db->idate($date_start)."' AND t.datev <= '".$db->idate($date_end)."'";
|
||||||
$sql.= " AND t.entity = ".$conf->entity;
|
$sql.= " AND t.entity = ".$conf->entity;
|
||||||
$sql.= " GROUP BY dm";
|
$sql.= " GROUP BY dm";
|
||||||
$sql.= " ORDER BY dm";
|
$newsortfield = $sortfield;
|
||||||
|
if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'dm';
|
||||||
|
if ($newsortfield == 'amount_ht') $newsortfield = 'amount';
|
||||||
|
if ($newsortfield == 'amount_ttc') $newsortfield = 'amount';
|
||||||
|
$sql.= $db->order($newsortfield, $sortorder);
|
||||||
|
|
||||||
dol_syslog("get vat really paid", LOG_DEBUG);
|
dol_syslog("get vat really paid", LOG_DEBUG);
|
||||||
$result=$db->query($sql);
|
$result=$db->query($sql);
|
||||||
@ -938,7 +990,11 @@ else
|
|||||||
$sql.= " AND t.datev >= '".$db->idate($date_start)."' AND t.datev <= '".$db->idate($date_end)."'";
|
$sql.= " AND t.datev >= '".$db->idate($date_start)."' AND t.datev <= '".$db->idate($date_end)."'";
|
||||||
$sql.= " AND t.entity = ".$conf->entity;
|
$sql.= " AND t.entity = ".$conf->entity;
|
||||||
$sql.= " GROUP BY dm";
|
$sql.= " GROUP BY dm";
|
||||||
$sql.= " ORDER BY dm";
|
$newsortfield = $sortfield;
|
||||||
|
if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'dm';
|
||||||
|
if ($newsortfield == 'amount_ht') $newsortfield = 'amount';
|
||||||
|
if ($newsortfield == 'amount_ttc') $newsortfield = 'amount';
|
||||||
|
$sql.= $db->order($newsortfield, $sortorder);
|
||||||
|
|
||||||
dol_syslog("get vat really received back", LOG_DEBUG);
|
dol_syslog("get vat really received back", LOG_DEBUG);
|
||||||
$result=$db->query($sql);
|
$result=$db->query($sql);
|
||||||
|
|||||||
@ -121,7 +121,7 @@ if (empty($reshook))
|
|||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'confirm_closeline' && $confirm == 'yes' && $user->rights->contrat->activer)
|
else if ($action == 'confirm_closeline' && $confirm == 'yes' && $user->rights->contrat->activer)
|
||||||
{
|
{
|
||||||
if (! GETPOST('dateend'))
|
if (! GETPOST('dateend'))
|
||||||
@ -999,7 +999,8 @@ llxHeader('',$langs->trans("Contract"),"");
|
|||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formfile = new FormFile($db);
|
$formfile = new FormFile($db);
|
||||||
|
if (! empty($conf->projet->enabled)) $formproject = new FormProjets($db);
|
||||||
|
|
||||||
$objectlignestatic=new ContratLigne($db);
|
$objectlignestatic=new ContratLigne($db);
|
||||||
|
|
||||||
// Load object modContract
|
// Load object modContract
|
||||||
@ -1086,34 +1087,36 @@ if ($action == 'create')
|
|||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
|
print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans('Ref').'</td><td>';
|
||||||
if (! empty($modCodeContract->code_auto)) {
|
if (! empty($modCodeContract->code_auto)) {
|
||||||
$tmpcode=$langs->trans("Draft");
|
$tmpcode=$langs->trans("Draft");
|
||||||
} else {
|
} else {
|
||||||
$tmpcode='<input name="ref" size="20" maxlength="128" value="'.dol_escape_htmltag(GETPOST('ref')?GETPOST('ref'):$tmpcode).'">';
|
$tmpcode='<input name="ref" class="maxwidth100" maxlength="128" value="'.dol_escape_htmltag(GETPOST('ref')?GETPOST('ref'):$tmpcode).'">';
|
||||||
}
|
}
|
||||||
print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans('Ref').'</td><td colspan="2">'.$tmpcode.'</td></tr>';
|
print $tmpcode;
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
// Ref customer
|
// Ref customer
|
||||||
print '<tr><td>'.$langs->trans('RefCustomer').'</td>';
|
print '<tr><td>'.$langs->trans('RefCustomer').'</td>';
|
||||||
print '<td colspan="2"><input type="text" size="5" name="ref_customer" id="ref_customer" value="'.GETPOST('ref_customer','alpha').'"></td></tr>';
|
print '<td><input type="text" class="maxwidth150" name="ref_customer" id="ref_customer" value="'.dol_escape_htmltag(GETPOST('ref_customer','alpha')).'"></td></tr>';
|
||||||
|
|
||||||
// Ref supplier
|
// Ref supplier
|
||||||
print '<tr><td>'.$langs->trans('RefSupplier').'</td>';
|
print '<tr><td>'.$langs->trans('RefSupplier').'</td>';
|
||||||
print '<td colspan="2"><input type="text" size="5" name="ref_supplier" id="ref_supplier" value="'.GETPOST('ref_supplier','alpha').'"></td></tr>';
|
print '<td><input type="text" class="maxwidth150" name="ref_supplier" id="ref_supplier" value="'.dol_escape_htmltag(GETPOST('ref_supplier','alpha')).'"></td></tr>';
|
||||||
|
|
||||||
// Thirdparty
|
// Thirdparty
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td class="fieldrequired">'.$langs->trans('ThirdParty').'</td>';
|
print '<td class="fieldrequired">'.$langs->trans('ThirdParty').'</td>';
|
||||||
if ($socid>0)
|
if ($socid>0)
|
||||||
{
|
{
|
||||||
print '<td colspan="2">';
|
print '<td>';
|
||||||
print $soc->getNomUrl(1);
|
print $soc->getNomUrl(1);
|
||||||
print '<input type="hidden" name="socid" value="'.$soc->id.'">';
|
print '<input type="hidden" name="socid" value="'.$soc->id.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td colspan="2">';
|
print '<td>';
|
||||||
print $form->select_company('','socid','','SelectThirdParty',1);
|
print $form->select_company('','socid','','SelectThirdParty',1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
@ -1122,7 +1125,7 @@ if ($action == 'create')
|
|||||||
if($socid>0)
|
if($socid>0)
|
||||||
{
|
{
|
||||||
// Ligne info remises tiers
|
// Ligne info remises tiers
|
||||||
print '<tr><td>'.$langs->trans('Discounts').'</td><td colspan="2">';
|
print '<tr><td>'.$langs->trans('Discounts').'</td><td>';
|
||||||
if ($soc->remise_percent) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_percent);
|
if ($soc->remise_percent) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_percent);
|
||||||
else print $langs->trans("CompanyHasNoRelativeDiscount");
|
else print $langs->trans("CompanyHasNoRelativeDiscount");
|
||||||
print '. ';
|
print '. ';
|
||||||
@ -1158,11 +1161,9 @@ if ($action == 'create')
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("NotePublic").'</td><td valign="top">';
|
print '<tr><td>'.$langs->trans("NotePublic").'</td><td valign="top">';
|
||||||
|
|
||||||
|
|
||||||
$doleditor=new DolEditor('note_public', $note_public, '', '100', 'dolibarr_notes', 'In', 1, true, true, ROWS_3, '90%');
|
$doleditor=new DolEditor('note_public', $note_public, '', '100', 'dolibarr_notes', 'In', 1, true, true, ROWS_3, '90%');
|
||||||
print $doleditor->Create(1);
|
print $doleditor->Create(1);
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
if (empty($user->societe_id))
|
if (empty($user->societe_id))
|
||||||
{
|
{
|
||||||
@ -1293,47 +1294,75 @@ else
|
|||||||
print $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneContract'), $langs->trans('ConfirmCloneContract', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
|
print $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneContract'), $langs->trans('ConfirmCloneContract', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
// Contract card
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/contrat/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/contrat/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
// Ref du contrat
|
|
||||||
if (! empty($modCodeContract->code_auto)) {
|
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td colspan="3">';
|
|
||||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
|
|
||||||
print "</td></tr>";
|
|
||||||
} else {
|
|
||||||
print '<tr>';
|
|
||||||
print '<td class="titlefieldcreate">';
|
|
||||||
print $form->editfieldkey("Ref",'ref',$object->ref,$object,$user->rights->contrat->creer);
|
|
||||||
print '</td><td>';
|
|
||||||
print $form->editfieldval("Ref",'ref',$object->ref,$object,$user->rights->contrat->creer);
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<tr>';
|
|
||||||
print '<td>';
|
|
||||||
print $form->editfieldkey("RefCustomer",'ref_customer',$object->ref_customer,$object,$user->rights->contrat->creer);
|
|
||||||
print '</td><td>';
|
|
||||||
print $form->editfieldval("RefCustomer",'ref_customer',$object->ref_customer,$object,$user->rights->contrat->creer);
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
print '<tr>';
|
$morehtmlref='';
|
||||||
print '<td>';
|
if (! empty($modCodeContract->code_auto)) {
|
||||||
print $form->editfieldkey("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer);
|
$morehtmlref.=$object->ref;
|
||||||
print '</td><td>';
|
} else {
|
||||||
print $form->editfieldval("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer);
|
$morehtmlref.=$form->editfieldkey("",'ref',$object->ref,$object,$user->rights->contrat->creer,'string','',0,3);
|
||||||
print '</td>';
|
$morehtmlref.=$form->editfieldval("",'ref',$object->ref,$object,$user->rights->contrat->creer,'string','',0,2);
|
||||||
print '</tr>';
|
}
|
||||||
|
|
||||||
|
$morehtmlref.='<div class="refidno">';
|
||||||
|
// Ref customer
|
||||||
|
$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->rights->contrat->creer, 'string', '', 0, 1);
|
||||||
|
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->rights->contrat->creer, 'string', '', null, null, '', 1);
|
||||||
|
// Ref supplier
|
||||||
|
$morehtmlref.='<br>';
|
||||||
|
$morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->contrat->creer, 'string', '', 0, 1);
|
||||||
|
$morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->contrat->creer, 'string', '', null, null, '', 1);
|
||||||
|
// Thirdparty
|
||||||
|
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
|
||||||
|
// Project
|
||||||
|
if (! empty($conf->projet->enabled))
|
||||||
|
{
|
||||||
|
$langs->load("projects");
|
||||||
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
|
if ($user->rights->contrat->creer)
|
||||||
|
{
|
||||||
|
if ($action != 'classify')
|
||||||
|
$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
if ($action == 'classify') {
|
||||||
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
$morehtmlref.='<input type="hidden" name="action" value="classin">';
|
||||||
|
$morehtmlref.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
$morehtmlref.=$formproject->select_projects($object->thirdparty->id, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
|
||||||
|
$morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
|
||||||
|
$morehtmlref.='</form>';
|
||||||
|
} else {
|
||||||
|
$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->thirdparty->id, $object->fk_project, 'none', 0, 0, 0, 1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (! empty($object->fk_project)) {
|
||||||
|
$proj = new Project($db);
|
||||||
|
$proj->fetch($object->fk_project);
|
||||||
|
$morehtmlref.='<a href="'.DOL_URL_ROOT.'/projet/card.php?id=' . $object->fk_project . '" title="' . $langs->trans('ShowProject') . '">';
|
||||||
|
$morehtmlref.=$proj->ref;
|
||||||
|
$morehtmlref.='</a>';
|
||||||
|
} else {
|
||||||
|
$morehtmlref.='';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$morehtmlref.='</div>';
|
||||||
|
|
||||||
// Customer
|
|
||||||
print "<tr><td>".$langs->trans("Customer")."</td>";
|
|
||||||
print '<td colspan="3">'.$object->thirdparty->getNomUrl(1).'</td></tr>';
|
|
||||||
|
|
||||||
|
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'none', $morehtmlref);
|
||||||
|
|
||||||
|
|
||||||
|
print '<div class="fichecenter">';
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
|
|
||||||
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Ligne info remises tiers
|
// Ligne info remises tiers
|
||||||
print '<tr><td>'.$langs->trans('Discount').'</td><td colspan="3">';
|
print '<tr><td class="titlefield">'.$langs->trans('Discount').'</td><td colspan="3">';
|
||||||
if ($object->thirdparty->remise_percent) print $langs->trans("CompanyHasRelativeDiscount",$object->thirdparty->remise_percent);
|
if ($object->thirdparty->remise_percent) print $langs->trans("CompanyHasRelativeDiscount",$object->thirdparty->remise_percent);
|
||||||
else print $langs->trans("CompanyHasNoRelativeDiscount");
|
else print $langs->trans("CompanyHasNoRelativeDiscount");
|
||||||
$absolute_discount=$object->thirdparty->getAvailableDiscounts();
|
$absolute_discount=$object->thirdparty->getAvailableDiscounts();
|
||||||
@ -1343,44 +1372,15 @@ else
|
|||||||
print '.';
|
print '.';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Statut contrat
|
|
||||||
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="3">';
|
|
||||||
if ($object->statut==0) print $object->getLibStatut(2);
|
|
||||||
else print $object->getLibStatut(4);
|
|
||||||
print "</td></tr>";
|
|
||||||
|
|
||||||
// Date
|
// Date
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>';
|
print '<td class="titlefield">';
|
||||||
print $form->editfieldkey("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer);
|
print $form->editfieldkey("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer);
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print $form->editfieldval("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer,'datehourpicker');
|
print $form->editfieldval("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer,'datehourpicker');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
/* print '<tr><td>'.$langs->trans("Date").'</td>';
|
|
||||||
print '<td colspan="3">'.dol_print_date($object->date_contrat,"dayhour")."</td></tr>\n";*/
|
|
||||||
|
|
||||||
// Projet
|
|
||||||
if (! empty($conf->projet->enabled))
|
|
||||||
{
|
|
||||||
$langs->load("projects");
|
|
||||||
print '<tr><td>';
|
|
||||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
|
||||||
print $langs->trans("Project");
|
|
||||||
print '</td>';
|
|
||||||
if ($action != "classify" && $user->rights->projet->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=classify&id='.$object->id.'">'.img_edit($langs->trans("SetProject")).'</a></td>';
|
|
||||||
print '</tr></table>';
|
|
||||||
print '</td><td colspan="3">';
|
|
||||||
if ($action == "classify")
|
|
||||||
{
|
|
||||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, "projectid", 1, 0, 1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, "none", 0, 0);
|
|
||||||
}
|
|
||||||
print "</td></tr>";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$cols = 3;
|
$cols = 3;
|
||||||
@ -1388,12 +1388,14 @@ else
|
|||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
if (! empty($object->brouillon) && $user->rights->contrat->creer)
|
if (! empty($object->brouillon) && $user->rights->contrat->creer)
|
||||||
{
|
{
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<br>';
|
//echo '<br>';
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
|
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
|
||||||
{
|
{
|
||||||
@ -1457,8 +1459,8 @@ else
|
|||||||
|
|
||||||
print '<tr class="liste_titre'.($cursorline?' liste_titre_add':'').'">';
|
print '<tr class="liste_titre'.($cursorline?' liste_titre_add':'').'">';
|
||||||
print '<td>'.$langs->trans("ServiceNb",$cursorline).'</td>';
|
print '<td>'.$langs->trans("ServiceNb",$cursorline).'</td>';
|
||||||
print '<td width="50" align="center">'.$langs->trans("VAT").'</td>';
|
print '<td width="80" align="center">'.$langs->trans("VAT").'</td>';
|
||||||
print '<td width="50" align="right">'.$langs->trans("PriceUHT").'</td>';
|
print '<td width="80" align="right">'.$langs->trans("PriceUHT").'</td>';
|
||||||
print '<td width="30" align="center">'.$langs->trans("Qty").'</td>';
|
print '<td width="30" align="center">'.$langs->trans("Qty").'</td>';
|
||||||
if ($conf->global->PRODUCT_USE_UNITS) print '<td width="30" align="left">'.$langs->trans("Unit").'</td>';
|
if ($conf->global->PRODUCT_USE_UNITS) print '<td width="30" align="left">'.$langs->trans("Unit").'</td>';
|
||||||
print '<td width="50" align="right">'.$langs->trans("ReductionShort").'</td>';
|
print '<td width="50" align="right">'.$langs->trans("ReductionShort").'</td>';
|
||||||
@ -1606,7 +1608,7 @@ else
|
|||||||
}
|
}
|
||||||
// Ligne en mode update
|
// Ligne en mode update
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Ligne carac
|
// Ligne carac
|
||||||
print "<tr ".$bc[$var].">";
|
print "<tr ".$bc[$var].">";
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -1691,7 +1693,7 @@ else
|
|||||||
if ($object->statut > 0)
|
if ($object->statut > 0)
|
||||||
{
|
{
|
||||||
print '<tr '.$bc[$var].'>';
|
print '<tr '.$bc[$var].'>';
|
||||||
print '<td colspan="'.($conf->margin->enabled?7:6).'"><hr></td>';
|
print '<td colspan="'.($conf->margin->enabled?7:6).'"><hr class="opacitymedium"></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1927,8 +1929,6 @@ else
|
|||||||
<input type="hidden" name="id" value="'.$object->id.'">
|
<input type="hidden" name="id" value="'.$object->id.'">
|
||||||
';
|
';
|
||||||
|
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
print '<div class="div-table-responsive">';
|
print '<div class="div-table-responsive">';
|
||||||
print '<table id="tablelines" class="noborder noshadow" width="100%">'; // Array with (n*2)+1 lines
|
print '<table id="tablelines" class="noborder noshadow" width="100%">'; // Array with (n*2)+1 lines
|
||||||
|
|
||||||
|
|||||||
@ -45,7 +45,8 @@ class Contrat extends CommonObject
|
|||||||
public $table_element_line='contratdet';
|
public $table_element_line='contratdet';
|
||||||
public $fk_element='fk_contrat';
|
public $fk_element='fk_contrat';
|
||||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||||
|
public $picto='contract';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -3301,7 +3301,7 @@ abstract class CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
// VAT
|
// VAT
|
||||||
print '<td class="linecolvat" align="right" width="50">'.$langs->trans('VAT').'</td>';
|
print '<td class="linecolvat" align="right" width="80">'.$langs->trans('VAT').'</td>';
|
||||||
|
|
||||||
// Price HT
|
// Price HT
|
||||||
print '<td class="linecoluht" align="right" width="80">'.$langs->trans('PriceUHT').'</td>';
|
print '<td class="linecoluht" align="right" width="80">'.$langs->trans('PriceUHT').'</td>';
|
||||||
|
|||||||
@ -78,9 +78,9 @@ class Form
|
|||||||
* @param object $object Object
|
* @param object $object Object
|
||||||
* @param boolean $perm Permission to allow button to edit parameter. Set it to 0 to have a not edited field.
|
* @param boolean $perm Permission to allow button to edit parameter. Set it to 0 to have a not edited field.
|
||||||
* @param string $typeofdata Type of data ('string' by default, 'email', 'amount:99', 'numeric:99', 'text' or 'textarea:rows:cols', 'datepicker' ('day' do not work, don't know why), 'ckeditor:dolibarr_zzz:width:height:savemethod:1:rows:cols', 'select;xxx[:class]'...)
|
* @param string $typeofdata Type of data ('string' by default, 'email', 'amount:99', 'numeric:99', 'text' or 'textarea:rows:cols', 'datepicker' ('day' do not work, don't know why), 'ckeditor:dolibarr_zzz:width:height:savemethod:1:rows:cols', 'select;xxx[:class]'...)
|
||||||
* @param string $moreparam More param to add on a href URL*
|
* @param string $moreparam More param to add on a href URL.
|
||||||
* @param int $fieldrequired 1 if we want to show field as mandatory using the "fieldrequired" CSS.
|
* @param int $fieldrequired 1 if we want to show field as mandatory using the "fieldrequired" CSS.
|
||||||
* @param int $notabletag 1=Do not output table tags but output a ':', 2=Do not output table tags and no ':'
|
* @param int $notabletag 1=Do not output table tags but output a ':', 2=Do not output table tags and no ':', 3=Do not output table tags but output a ' '
|
||||||
* @return string HTML edit field
|
* @return string HTML edit field
|
||||||
*/
|
*/
|
||||||
function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata='string', $moreparam='', $fieldrequired=0, $notabletag=0)
|
function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata='string', $moreparam='', $fieldrequired=0, $notabletag=0)
|
||||||
@ -119,6 +119,7 @@ class Form
|
|||||||
if (empty($notabletag) && GETPOST('action') != 'edit'.$htmlname && $perm) $ret.='<td align="right">';
|
if (empty($notabletag) && GETPOST('action') != 'edit'.$htmlname && $perm) $ret.='<td align="right">';
|
||||||
if ($htmlname && GETPOST('action') != 'edit'.$htmlname && $perm) $ret.='<a href="'.$_SERVER["PHP_SELF"].'?action=edit'.$htmlname.'&id='.$object->id.$moreparam.'">'.img_edit($langs->trans('Edit'), ($notabletag ? 0 : 1)).'</a>';
|
if ($htmlname && GETPOST('action') != 'edit'.$htmlname && $perm) $ret.='<a href="'.$_SERVER["PHP_SELF"].'?action=edit'.$htmlname.'&id='.$object->id.$moreparam.'">'.img_edit($langs->trans('Edit'), ($notabletag ? 0 : 1)).'</a>';
|
||||||
if (! empty($notabletag) && $notabletag == 1) $ret.=' : ';
|
if (! empty($notabletag) && $notabletag == 1) $ret.=' : ';
|
||||||
|
if (! empty($notabletag) && $notabletag == 3) $ret.=' ';
|
||||||
if (empty($notabletag) && GETPOST('action') != 'edit'.$htmlname && $perm) $ret.='</td>';
|
if (empty($notabletag) && GETPOST('action') != 'edit'.$htmlname && $perm) $ret.='</td>';
|
||||||
if (empty($notabletag) && GETPOST('action') != 'edit'.$htmlname && $perm) $ret.='</tr></table>';
|
if (empty($notabletag) && GETPOST('action') != 'edit'.$htmlname && $perm) $ret.='</tr></table>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -56,6 +56,18 @@ function expensereport_prepare_head($object)
|
|||||||
$head[$h][2] = 'documents';
|
$head[$h][2] = 'documents';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))
|
||||||
|
{
|
||||||
|
$nbNote = 0;
|
||||||
|
if(!empty($object->note_private)) $nbNote++;
|
||||||
|
if(!empty($object->note_public)) $nbNote++;
|
||||||
|
$head[$h][0] = DOL_URL_ROOT.'/expensereport/note.php?id='.$object->id;
|
||||||
|
$head[$h][1] = $langs->trans('Notes');
|
||||||
|
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>';
|
||||||
|
$head[$h][2] = 'note';
|
||||||
|
$h++;
|
||||||
|
}
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT . '/expensereport/info.php?id=' . $object->id;
|
$head[$h][0] = DOL_URL_ROOT . '/expensereport/info.php?id=' . $object->id;
|
||||||
$head[$h][1] = $langs->trans("Info");
|
$head[$h][1] = $langs->trans("Info");
|
||||||
$head[$h][2] = 'info';
|
$head[$h][2] = 'info';
|
||||||
|
|||||||
@ -1061,9 +1061,10 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
|||||||
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3) || $conf->browser->layout=='phone') $tmptxt=$object->getLibStatut(5, $object->totalpaye);
|
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3) || $conf->browser->layout=='phone') $tmptxt=$object->getLibStatut(5, $object->totalpaye);
|
||||||
$morehtmlstatus.=$tmptxt;
|
$morehtmlstatus.=$tmptxt;
|
||||||
}
|
}
|
||||||
elseif ($object->element == 'facturerec')
|
elseif ($object->element == 'contrat')
|
||||||
{
|
{
|
||||||
$morehtmlstatus.='<!-- No status for recurring invoice -->';
|
if ($object->statut==0) $morehtmlstatus.=$object->getLibStatut(2);
|
||||||
|
else $morehtmlstatus.=$object->getLibStatut(4);
|
||||||
}
|
}
|
||||||
else { // Generic case
|
else { // Generic case
|
||||||
$tmptxt=$object->getLibStatut(6);
|
$tmptxt=$object->getLibStatut(6);
|
||||||
@ -1215,6 +1216,7 @@ function dol_strftime($fmt, $ts=false, $is_gmt=false)
|
|||||||
* "%d %b %Y",
|
* "%d %b %Y",
|
||||||
* "%d/%m/%Y %H:%M",
|
* "%d/%m/%Y %H:%M",
|
||||||
* "%d/%m/%Y %H:%M:%S",
|
* "%d/%m/%Y %H:%M:%S",
|
||||||
|
* "%B"=Long text of month, "%A"=Long text of day, "%b"=Short text of month, "%a"=Short text of day
|
||||||
* "day", "daytext", "dayhour", "dayhourldap", "dayhourtext", "dayrfc", "dayhourrfc", "...reduceformat"
|
* "day", "daytext", "dayhour", "dayhourldap", "dayhourtext", "dayrfc", "dayhourrfc", "...reduceformat"
|
||||||
* @param string $tzoutput true or 'gmt' => string is for Greenwich location
|
* @param string $tzoutput true or 'gmt' => string is for Greenwich location
|
||||||
* false or 'tzserver' => output string is for local PHP server TZ usage
|
* false or 'tzserver' => output string is for local PHP server TZ usage
|
||||||
@ -2585,7 +2587,7 @@ function img_warning($titlealt = 'default', $morealt = '')
|
|||||||
|
|
||||||
if ($titlealt == 'default') $titlealt = $langs->trans('Warning');
|
if ($titlealt == 'default') $titlealt = $langs->trans('Warning');
|
||||||
|
|
||||||
return img_picto($titlealt, 'warning.png', 'class="pictowarning"'.($morealt ? ($morealt == '1' ? ' style="float: right"' : ' '.$morealt): ''));
|
return img_picto($titlealt, 'warning.png', 'class="pictowarning valignmiddle"'.($morealt ? ($morealt == '1' ? ' style="float: right"' : ' '.$morealt): ''));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -681,15 +681,15 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
if (! empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) $menutoshow=$langs->trans("CustomersCategoriesShort");
|
if (! empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) $menutoshow=$langs->trans("CustomersCategoriesShort");
|
||||||
if (! empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $menutoshow=$langs->trans("ProspectsCategoriesShort");
|
if (! empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $menutoshow=$langs->trans("ProspectsCategoriesShort");
|
||||||
$newmenu->add("/categories/index.php?leftmenu=cat&type=2", $menutoshow, 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
$newmenu->add("/categories/index.php?leftmenu=cat&type=2", $menutoshow, 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||||
$newmenu->add("/categories/card.php?action=create&type=2", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
$newmenu->add("/categories/card.php?action=create&type=2", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
||||||
}
|
}
|
||||||
// Categories Contact
|
// Categories Contact
|
||||||
$newmenu->add("/categories/index.php?leftmenu=cat&type=4", $langs->trans("ContactCategoriesShort"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
$newmenu->add("/categories/index.php?leftmenu=catcontact&type=4", $langs->trans("ContactCategoriesShort"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||||
$newmenu->add("/categories/card.php?action=create&type=4", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
$newmenu->add("/categories/card.php?action=create&type=4", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
||||||
// Categories suppliers
|
// Categories suppliers
|
||||||
if (! empty($conf->fournisseur->enabled))
|
if (! empty($conf->fournisseur->enabled))
|
||||||
{
|
{
|
||||||
$newmenu->add("/categories/index.php?leftmenu=cat&type=1", $langs->trans("SuppliersCategoriesShort"), 0, $user->rights->categorie->lire);
|
$newmenu->add("/categories/index.php?leftmenu=catfournish&type=1", $langs->trans("SuppliersCategoriesShort"), 0, $user->rights->categorie->lire);
|
||||||
$newmenu->add("/categories/card.php?action=create&type=1", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
$newmenu->add("/categories/card.php?action=create&type=1", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
||||||
}
|
}
|
||||||
//if ($usemenuhider || empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->rights->categorie->lire);
|
//if ($usemenuhider || empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->rights->categorie->lire);
|
||||||
|
|||||||
@ -72,13 +72,13 @@ else $typeofdata='textarea:12:95%';
|
|||||||
<div class="tagtable border table-border centpercent">
|
<div class="tagtable border table-border centpercent">
|
||||||
<?php if ($module != 'product') { // No public note yet on products ?>
|
<?php if ($module != 'product') { // No public note yet on products ?>
|
||||||
<div class="tagtr table-border-row">
|
<div class="tagtr table-border-row">
|
||||||
<div class="tagtd table-key-border-col<?php echo (empty($cssclass)?'':' '.$cssclass); ?>"<?php echo ($colwidth ? ' style="width: '.$colwidth.'%"' : ''); ?>><?php echo $form->editfieldkey("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, $moreparam, '', 0); ?></div>
|
<div class="tagtd tdtop table-key-border-col<?php echo (empty($cssclass)?'':' '.$cssclass); ?>"<?php echo ($colwidth ? ' style="width: '.$colwidth.'%"' : ''); ?>><?php echo $form->editfieldkey("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, $moreparam, '', 0); ?></div>
|
||||||
<div class="tagtd table-val-border-col"><?php echo $form->editfieldval("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, '', null, null, $moreparam, 1); ?></div>
|
<div class="tagtd table-val-border-col"><?php echo $form->editfieldval("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, '', null, null, $moreparam, 1); ?></div>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (empty($user->societe_id)) { ?>
|
<?php if (empty($user->societe_id)) { ?>
|
||||||
<div class="tagtr table-border-row">
|
<div class="tagtr table-border-row">
|
||||||
<div class="tagtd table-key-border-col<?php echo (empty($cssclass)?'':' '.$cssclass); ?>"<?php echo ($colwidth ? ' style="width: '.$colwidth.'%"' : ''); ?>><?php echo $form->editfieldkey("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, $moreparam, '', 0); ?></div>
|
<div class="tagtd tdtop table-key-border-col<?php echo (empty($cssclass)?'':' '.$cssclass); ?>"<?php echo ($colwidth ? ' style="width: '.$colwidth.'%"' : ''); ?>><?php echo $form->editfieldkey("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, $moreparam, '', 0); ?></div>
|
||||||
<div class="tagtd table-val-border-col"><?php echo $form->editfieldval("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, '', null, null, $moreparam, 1); ?></div>
|
<div class="tagtd table-val-border-col"><?php echo $form->editfieldval("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, '', null, null, $moreparam, 1); ?></div>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@ -107,7 +107,7 @@ if ($nolinesbefore) {
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<tr class="pair nodrag nodrop nohoverpair<?php echo $nolinesbefore?'':' liste_titre_add'; ?>">
|
<tr class="pair nodrag nodrop nohoverpair<?php echo ($nolinesbefore || $object->element=='contrat')?'':' liste_titre_add'; ?>">
|
||||||
<?php
|
<?php
|
||||||
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
|
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
|
||||||
$coldisplay=2; }
|
$coldisplay=2; }
|
||||||
|
|||||||
@ -88,9 +88,20 @@ print "</tr>";
|
|||||||
|
|
||||||
print '<tr class="impair">';
|
print '<tr class="impair">';
|
||||||
print '<td class="fieldrequired">'.$langs->trans("KeyForCronAccess").'</td>';
|
print '<td class="fieldrequired">'.$langs->trans("KeyForCronAccess").'</td>';
|
||||||
print '<td><input type="text" class="flat" id="CRON_KEY" name="CRON_KEY" value="'. (GETPOST('CRON_KEY')?GETPOST('CRON_KEY'):(! empty($conf->global->CRON_KEY)?$conf->global->CRON_KEY:'')) . '" size="40">';
|
$disabled='';
|
||||||
if (! empty($conf->use_javascript_ajax))
|
if (! empty($conf->global->CRON_DISABLE_KEY_CHANGE)) $disabled=' disabled="disabled"';
|
||||||
print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"');
|
print '<td>';
|
||||||
|
if (empty($conf->global->CRON_DISABLE_KEY_CHANGE))
|
||||||
|
{
|
||||||
|
print '<input type="text" class="flat minwidth200"'.$disabled.' id="CRON_KEY" name="CRON_KEY" value="'. (GETPOST('CRON_KEY')?GETPOST('CRON_KEY'):(! empty($conf->global->CRON_KEY)?$conf->global->CRON_KEY:'')) . '">';
|
||||||
|
if (! empty($conf->use_javascript_ajax))
|
||||||
|
print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print (! empty($conf->global->CRON_KEY)?$conf->global->CRON_KEY:'');
|
||||||
|
print '<input type="hidden" id="CRON_KEY" name="CRON_KEY" value="'. (GETPOST('CRON_KEY')?GETPOST('CRON_KEY'):(! empty($conf->global->CRON_KEY)?$conf->global->CRON_KEY:'')) . '">';
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
@ -1,29 +0,0 @@
|
|||||||
<?php
|
|
||||||
/* Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
* 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
|
|
||||||
* 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/>.
|
|
||||||
* or see http://www.gnu.org/
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \file htdocs/disabled.php
|
|
||||||
* \brief Page to use to replace index.php to disable all software
|
|
||||||
*/
|
|
||||||
?>
|
|
||||||
<html>
|
|
||||||
<body>
|
|
||||||
This feature has been disabled on this test server.<br>
|
|
||||||
Cette fonctionnalité a été désactivée sur ce serveur de test.<br>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@ -31,7 +31,10 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/sendings.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/sendings.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||||
if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php';
|
||||||
|
}
|
||||||
if (! empty($conf->stock->enabled)) require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
|
if (! empty($conf->stock->enabled)) require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
|
||||||
if (! empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
if (! empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
@ -53,108 +56,165 @@ $socid=0;
|
|||||||
if (! empty($user->societe_id)) $socid=$user->societe_id;
|
if (! empty($user->societe_id)) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'commande',$id);
|
$result=restrictedArea($user,'commande',$id);
|
||||||
|
|
||||||
|
$object = new Commande($db);
|
||||||
|
$extrafields = new ExtraFields($db);
|
||||||
|
|
||||||
|
// fetch optionals attributes and labels
|
||||||
|
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
|
|
||||||
|
// Load object
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Categorisation dans projet
|
$parameters = array('socid' => $socid);
|
||||||
if ($action == 'classin')
|
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
|
||||||
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
$commande = new Commande($db);
|
// Categorisation dans projet
|
||||||
$commande->fetch($id);
|
if ($action == 'classin')
|
||||||
$commande->setProject(GETPOST('projectid','int'));
|
{
|
||||||
|
$object = new Commande($db);
|
||||||
|
$object->fetch($id);
|
||||||
|
$object->setProject(GETPOST('projectid','int'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($action == 'confirm_cloture' && GETPOST('confirm','alpha') == 'yes')
|
||||||
|
{
|
||||||
|
$object = new Commande($db);
|
||||||
|
$object->fetch($id);
|
||||||
|
$result = $object->cloture($user);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Positionne ref commande client
|
||||||
|
else if ($action == 'setref_client' && $user->rights->commande->creer) {
|
||||||
|
$result = $object->set_ref_client($user, GETPOST('ref_client'));
|
||||||
|
if ($result < 0)
|
||||||
|
{
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($action == 'setdatedelivery' && $user->rights->commande->creer)
|
||||||
|
{
|
||||||
|
//print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year'];
|
||||||
|
$datelivraison=dol_mktime(0, 0, 0, GETPOST('liv_month','int'), GETPOST('liv_day','int'),GETPOST('liv_year','int'));
|
||||||
|
|
||||||
|
$object = new Commande($db);
|
||||||
|
$object->fetch($id);
|
||||||
|
$result=$object->set_date_livraison($user,$datelivraison);
|
||||||
|
if ($result < 0)
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($action == 'setdeliveryaddress' && $user->rights->commande->creer)
|
||||||
|
{
|
||||||
|
$object = new Commande($db);
|
||||||
|
$object->fetch($id);
|
||||||
|
$object->setDeliveryAddress(GETPOST('delivery_address_id','int'));
|
||||||
|
if ($result < 0)
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($action == 'setmode' && $user->rights->commande->creer)
|
||||||
|
{
|
||||||
|
$object = new Commande($db);
|
||||||
|
$object->fetch($id);
|
||||||
|
$result = $object->setPaymentMethods(GETPOST('mode_reglement_id','int'));
|
||||||
|
if ($result < 0)
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($action == 'setavailability' && $user->rights->commande->creer) {
|
||||||
|
$object = new Commande($db);
|
||||||
|
$object->fetch($id);
|
||||||
|
$result=$object->availability(GETPOST('availability_id'));
|
||||||
|
if ($result < 0)
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($action == 'setdemandreason' && $user->rights->commande->creer) {
|
||||||
|
$object = new Commande($db);
|
||||||
|
$object->fetch($id);
|
||||||
|
$result=$object->demand_reason(GETPOST('demand_reason_id'));
|
||||||
|
if ($result < 0)
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($action == 'setconditions' && $user->rights->commande->creer)
|
||||||
|
{
|
||||||
|
$object = new Commande($db);
|
||||||
|
$object->fetch($id);
|
||||||
|
$result=$object->setPaymentTerms(GETPOST('cond_reglement_id','int'));
|
||||||
|
if ($result < 0)
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
|
||||||
|
// shipping method
|
||||||
|
if ($action == 'setshippingmethod' && $user->rights->commande->creer) {
|
||||||
|
$object = new Commande($db);
|
||||||
|
$object->fetch($id);
|
||||||
|
$result=$object->setShippingMethod(GETPOST('shipping_method_id', 'int'));
|
||||||
|
if ($result < 0)
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
|
||||||
|
// warehouse
|
||||||
|
if ($action == 'setwarehouse' && $user->rights->commande->creer) {
|
||||||
|
$object = new Commande($db);
|
||||||
|
$object->fetch($id);
|
||||||
|
$result = $object->setWarehouse(GETPOST('warehouse_id', 'int'));
|
||||||
|
if ($result < 0)
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($action == 'update_extras')
|
||||||
|
{
|
||||||
|
// Fill array 'array_options' with data from update form
|
||||||
|
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
|
$ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute'));
|
||||||
|
if ($ret < 0) $error++;
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
// Actions on extra fields (by external module or standard code)
|
||||||
|
$hookmanager->initHooks(array('orderdao'));
|
||||||
|
$parameters = array('id' => $object->id);
|
||||||
|
$reshook = $hookmanager->executeHooks('insertExtraFields', $parameters, $object, $action); // Note that $action and $object may have been modified by
|
||||||
|
// some hooks
|
||||||
|
if (empty($reshook)) {
|
||||||
|
$result = $object->insertExtraFields();
|
||||||
|
if ($result < 0) {
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
} else if ($reshook < 0)
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($error)
|
||||||
|
$action = 'edit_extras';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($action == 'set_thirdparty' && $user->rights->commande->creer)
|
||||||
|
{
|
||||||
|
$object->fetch($id);
|
||||||
|
$object->setValueFrom('fk_soc', $socid, '', '', 'date', '', $user, 'ORDER_MODIFY');
|
||||||
|
|
||||||
|
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id);
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'confirm_cloture' && GETPOST('confirm','alpha') == 'yes')
|
|
||||||
{
|
|
||||||
$commande = new Commande($db);
|
|
||||||
$commande->fetch($id);
|
|
||||||
$result = $commande->cloture($user);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Positionne ref commande client
|
|
||||||
if ($action == 'setrefcustomer' && $user->rights->commande->creer)
|
|
||||||
{
|
|
||||||
$commande = new Commande($db);
|
|
||||||
$commande->fetch($id);
|
|
||||||
$commande->set_ref_client($user,GETPOST('ref_customer','alpha'));
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'setdatedelivery' && $user->rights->commande->creer)
|
|
||||||
{
|
|
||||||
//print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year'];
|
|
||||||
$datelivraison=dol_mktime(0, 0, 0, GETPOST('liv_month','int'), GETPOST('liv_day','int'),GETPOST('liv_year','int'));
|
|
||||||
|
|
||||||
$commande = new Commande($db);
|
|
||||||
$commande->fetch($id);
|
|
||||||
$result=$commande->set_date_livraison($user,$datelivraison);
|
|
||||||
if ($result < 0)
|
|
||||||
setEventMessages($commande->error, $commande->errors, 'errors');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'setdeliveryaddress' && $user->rights->commande->creer)
|
|
||||||
{
|
|
||||||
$commande = new Commande($db);
|
|
||||||
$commande->fetch($id);
|
|
||||||
$commande->setDeliveryAddress(GETPOST('delivery_address_id','int'));
|
|
||||||
if ($result < 0)
|
|
||||||
setEventMessages($commande->error, $commande->errors, 'errors');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'setmode' && $user->rights->commande->creer)
|
|
||||||
{
|
|
||||||
$commande = new Commande($db);
|
|
||||||
$commande->fetch($id);
|
|
||||||
$result = $commande->setPaymentMethods(GETPOST('mode_reglement_id','int'));
|
|
||||||
if ($result < 0)
|
|
||||||
setEventMessages($commande->error, $commande->errors, 'errors');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'setavailability' && $user->rights->commande->creer) {
|
|
||||||
$commande = new Commande($db);
|
|
||||||
$commande->fetch($id);
|
|
||||||
$result=$commande->availability(GETPOST('availability_id'));
|
|
||||||
if ($result < 0)
|
|
||||||
setEventMessages($commande->error, $commande->errors, 'errors');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'setdemandreason' && $user->rights->commande->creer) {
|
|
||||||
$commande = new Commande($db);
|
|
||||||
$commande->fetch($id);
|
|
||||||
$result=$commande->demand_reason(GETPOST('demand_reason_id'));
|
|
||||||
if ($result < 0)
|
|
||||||
setEventMessages($commande->error, $commande->errors, 'errors');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'setconditions' && $user->rights->commande->creer)
|
|
||||||
{
|
|
||||||
$commande = new Commande($db);
|
|
||||||
$commande->fetch($id);
|
|
||||||
$result=$commande->setPaymentTerms(GETPOST('cond_reglement_id','int'));
|
|
||||||
if ($result < 0)
|
|
||||||
setEventMessages($commande->error, $commande->errors, 'errors');
|
|
||||||
}
|
|
||||||
|
|
||||||
// shipping method
|
|
||||||
if ($action == 'setshippingmethod' && $user->rights->commande->creer) {
|
|
||||||
$commande = new Commande($db);
|
|
||||||
$commande->fetch($id);
|
|
||||||
$result=$commande->setShippingMethod(GETPOST('shipping_method_id', 'int'));
|
|
||||||
if ($result < 0)
|
|
||||||
setEventMessages($commande->error, $commande->errors, 'errors');
|
|
||||||
}
|
|
||||||
|
|
||||||
// warehouse
|
|
||||||
if ($action == 'setwarehouse' && $user->rights->commande->creer) {
|
|
||||||
$commande = new Commande($db);
|
|
||||||
$commande->fetch($id);
|
|
||||||
$result = $commande->setWarehouse(GETPOST('warehouse_id', 'int'));
|
|
||||||
if ($result < 0)
|
|
||||||
setEventMessages($commande->error, $commande->errors, 'errors');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
@ -162,81 +222,109 @@ if ($action == 'setwarehouse' && $user->rights->commande->creer) {
|
|||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formfile = new FormFile($db);
|
$formfile = new FormFile($db);
|
||||||
$formproduct = new FormProduct($db);
|
$formproduct = new FormProduct($db);
|
||||||
|
if (! empty($conf->projet->enabled)) { $formproject = new FormProjets($db); }
|
||||||
|
|
||||||
llxHeader('',$langs->trans('OrderCard'),'');
|
llxHeader('',$langs->trans('OrderCard'),'');
|
||||||
|
|
||||||
|
|
||||||
if ($id > 0 || ! empty($ref))
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
$commande = new Commande($db);
|
$object = new Commande($db);
|
||||||
if ( $commande->fetch($id,$ref) > 0)
|
if ( $object->fetch($id,$ref) > 0)
|
||||||
{
|
{
|
||||||
$commande->loadExpeditions(1);
|
$object->loadExpeditions(1);
|
||||||
|
|
||||||
$product_static=new Product($db);
|
$product_static=new Product($db);
|
||||||
|
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->fetch($commande->socid);
|
$soc->fetch($object->socid);
|
||||||
|
|
||||||
$author = new User($db);
|
$author = new User($db);
|
||||||
$author->fetch($commande->user_author_id);
|
$author->fetch($object->user_author_id);
|
||||||
|
|
||||||
$head = commande_prepare_head($commande);
|
$res = $object->fetch_optionals($object->id, $extralabels);
|
||||||
|
|
||||||
|
$head = commande_prepare_head($object);
|
||||||
dol_fiche_head($head, 'shipping', $langs->trans("CustomerOrder"), 0, 'order');
|
dol_fiche_head($head, 'shipping', $langs->trans("CustomerOrder"), 0, 'order');
|
||||||
|
|
||||||
/*
|
|
||||||
* Confirmation de la validation
|
$formconfirm = '';
|
||||||
*/
|
|
||||||
|
// Confirm validation
|
||||||
if ($action == 'cloture')
|
if ($action == 'cloture')
|
||||||
{
|
{
|
||||||
print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$id,$langs->trans("CloseShipment"),$langs->trans("ConfirmCloseShipment"),"confirm_cloture");
|
$formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=".$id,$langs->trans("CloseShipment"),$langs->trans("ConfirmCloseShipment"),"confirm_cloture");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Onglet commande
|
if (! $formconfirm) {
|
||||||
//$nbrow=8;
|
$parameters = array();
|
||||||
//if (! empty($conf->projet->enabled)) $nbrow++;
|
$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
|
if (empty($reshook)) $formconfirm.=$hookmanager->resPrint;
|
||||||
print '<table class="border" width="100%">';
|
elseif ($reshook > 0) $formconfirm=$hookmanager->resPrint;
|
||||||
|
|
||||||
// Ref
|
|
||||||
print '<tr><td class="titlefield">'.$langs->trans('Ref').'</td>';
|
|
||||||
print '<td colspan="3">';
|
|
||||||
print $form->showrefnav($commande,'ref','',1,'ref','ref');
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Ref commande client
|
|
||||||
print '<tr><td>';
|
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap">';
|
|
||||||
print $langs->trans('RefCustomer').'</td><td align="left">';
|
|
||||||
print '</td>';
|
|
||||||
if ($action != 'RefCustomerOrder' && $commande->brouillon) print '<td align="right"><a href="'.$_SERVER['PHP_SELF'].'?action=RefCustomerOrder&id='.$commande->id.'">'.img_edit($langs->trans('Modify')).'</a></td>';
|
|
||||||
print '</tr></table>';
|
|
||||||
print '</td><td colspan="3">';
|
|
||||||
if ($user->rights->commande->creer && $action == 'RefCustomerOrder')
|
|
||||||
{
|
|
||||||
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<input type="hidden" name="action" value="setrefcustomer">';
|
|
||||||
print '<input type="text" class="flat" size="20" name="ref_customer" value="'.$commande->ref_client.'">';
|
|
||||||
print ' <input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
|
||||||
print '</form>';
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
// Print form confirm
|
||||||
print $commande->ref_client;
|
print $formconfirm;
|
||||||
}
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
// Order card
|
||||||
|
|
||||||
// Third party
|
$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||||
print '<tr><td>'.$langs->trans('Company').'</td>';
|
|
||||||
print '<td colspan="3">'.$soc->getNomUrl(1).'</td>';
|
|
||||||
print '</tr>';
|
$morehtmlref='<div class="refidno">';
|
||||||
|
// Ref customer
|
||||||
|
$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->commande->creer, 'string', '', 0, 1);
|
||||||
|
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->commande->creer, 'string', '', null, null, '', 1);
|
||||||
|
// Thirdparty
|
||||||
|
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1);
|
||||||
|
// Project
|
||||||
|
if (! empty($conf->projet->enabled))
|
||||||
|
{
|
||||||
|
$langs->load("projects");
|
||||||
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
|
if ($user->rights->commande->creer)
|
||||||
|
{
|
||||||
|
if ($action != 'classify')
|
||||||
|
$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
if ($action == 'classify') {
|
||||||
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
$morehtmlref.='<input type="hidden" name="action" value="classin">';
|
||||||
|
$morehtmlref.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
$morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
|
||||||
|
$morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
|
||||||
|
$morehtmlref.='</form>';
|
||||||
|
} else {
|
||||||
|
$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (! empty($object->fk_project)) {
|
||||||
|
$proj = new Project($db);
|
||||||
|
$proj->fetch($object->fk_project);
|
||||||
|
$morehtmlref.='<a href="'.DOL_URL_ROOT.'/projet/card.php?id=' . $object->fk_project . '" title="' . $langs->trans('ShowProject') . '">';
|
||||||
|
$morehtmlref.=$proj->ref;
|
||||||
|
$morehtmlref.='</a>';
|
||||||
|
} else {
|
||||||
|
$morehtmlref.='';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$morehtmlref.='</div>';
|
||||||
|
|
||||||
|
|
||||||
|
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||||
|
|
||||||
|
|
||||||
|
print '<div class="fichecenter">';
|
||||||
|
print '<div class="fichehalfleft">';
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Discounts for third party
|
// Discounts for third party
|
||||||
print '<tr><td>'.$langs->trans('Discounts').'</td><td colspan="3">';
|
print '<tr><td class="titlefield">'.$langs->trans('Discounts').'</td><td colspan="3">';
|
||||||
if ($soc->remise_percent) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_percent);
|
if ($soc->remise_percent) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_percent);
|
||||||
else print $langs->trans("CompanyHasNoRelativeDiscount");
|
else print $langs->trans("CompanyHasNoRelativeDiscount");
|
||||||
print '. ';
|
print '. ';
|
||||||
@ -246,7 +334,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$absolute_creditnote=price2num($absolute_creditnote,'MT');
|
$absolute_creditnote=price2num($absolute_creditnote,'MT');
|
||||||
if ($absolute_discount)
|
if ($absolute_discount)
|
||||||
{
|
{
|
||||||
if ($commande->statut > Commande::STATUS_DRAFT)
|
if ($object->statut > Commande::STATUS_DRAFT)
|
||||||
{
|
{
|
||||||
print $langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->currency));
|
print $langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->currency));
|
||||||
}
|
}
|
||||||
@ -255,7 +343,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
// Remise dispo de type non avoir
|
// Remise dispo de type non avoir
|
||||||
$filter='fk_facture_source IS NULL';
|
$filter='fk_facture_source IS NULL';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
$form->form_remise_dispo($_SERVER["PHP_SELF"].'?id='.$commande->id,0,'remise_id',$soc->id,$absolute_discount,$filter, 0, '', 1);
|
$form->form_remise_dispo($_SERVER["PHP_SELF"].'?id='.$object->id,0,'remise_id',$soc->id,$absolute_discount,$filter, 0, '', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($absolute_creditnote)
|
if ($absolute_creditnote)
|
||||||
@ -268,9 +356,9 @@ if ($id > 0 || ! empty($ref))
|
|||||||
// Date
|
// Date
|
||||||
print '<tr><td>'.$langs->trans('Date').'</td>';
|
print '<tr><td>'.$langs->trans('Date').'</td>';
|
||||||
print '<td colspan="2">';
|
print '<td colspan="2">';
|
||||||
print dol_print_date($commande->date,'daytext');
|
print dol_print_date($object->date,'daytext');
|
||||||
if ($commande->hasDelay() && empty($commande->date_livraison)) {
|
if ($object->hasDelay() && empty($object->date_livraison)) {
|
||||||
print ' '.img_picto($langs->trans("Late").' : '.$commande->showDelay(), "warning");
|
print ' '.img_picto($langs->trans("Late").' : '.$object->showDelay(), "warning");
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -281,29 +369,29 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print $langs->trans('DateDeliveryPlanned');
|
print $langs->trans('DateDeliveryPlanned');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
if ($action != 'editdate_livraison') print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdate_livraison&id='.$commande->id.'">'.img_edit($langs->trans('SetDeliveryDate'),1).'</a></td>';
|
if ($action != 'editdate_livraison') print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdate_livraison&id='.$object->id.'">'.img_edit($langs->trans('SetDeliveryDate'),1).'</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td colspan="2">';
|
print '</td><td colspan="2">';
|
||||||
if ($action == 'editdate_livraison')
|
if ($action == 'editdate_livraison')
|
||||||
{
|
{
|
||||||
print '<form name="setdate_livraison" action="'.$_SERVER["PHP_SELF"].'?id='.$commande->id.'" method="post">';
|
print '<form name="setdate_livraison" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
||||||
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="setdatedelivery">';
|
print '<input type="hidden" name="action" value="setdatedelivery">';
|
||||||
$form->select_date($commande->date_livraison>0?$commande->date_livraison:-1,'liv_','','','',"setdatedelivery");
|
$form->select_date($object->date_livraison>0?$object->date_livraison:-1,'liv_','','','',"setdatedelivery");
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print dol_print_date($commande->date_livraison,'daytext');
|
print dol_print_date($object->date_livraison,'daytext');
|
||||||
if ($commande->hasDelay() && ! empty($commande->date_livraison)) {
|
if ($object->hasDelay() && ! empty($object->date_livraison)) {
|
||||||
print ' '.img_picto($langs->trans("Late").' : '.$commande->showDelay(), "warning");
|
print ' '.img_picto($langs->trans("Late").' : '.$object->showDelay(), "warning");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
// Note on several rows
|
// Note on several rows
|
||||||
//print '<td rowspan="'.$nbrow.'" valign="top">'.$langs->trans('NotePublic').' :<br>';
|
//print '<td rowspan="'.$nbrow.'" valign="top">'.$langs->trans('NotePublic').' :<br>';
|
||||||
//print nl2br($commande->note_public);
|
//print nl2br($object->note_public);
|
||||||
//print '</td>';
|
//print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@ -313,13 +401,13 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print $langs->trans('SendingMethod');
|
print $langs->trans('SendingMethod');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'editshippingmethod' && $user->rights->expedition->creer)
|
if ($action != 'editshippingmethod' && $user->rights->expedition->creer)
|
||||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editshippingmethod&id='.$commande->id.'">'.img_edit($langs->trans('SetShippingMode'),1).'</a></td>';
|
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editshippingmethod&id='.$object->id.'">'.img_edit($langs->trans('SetShippingMode'),1).'</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td colspan="2">';
|
print '</td><td colspan="2">';
|
||||||
if ($action == 'editshippingmethod') {
|
if ($action == 'editshippingmethod') {
|
||||||
$form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$commande->id, $commande->shipping_method_id, 'shipping_method_id', 1);
|
$form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, $object->shipping_method_id, 'shipping_method_id', 1);
|
||||||
} else {
|
} else {
|
||||||
$form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$commande->id, $commande->shipping_method_id, 'none');
|
$form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, $object->shipping_method_id, 'none');
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -333,34 +421,35 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print $langs->trans('Warehouse');
|
print $langs->trans('Warehouse');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'editwarehouse' && $user->rights->commande->creer)
|
if ($action != 'editwarehouse' && $user->rights->commande->creer)
|
||||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editwarehouse&id='.$commande->id.'">'.img_edit($langs->trans('SetWarehouse'),1).'</a></td>';
|
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editwarehouse&id='.$object->id.'">'.img_edit($langs->trans('SetWarehouse'),1).'</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td colspan="2">';
|
print '</td><td colspan="2">';
|
||||||
if ($action == 'editwarehouse') {
|
if ($action == 'editwarehouse') {
|
||||||
$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$commande->id, $commande->warehouse_id, 'warehouse_id', 1);
|
$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'warehouse_id', 1);
|
||||||
} else {
|
} else {
|
||||||
$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$commande->id, $commande->warehouse_id, 'none');
|
$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'none');
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Terms of payment
|
// Terms of payment
|
||||||
|
/*
|
||||||
print '<tr><td height="10">';
|
print '<tr><td height="10">';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print $langs->trans('PaymentConditionsShort');
|
print $langs->trans('PaymentConditionsShort');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
if ($action != 'editconditions' && ! empty($commande->brouillon)) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editconditions&id='.$commande->id.'">'.img_edit($langs->trans('SetConditions'),1).'</a></td>';
|
if ($action != 'editconditions' && ! empty($object->brouillon)) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editconditions&id='.$object->id.'">'.img_edit($langs->trans('SetConditions'),1).'</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td colspan="2">';
|
print '</td><td colspan="2">';
|
||||||
if ($action == 'editconditions')
|
if ($action == 'editconditions')
|
||||||
{
|
{
|
||||||
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->cond_reglement_id,'cond_reglement_id');
|
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->cond_reglement_id,'cond_reglement_id');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->cond_reglement_id,'none');
|
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->cond_reglement_id,'none');
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -369,18 +458,18 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print $langs->trans('PaymentMode');
|
print $langs->trans('PaymentMode');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'editmode' && ! empty($commande->brouillon)) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmode&id='.$commande->id.'">'.img_edit($langs->trans('SetMode'),1).'</a></td>';
|
if ($action != 'editmode' && ! empty($object->brouillon)) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmode&id='.$object->id.'">'.img_edit($langs->trans('SetMode'),1).'</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td colspan="2">';
|
print '</td><td colspan="2">';
|
||||||
if ($action == 'editmode')
|
if ($action == 'editmode')
|
||||||
{
|
{
|
||||||
$form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->mode_reglement_id,'mode_reglement_id');
|
$form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->mode_reglement_id,'mode_reglement_id');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->mode_reglement_id,'none');
|
$form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->mode_reglement_id,'none');
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';*/
|
||||||
|
|
||||||
// Availability
|
// Availability
|
||||||
print '<tr><td height="10">';
|
print '<tr><td height="10">';
|
||||||
@ -388,13 +477,13 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print $langs->trans('AvailabilityPeriod');
|
print $langs->trans('AvailabilityPeriod');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'editavailability')
|
if ($action != 'editavailability')
|
||||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editavailability&id=' . $commande->id . '">' . img_edit($langs->trans('SetAvailability'), 1) . '</a></td>';
|
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editavailability&id=' . $object->id . '">' . img_edit($langs->trans('SetAvailability'), 1) . '</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td colspan="3">';
|
print '</td><td colspan="3">';
|
||||||
if ($action == 'editavailability') {
|
if ($action == 'editavailability') {
|
||||||
$form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $commande->id, $commande->availability_id, 'availability_id', 1);
|
$form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->availability_id, 'availability_id', 1);
|
||||||
} else {
|
} else {
|
||||||
$form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $commande->id, $commande->availability_id, 'none', 1);
|
$form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->availability_id, 'none', 1);
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -404,63 +493,124 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print $langs->trans('Source');
|
print $langs->trans('Source');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'editdemandreason')
|
if ($action != 'editdemandreason')
|
||||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editdemandreason&id=' . $commande->id . '">' . img_edit($langs->trans('SetDemandReason'), 1) . '</a></td>';
|
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editdemandreason&id=' . $object->id . '">' . img_edit($langs->trans('SetDemandReason'), 1) . '</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td colspan="3">';
|
print '</td><td colspan="3">';
|
||||||
if ($action == 'editdemandreason') {
|
if ($action == 'editdemandreason') {
|
||||||
$form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $commande->id, $commande->demand_reason_id, 'demand_reason_id', 1);
|
$form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'demand_reason_id', 1);
|
||||||
} else {
|
} else {
|
||||||
$form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $commande->id, $commande->demand_reason_id, 'none');
|
$form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'none');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Project
|
$tmparray=$object->getTotalWeightVolume();
|
||||||
if (! empty($conf->projet->enabled))
|
$totalWeight=$tmparray['weight'];
|
||||||
|
$totalVolume=$tmparray['volume'];
|
||||||
|
if ($totalWeight || $totalVolume)
|
||||||
{
|
{
|
||||||
$langs->load('projects');
|
print '<tr><td>'.$langs->trans("CalculatedWeight").'</td>';
|
||||||
print '<tr><td>';
|
print '<td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND)?$conf->global->MAIN_WEIGHT_DEFAULT_ROUND:-1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT)?$conf->global->MAIN_WEIGHT_DEFAULT_UNIT:'no');
|
||||||
print $langs->trans('Project');
|
print '</td></tr>';
|
||||||
print '</td>';
|
print '<tr><td>'.$langs->trans("CalculatedVolume").'</td>';
|
||||||
if ($action != 'classify') print '<td align="right"><a href="'.$_SERVER['PHP_SELF'].'?action=classify&id='.$commande->id.'">'.img_edit($langs->trans('SetProject')).'</a></td>';
|
print '<td>';
|
||||||
print '</tr></table>';
|
print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND)?$conf->global->MAIN_VOLUME_DEFAULT_ROUND:-1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT)?$conf->global->MAIN_VOLUME_DEFAULT_UNIT:'no');
|
||||||
print '</td><td colspan="2">';
|
print '</td></tr>';
|
||||||
if ($action == 'classify')
|
|
||||||
{
|
|
||||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$commande->id, $commande->socid, $commande->fk_project, 'projectid', 0, 0, 1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$commande->id, $commande->socid, $commande->fk_project, 'none', 0, 0);
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO How record was recorded OrderMode (llx_c_input_method)
|
||||||
|
|
||||||
|
// Incoterms
|
||||||
|
if (!empty($conf->incoterm->enabled))
|
||||||
|
{
|
||||||
|
print '<tr><td>';
|
||||||
|
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||||
|
print $langs->trans('IncotermLabel');
|
||||||
|
print '<td><td align="right">';
|
||||||
|
if ($user->rights->commande->creer) print '<a href="'.DOL_URL_ROOT.'/commande/card.php?id='.$object->id.'&action=editincoterm">'.img_edit().'</a>';
|
||||||
|
else print ' ';
|
||||||
|
print '</td></tr></table>';
|
||||||
|
print '</td>';
|
||||||
|
print '<td colspan="3">';
|
||||||
|
if ($action != 'editincoterm')
|
||||||
|
{
|
||||||
|
print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms)?$object->location_incoterms:''), $_SERVER['PHP_SELF'].'?id='.$object->id);
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Other attributes
|
||||||
|
$cols = 2;
|
||||||
|
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
||||||
|
|
||||||
// Lignes de 3 colonnes
|
print '</table>';
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
|
print '<div class="fichehalfright">';
|
||||||
|
print '<div class="ficheaddleft">';
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
|
print '<table class="border centpercent">';
|
||||||
|
|
||||||
|
if (!empty($conf->multicurrency->enabled) && ($object->multicurrency_code != $conf->currency))
|
||||||
|
{
|
||||||
|
// Multicurrency Amount HT
|
||||||
|
print '<tr><td class="titlefieldmiddle">' . fieldLabel('MulticurrencyAmountHT','multicurrency_total_ht') . '</td>';
|
||||||
|
print '<td class="nowrap">' . price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Multicurrency Amount VAT
|
||||||
|
print '<tr><td>' . fieldLabel('MulticurrencyAmountVAT','multicurrency_total_tva') . '</td>';
|
||||||
|
print '<td class="nowrap">' . price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Multicurrency Amount TTC
|
||||||
|
print '<tr><td>' . fieldLabel('MulticurrencyAmountTTC','multicurrency_total_ttc') . '</td>';
|
||||||
|
print '<td class="nowrap">' . price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Total HT
|
// Total HT
|
||||||
print '<tr><td>'.$langs->trans('AmountHT').'</td>';
|
print '<tr><td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>';
|
||||||
print '<td>'.price($commande->total_ht, 0, '', 1, -1, -1, $conf->currency).'</td>';
|
print '<td>'.price($object->total_ht, 0, '', 1, -1, -1, $conf->currency).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Total TVA
|
// Total VAT
|
||||||
print '<tr><td>'.$langs->trans('AmountVAT').'</td><td>'.price($commande->total_tva, 0, '', 1, -1, -1, $conf->currency).'</td>';
|
print '<tr><td>'.$langs->trans('AmountVAT').'</td><td>'.price($object->total_tva, 0, '', 1, -1, -1, $conf->currency).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
// Amount Local Taxes
|
||||||
|
if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) // Localtax1
|
||||||
|
{
|
||||||
|
print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
|
||||||
|
print '<td>' . price($object->total_localtax1, 1, '', 1, - 1, - 1, $conf->currency) . '</td></tr>';
|
||||||
|
}
|
||||||
|
if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) // Localtax2 IRPF
|
||||||
|
{
|
||||||
|
print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
|
||||||
|
print '<td>' . price($object->total_localtax2, 1, '', 1, - 1, - 1, $conf->currency) . '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Total TTC
|
// Total TTC
|
||||||
print '<tr><td>'.$langs->trans('AmountTTC').'</td><td>'.price($commande->total_ttc, 0, '', 1, -1, -1, $conf->currency).'</td>';
|
print '<tr><td>'.$langs->trans('AmountTTC').'</td><td>'.price($object->total_ttc, 0, '', 1, -1, -1, $conf->currency).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Statut
|
print '</table>';
|
||||||
print '<tr><td>'.$langs->trans('Status').'</td>';
|
|
||||||
print '<td colspan="2">'.$commande->getLibStatut(4).'</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
print '</table><br>';
|
|
||||||
|
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
|
print '</div>';
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
|
print '<div class="clearboth"></div><br>';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lines or orders with quantity shipped and remain to ship
|
* Lines or orders with quantity shipped and remain to ship
|
||||||
* Note: Qty shipped are already available into $commande->expeditions[fk_product]
|
* Note: Qty shipped are already available into $object->expeditions[fk_product]
|
||||||
*/
|
*/
|
||||||
print '<table class="noborder noshadow" width="100%">';
|
print '<table class="noborder noshadow" width="100%">';
|
||||||
|
|
||||||
@ -472,7 +622,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$sql.= ' p.rowid as prodid, p.label as product_label, p.entity, p.ref, p.fk_product_type as product_type, p.description as product_desc';
|
$sql.= ' p.rowid as prodid, p.label as product_label, p.entity, p.ref, p.fk_product_type as product_type, p.description as product_desc';
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."commandedet as cd";
|
$sql.= " FROM ".MAIN_DB_PREFIX."commandedet as cd";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid";
|
||||||
$sql.= " WHERE cd.fk_commande = ".$commande->id;
|
$sql.= " WHERE cd.fk_commande = ".$object->id;
|
||||||
$sql.= " ORDER BY cd.rang, cd.rowid";
|
$sql.= " ORDER BY cd.rang, cd.rowid";
|
||||||
|
|
||||||
//print $sql;
|
//print $sql;
|
||||||
@ -522,7 +672,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
// Define output language
|
// Define output language
|
||||||
if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE))
|
if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE))
|
||||||
{
|
{
|
||||||
$commande->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$prod = new Product($db);
|
$prod = new Product($db);
|
||||||
$prod->id = $objp->fk_product;
|
$prod->id = $objp->fk_product;
|
||||||
@ -532,7 +682,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
$newlang='';
|
$newlang='';
|
||||||
if (empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id'];
|
if (empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id'];
|
||||||
if (empty($newlang)) $newlang=$commande->thirdparty->default_lang;
|
if (empty($newlang)) $newlang=$object->thirdparty->default_lang;
|
||||||
if (! empty($newlang))
|
if (! empty($newlang))
|
||||||
{
|
{
|
||||||
$outputlangs = new Translate("",$conf);
|
$outputlangs = new Translate("",$conf);
|
||||||
@ -594,7 +744,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$qtyProdCom=$objp->qty;
|
$qtyProdCom=$objp->qty;
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
// Nb of sending products for this line of order
|
// Nb of sending products for this line of order
|
||||||
$qtyAlreadyShipped = (! empty($commande->expeditions[$objp->rowid])?$commande->expeditions[$objp->rowid]:0);
|
$qtyAlreadyShipped = (! empty($object->expeditions[$objp->rowid])?$object->expeditions[$objp->rowid]:0);
|
||||||
print $qtyAlreadyShipped;
|
print $qtyAlreadyShipped;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -691,7 +841,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
// Bouton expedier sans gestion des stocks
|
// Bouton expedier sans gestion des stocks
|
||||||
if (empty($conf->stock->enabled) && ($commande->statut > Commande::STATUS_DRAFT && $commande->statut < Commande::STATUS_CLOSED))
|
if (empty($conf->stock->enabled) && ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED))
|
||||||
{
|
{
|
||||||
if ($user->rights->expedition->creer)
|
if ($user->rights->expedition->creer)
|
||||||
{
|
{
|
||||||
@ -712,12 +862,12 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
// Bouton expedier avec gestion des stocks
|
// Bouton expedier avec gestion des stocks
|
||||||
|
|
||||||
if (! empty($conf->stock->enabled) && $commande->statut == Commande::STATUS_DRAFT)
|
if (! empty($conf->stock->enabled) && $object->statut == Commande::STATUS_DRAFT)
|
||||||
{
|
{
|
||||||
print $langs->trans("ValidateOrderFirstBeforeShipment");
|
print $langs->trans("ValidateOrderFirstBeforeShipment");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->stock->enabled) && ($commande->statut > Commande::STATUS_DRAFT && $commande->statut < Commande::STATUS_CLOSED))
|
if (! empty($conf->stock->enabled) && ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED))
|
||||||
{
|
{
|
||||||
if ($user->rights->expedition->creer)
|
if ($user->rights->expedition->creer)
|
||||||
{
|
{
|
||||||
@ -726,10 +876,10 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
print '<form method="GET" action="'.DOL_URL_ROOT.'/expedition/card.php">';
|
print '<form method="GET" action="'.DOL_URL_ROOT.'/expedition/card.php">';
|
||||||
print '<input type="hidden" name="action" value="create">';
|
print '<input type="hidden" name="action" value="create">';
|
||||||
//print '<input type="hidden" name="id" value="'.$commande->id.'">';
|
//print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||||
print '<input type="hidden" name="shipping_method_id" value="'.$commande->shipping_method_id.'">';
|
print '<input type="hidden" name="shipping_method_id" value="'.$object->shipping_method_id.'">';
|
||||||
print '<input type="hidden" name="origin" value="commande">';
|
print '<input type="hidden" name="origin" value="commande">';
|
||||||
print '<input type="hidden" name="origin_id" value="'.$commande->id.'">';
|
print '<input type="hidden" name="origin_id" value="'.$object->id.'">';
|
||||||
//print '<table class="border" width="100%">';
|
//print '<table class="border" width="100%">';
|
||||||
|
|
||||||
$langs->load("stocks");
|
$langs->load("stocks");
|
||||||
@ -742,7 +892,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print $langs->trans("WarehouseSource");
|
print $langs->trans("WarehouseSource");
|
||||||
//print '</td>';
|
//print '</td>';
|
||||||
//print '<td>';
|
//print '<td>';
|
||||||
print $formproduct->selectWarehouses(! empty($commande->warehouse_id)?$commande->warehouse_id:-1, 'entrepot_id', '', 1, 0, 0, '', 0, 0, array(), 'minwidth200');
|
print $formproduct->selectWarehouses(! empty($object->warehouse_id)?$object->warehouse_id:-1, 'entrepot_id', '', 1, 0, 0, '', 0, 0, array(), 'minwidth200');
|
||||||
if (count($formproduct->cache_warehouses) <= 0)
|
if (count($formproduct->cache_warehouses) <= 0)
|
||||||
{
|
{
|
||||||
print ' '.$langs->trans("WarehouseSourceNotDefined").' <a href="'.DOL_URL_ROOT.'/product/stock/card.php?action=create">'.$langs->trans("AddOne").'</a>';
|
print ' '.$langs->trans("WarehouseSourceNotDefined").' <a href="'.DOL_URL_ROOT.'/product/stock/card.php?action=create">'.$langs->trans("AddOne").'</a>';
|
||||||
@ -773,7 +923,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
show_list_sending_receive('commande',$commande->id);
|
show_list_sending_receive('commande',$object->id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2225,7 +2225,8 @@ if ($action != 'create' && $action != 'edit')
|
|||||||
// If bank module is not used
|
// If bank module is not used
|
||||||
if (($user->rights->expensereport->to_paid || empty($conf->banque->enabled)) && $object->fk_statut == 5)
|
if (($user->rights->expensereport->to_paid || empty($conf->banque->enabled)) && $object->fk_statut == 5)
|
||||||
{
|
{
|
||||||
if ((round($remaintopay) == 0 || empty($conf->banque->enabled)) && $object->paid == 0)
|
//if ((round($remaintopay) == 0 || empty($conf->banque->enabled)) && $object->paid == 0)
|
||||||
|
if ($object->paid == 0)
|
||||||
{
|
{
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id='.$object->id.'&action=set_paid">'.$langs->trans("ClassifyPaid")."</a></div>";
|
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id='.$object->id.'&action=set_paid">'.$langs->trans("ClassifyPaid")."</a></div>";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -93,7 +93,15 @@ if ($object->id)
|
|||||||
|
|
||||||
dol_fiche_head($head, 'documents', $langs->trans("ExpenseReport"), 0, 'trip');
|
dol_fiche_head($head, 'documents', $langs->trans("ExpenseReport"), 0, 'trip');
|
||||||
|
|
||||||
|
$linkback = '<a href="'.DOL_URL_ROOT.'/expensereport/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
|
$morehtmlref='<div class="refidno">';
|
||||||
|
$morehtmlref.='</div>';
|
||||||
|
|
||||||
|
|
||||||
|
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||||
|
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Construit liste des fichiers
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
@ -102,25 +110,22 @@ if ($object->id)
|
|||||||
$totalsize+=$file['size'];
|
$totalsize+=$file['size'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print '<div class="fichecenter">';
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/expensereport/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/expensereport/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
// Ref
|
print '<tr><td class="titlefield">'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>';
|
|
||||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Societe
|
|
||||||
//print "<tr><td>".$langs->trans("Company")."</td><td>".$object->client->getNomUrl(1)."</td></tr>";
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
|
||||||
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
|
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
$modulepart = 'expensereport';
|
$modulepart = 'expensereport';
|
||||||
$permission = $user->rights->expensereport->creer;
|
$permission = $user->rights->expensereport->creer;
|
||||||
$permtoedit = $user->rights->expensereport->creer;
|
$permtoedit = $user->rights->expensereport->creer;
|
||||||
|
|||||||
@ -128,6 +128,7 @@ if (isset($_POST['action']))
|
|||||||
|
|
||||||
$sql = "SELECT d.rowid, d.ref, d.total_ht, d.total_tva, d.total_ttc";
|
$sql = "SELECT d.rowid, d.ref, d.total_ht, d.total_tva, d.total_ttc";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."expensereport as d";
|
$sql.= " FROM ".MAIN_DB_PREFIX."expensereport as d";
|
||||||
|
$sql.= ' AND d.entity IN ('.getEntity('expensereport', 1).')';
|
||||||
$sql.= " ORDER BY d.rowid";
|
$sql.= " ORDER BY d.rowid";
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|||||||
@ -147,7 +147,7 @@ $sql.= " FROM ".MAIN_DB_PREFIX."expensereport as d, ".MAIN_DB_PREFIX."user as u"
|
|||||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE u.rowid = d.fk_user_author";
|
$sql.= " WHERE u.rowid = d.fk_user_author";
|
||||||
if (empty($user->rights->expensereport->readall) && empty($user->rights->expensereport->lire_tous)) $sql.=' AND d.fk_user_author IN ('.join(',',$childids).')';
|
if (empty($user->rights->expensereport->readall) && empty($user->rights->expensereport->lire_tous)) $sql.=' AND d.fk_user_author IN ('.join(',',$childids).')';
|
||||||
//$sql.= " AND d.entity = ".$conf->entity;
|
$sql.= ' AND d.entity IN ('.getEntity('expensereport', 1).')';
|
||||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND d.fk_user_author = s.rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND d.fk_user_author = s.rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
if ($socid) $sql.= " AND d.fk_user_author = ".$socid;
|
if ($socid) $sql.= " AND d.fk_user_author = ".$socid;
|
||||||
$sql.= $db->order($sortfield,$sortorder);
|
$sql.= $db->order($sortfield,$sortorder);
|
||||||
|
|||||||
@ -43,21 +43,36 @@ $title=$langs->trans("ExpenseReport") . " - " . $langs->trans("Info");
|
|||||||
$helpurl="EN:Module_Expense_Reports";
|
$helpurl="EN:Module_Expense_Reports";
|
||||||
llxHeader("",$title,$helpurl);
|
llxHeader("",$title,$helpurl);
|
||||||
|
|
||||||
if ($id)
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
$object = new ExpenseReport($db);
|
$object = new ExpenseReport($db);
|
||||||
$object->fetch($id);
|
$object->fetch($id,$ref);
|
||||||
$object->info($id);
|
$object->info($object->id);
|
||||||
|
|
||||||
$head = expensereport_prepare_head($object);
|
$head = expensereport_prepare_head($object);
|
||||||
|
|
||||||
dol_fiche_head($head, 'info', $langs->trans("ExpenseReport"), 0, 'trip');
|
dol_fiche_head($head, 'info', $langs->trans("ExpenseReport"), 0, 'trip');
|
||||||
|
|
||||||
print '<table width="100%"><tr><td>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/expensereport/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
|
$morehtmlref='<div class="refidno">';
|
||||||
|
$morehtmlref.='</div>';
|
||||||
|
|
||||||
|
|
||||||
|
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||||
|
|
||||||
|
print '<div class="fichecenter">';
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
print '<table width="100%"><tr><td>';
|
||||||
dol_print_object_info($object);
|
dol_print_object_info($object);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|||||||
@ -203,7 +203,7 @@ $sql.=$hookmanager->resPrint;
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX."expensereport as d";
|
$sql.= " FROM ".MAIN_DB_PREFIX."expensereport as d";
|
||||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."expensereport_extrafields as ef on (d.rowid = ef.fk_object)";
|
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."expensereport_extrafields as ef on (d.rowid = ef.fk_object)";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."user as u";
|
$sql.= ", ".MAIN_DB_PREFIX."user as u";
|
||||||
$sql.= " WHERE d.fk_user_author = u.rowid AND d.entity = ".$conf->entity;
|
$sql.= " WHERE d.fk_user_author = u.rowid AND d.entity IN (".getEntity('expensereport', 1).")";
|
||||||
// Search all
|
// Search all
|
||||||
if (!empty($sall)) $sql.= natural_search(array_keys($fieldstosearchall), $sall);
|
if (!empty($sall)) $sql.= natural_search(array_keys($fieldstosearchall), $sall);
|
||||||
// Ref
|
// Ref
|
||||||
|
|||||||
119
htdocs/expensereport/note.php
Normal file
119
htdocs/expensereport/note.php
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
<?php
|
||||||
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* 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
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file htdocs/commande/note.php
|
||||||
|
* \ingroup commande
|
||||||
|
* \brief Fiche de notes sur une commande
|
||||||
|
*/
|
||||||
|
|
||||||
|
require '../main.inc.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/expensereport.lib.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
||||||
|
|
||||||
|
$langs->load("trips");
|
||||||
|
$langs->load("companies");
|
||||||
|
$langs->load("bills");
|
||||||
|
$langs->load("orders");
|
||||||
|
|
||||||
|
$id = GETPOST('id','int');
|
||||||
|
$ref=GETPOST('ref','alpha');
|
||||||
|
$socid=GETPOST('socid','int');
|
||||||
|
$action=GETPOST('action','alpha');
|
||||||
|
|
||||||
|
// Security check
|
||||||
|
$socid=0;
|
||||||
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
|
$result=restrictedArea($user,'expensereport',$id,'');
|
||||||
|
|
||||||
|
|
||||||
|
$object = new ExpenseReport($db);
|
||||||
|
if (! $object->fetch($id, $ref) > 0)
|
||||||
|
{
|
||||||
|
dol_print_error($db);
|
||||||
|
}
|
||||||
|
|
||||||
|
$permissionnote=$user->rights->expensereport->creer; // Used by the include of actions_setnotes.inc.php
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Actions
|
||||||
|
*/
|
||||||
|
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* View
|
||||||
|
*/
|
||||||
|
$title=$langs->trans("ExpenseReport") . " - " . $langs->trans("Note");
|
||||||
|
$helpurl="EN:Module_Expense_Reports";
|
||||||
|
llxHeader("",$title,$helpurl);
|
||||||
|
|
||||||
|
$form = new Form($db);
|
||||||
|
|
||||||
|
if ($id > 0 || ! empty($ref))
|
||||||
|
{
|
||||||
|
$object = new ExpenseReport($db);
|
||||||
|
$object->fetch($id, $ref);
|
||||||
|
$object->info($object->id);
|
||||||
|
|
||||||
|
$head = expensereport_prepare_head($object);
|
||||||
|
|
||||||
|
dol_fiche_head($head, 'note', $langs->trans("ExpenseReport"), 0, 'trip');
|
||||||
|
|
||||||
|
$linkback = '<a href="'.DOL_URL_ROOT.'/expensereport/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
|
$morehtmlref='<div class="refidno">';
|
||||||
|
$morehtmlref.='</div>';
|
||||||
|
|
||||||
|
|
||||||
|
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
|
// Ref
|
||||||
|
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||||
|
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
|
||||||
|
print "</td></tr>";
|
||||||
|
|
||||||
|
print "</table>";
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
|
*/
|
||||||
|
|
||||||
|
print '<div class="fichecenter">';
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
|
$cssclass="titlefield";
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
llxFooter();
|
||||||
|
$db->close();
|
||||||
@ -199,7 +199,7 @@ $disable_delete = 0;
|
|||||||
$sql = 'SELECT er.rowid as did, er.paid, er.total_ttc, per.amount';
|
$sql = 'SELECT er.rowid as did, er.paid, er.total_ttc, per.amount';
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'payment_expensereport as per,'.MAIN_DB_PREFIX.'expensereport as er';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'payment_expensereport as per,'.MAIN_DB_PREFIX.'expensereport as er';
|
||||||
$sql.= ' WHERE per.fk_expensereport = er.rowid';
|
$sql.= ' WHERE per.fk_expensereport = er.rowid';
|
||||||
$sql.= ' AND er.entity = '.$conf->entity;
|
$sql.= ' AND er.entity IN ('.getEntity('expensereport', 1).')';
|
||||||
$sql.= ' AND per.rowid = '.$id;
|
$sql.= ' AND per.rowid = '.$id;
|
||||||
|
|
||||||
dol_syslog("expensereport/payment/card.php", LOG_DEBUG);
|
dol_syslog("expensereport/payment/card.php", LOG_DEBUG);
|
||||||
|
|||||||
@ -193,8 +193,9 @@ if (GETPOST("action") == 'create')
|
|||||||
print '<tr><td>'.$langs->trans("Amount").'</td><td colspan="2">'.price($expensereport->total_ttc,0,$outputlangs,1,-1,-1,$conf->currency).'</td></tr>';
|
print '<tr><td>'.$langs->trans("Amount").'</td><td colspan="2">'.price($expensereport->total_ttc,0,$outputlangs,1,-1,-1,$conf->currency).'</td></tr>';
|
||||||
|
|
||||||
$sql = "SELECT sum(p.amount) as total";
|
$sql = "SELECT sum(p.amount) as total";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."payment_expensereport as p";
|
$sql.= " FROM ".MAIN_DB_PREFIX."payment_expensereport as p, ".MAIN_DB_PREFIX."expensereport as e";
|
||||||
$sql.= " WHERE p.fk_expensereport = ".$chid;
|
$sql.= " WHERE p.fk_expensereport = e.rowid AND p.fk_expensereport = ".$chid;
|
||||||
|
$sql.= ' AND e.entity IN ('.getEntity('expensereport', 1).')';
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -139,6 +139,7 @@ else:
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX."expensereport as d";
|
$sql.= " FROM ".MAIN_DB_PREFIX."expensereport as d";
|
||||||
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON d.fk_user_author = u.rowid";
|
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON d.fk_user_author = u.rowid";
|
||||||
$sql.= " WHERE d.fk_statut = 6";
|
$sql.= " WHERE d.fk_statut = 6";
|
||||||
|
$sql.= ' AND d.entity IN ('.getEntity('expensereport', 1).')';
|
||||||
$sql.= " ORDER BY d.date_valid DESC";
|
$sql.= " ORDER BY d.date_valid DESC";
|
||||||
|
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
|
|||||||
@ -2342,7 +2342,7 @@ else
|
|||||||
print '<tr '.$bc[$var].'><td>';
|
print '<tr '.$bc[$var].'><td>';
|
||||||
$paymentstatic->id=$objp->rowid;
|
$paymentstatic->id=$objp->rowid;
|
||||||
$paymentstatic->datepaye=$db->jdate($objp->dp);
|
$paymentstatic->datepaye=$db->jdate($objp->dp);
|
||||||
$paymentstatic->ref=$objp->ref;
|
$paymentstatic->ref=($objp->ref ? $objp->ref : $objp->rowid);;
|
||||||
$paymentstatic->num_paiement=$objp->num_paiement;
|
$paymentstatic->num_paiement=$objp->num_paiement;
|
||||||
$paymentstatic->payment_code=$objp->payment_code;
|
$paymentstatic->payment_code=$objp->payment_code;
|
||||||
print $paymentstatic->getNomUrl(1);
|
print $paymentstatic->getNomUrl(1);
|
||||||
|
|||||||
@ -247,9 +247,9 @@ llxHeader('',$langs->trans("SuppliersInvoices"),'EN:Suppliers_Invoices|FR:Factur
|
|||||||
|
|
||||||
$sql = "SELECT";
|
$sql = "SELECT";
|
||||||
if ($search_all || $search_product_category > 0) $sql = 'SELECT DISTINCT';
|
if ($search_all || $search_product_category > 0) $sql = 'SELECT DISTINCT';
|
||||||
$sql.= " f.rowid as facid, f.ref, f.ref_supplier, f.datef, f.date_lim_reglement as datelimite,";
|
$sql.= " f.rowid as facid, f.ref, f.ref_supplier, f.datef, f.date_lim_reglement as datelimite, f.fk_mode_reglement,";
|
||||||
$sql.= " f.total_ht, f.total_ttc, f.total_tva as total_vat, f.paye as paye, f.fk_statut as fk_statut, f.libelle as label,";
|
$sql.= " f.total_ht, f.total_ttc, f.total_tva as total_vat, f.paye as paye, f.fk_statut as fk_statut, f.libelle as label,";
|
||||||
$sql.= ' s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client, ';
|
$sql.= " s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client,";
|
||||||
$sql.= " typent.code as typent_code,";
|
$sql.= " typent.code as typent_code,";
|
||||||
$sql.= " state.code_departement as state_code, state.nom as state_name,";
|
$sql.= " state.code_departement as state_code, state.nom as state_name,";
|
||||||
$sql.= " p.rowid as project_id, p.ref as project_ref";
|
$sql.= " p.rowid as project_id, p.ref as project_ref";
|
||||||
|
|||||||
@ -219,6 +219,15 @@ create table llx_user_employment
|
|||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_date_debut (date_debut);
|
||||||
|
ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_date_fin (date_fin);
|
||||||
|
ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_fk_statut (fk_statut);
|
||||||
|
|
||||||
|
ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_fk_user_author (fk_user_author);
|
||||||
|
ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_fk_user_valid (fk_user_valid);
|
||||||
|
ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_fk_user_approve (fk_user_approve);
|
||||||
|
ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_fk_refuse (fk_user_approve);
|
||||||
|
|
||||||
|
|
||||||
-- Sequence to removed duplicated values of llx_links. Use serveral times if you still have duplicate.
|
-- Sequence to removed duplicated values of llx_links. Use serveral times if you still have duplicate.
|
||||||
drop table tmp_links_double;
|
drop table tmp_links_double;
|
||||||
@ -230,5 +239,10 @@ drop table tmp_links_double;
|
|||||||
|
|
||||||
ALTER TABLE llx_links ADD UNIQUE INDEX uk_links (objectid,label);
|
ALTER TABLE llx_links ADD UNIQUE INDEX uk_links (objectid,label);
|
||||||
|
|
||||||
|
ALTER TABLE llx_expensereport ADD UNIQUE INDEX idx_expensereport_uk_ref (ref, entity);
|
||||||
|
|
||||||
UPDATE llx_projet_task SET ref = NULL WHERE ref = '';
|
UPDATE llx_projet_task SET ref = NULL WHERE ref = '';
|
||||||
ALTER TABLE llx_projet_task ADD UNIQUE INDEX uk_projet_task_ref (ref, entity);
|
ALTER TABLE llx_projet_task ADD UNIQUE INDEX uk_projet_task_ref (ref, entity);
|
||||||
|
|
||||||
|
ALTER TABLE llx_contrat ADD COLUMN fk_user_modif integer;
|
||||||
|
|
||||||
|
|||||||
@ -21,6 +21,13 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- VMYSQL4.1 SET sql_mode = 'ALLOW_INVALID_DATES';
|
||||||
|
-- VMYSQL4.1 update llx_facture set date_pointoftax = NULL where DATE(STR_TO_DATE(date_pointoftax, '%Y-%m-%d')) IS NULL;
|
||||||
|
-- VMYSQL4.1 SET sql_mode = 'NO_ZERO_DATE';
|
||||||
|
-- VMYSQL4.1 update llx_facture set date_pointoftax = NULL where DATE(STR_TO_DATE(date_pointoftax, '%Y-%m-%d')) IS NULL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- Requests to clean corrupted database
|
-- Requests to clean corrupted database
|
||||||
|
|
||||||
|
|
||||||
@ -294,3 +301,19 @@ DELETE FROM llx_c_shipment_mode where code IN (select code from tmp_c_shipment_m
|
|||||||
drop table tmp_c_shipment_mode;
|
drop table tmp_c_shipment_mode;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- VMYSQL4.1 SET sql_mode = 'ALLOW_INVALID_DATES';
|
||||||
|
-- VMYSQL4.1 update llx_expensereport set date_debut = date_create where DATE(STR_TO_DATE(date_debut, '%Y-%m-%d')) IS NULL;
|
||||||
|
-- VMYSQL4.1 SET sql_mode = 'NO_ZERO_DATE';
|
||||||
|
-- VMYSQL4.1 update llx_expensereport set date_debut = date_create where DATE(STR_TO_DATE(date_debut, '%Y-%m-%d')) IS NULL;
|
||||||
|
|
||||||
|
-- VMYSQL4.1 SET sql_mode = 'ALLOW_INVALID_DATES';
|
||||||
|
-- VMYSQL4.1 update llx_expensereport set date_fin = date_debut where DATE(STR_TO_DATE(date_fin, '%Y-%m-%d')) IS NULL;
|
||||||
|
-- VMYSQL4.1 SET sql_mode = 'NO_ZERO_DATE';
|
||||||
|
-- VMYSQL4.1 update llx_expensereport set date_fin = date_debut where DATE(STR_TO_DATE(date_fin, '%Y-%m-%d')) IS NULL;
|
||||||
|
|
||||||
|
-- VMYSQL4.1 SET sql_mode = 'ALLOW_INVALID_DATES';
|
||||||
|
-- VMYSQL4.1 update llx_expensereport set date_valid = date_fin where DATE(STR_TO_DATE(date_valid, '%Y-%m-%d')) IS NULL;
|
||||||
|
-- VMYSQL4.1 SET sql_mode = 'NO_ZERO_DATE';
|
||||||
|
-- VMYSQL4.1 update llx_expensereport set date_valid = date_fin where DATE(STR_TO_DATE(date_valid, '%Y-%m-%d')) IS NULL;
|
||||||
|
|
||||||
|
|||||||
@ -38,6 +38,7 @@ create table llx_contrat
|
|||||||
fk_commercial_signature integer, -- obsolete
|
fk_commercial_signature integer, -- obsolete
|
||||||
fk_commercial_suivi integer, -- obsolete
|
fk_commercial_suivi integer, -- obsolete
|
||||||
fk_user_author integer NOT NULL default 0,
|
fk_user_author integer NOT NULL default 0,
|
||||||
|
fk_user_modif integer,
|
||||||
fk_user_mise_en_service integer,
|
fk_user_mise_en_service integer,
|
||||||
fk_user_cloture integer,
|
fk_user_cloture integer,
|
||||||
note_private text,
|
note_private text,
|
||||||
|
|||||||
36
htdocs/install/mysql/tables/llx_expensereport.key.sql
Normal file
36
htdocs/install/mysql/tables/llx_expensereport.key.sql
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
-- ===================================================================
|
||||||
|
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
-- Copyright (C) 2008-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
--
|
||||||
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
|
-- it under the terms of the GNU General Public License as published by
|
||||||
|
-- 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
|
||||||
|
-- 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/>.
|
||||||
|
--
|
||||||
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_expensereport ADD UNIQUE INDEX idx_expensereport_uk_ref (ref, entity);
|
||||||
|
|
||||||
|
ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_date_debut (date_debut);
|
||||||
|
ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_date_fin (date_fin);
|
||||||
|
ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_fk_statut (fk_statut);
|
||||||
|
|
||||||
|
ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_fk_user_author (fk_user_author);
|
||||||
|
ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_fk_user_valid (fk_user_valid);
|
||||||
|
ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_fk_user_approve (fk_user_approve);
|
||||||
|
ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_fk_refuse (fk_user_approve);
|
||||||
|
|
||||||
|
--ALTER TABLE llx_expensereport ADD CONSTRAINT fk_expensereport_fk_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
|
||||||
|
--ALTER TABLE llx_expensereport ADD CONSTRAINT fk_expensereport_fk_user_valid FOREIGN KEY (fk_user_valid) REFERENCES llx_user (rowid);
|
||||||
|
--ALTER TABLE llx_expensereport ADD CONSTRAINT fk_expensereport_fk_user_approve FOREIGN KEY (fk_user_approve) REFERENCES llx_user (rowid);
|
||||||
|
--ALTER TABLE llx_expensereport ADD CONSTRAINT fk_expensereport_fk_refuse FOREIGN KEY (fk_user_refuse) REFERENCES llx_user (rowid);
|
||||||
|
|
||||||
@ -231,7 +231,7 @@ SpaceX=Space X
|
|||||||
SpaceY=Space Y
|
SpaceY=Space Y
|
||||||
FontSize=Font size
|
FontSize=Font size
|
||||||
Content=Content
|
Content=Content
|
||||||
NoticePeriod=Notice
|
NoticePeriod=Notice period
|
||||||
NewByMonth=New by month
|
NewByMonth=New by month
|
||||||
Emails=E-mails
|
Emails=E-mails
|
||||||
EMailsSetup=E-mails setup
|
EMailsSetup=E-mails setup
|
||||||
|
|||||||
@ -41,7 +41,7 @@ ConsumedBy=Consumed by
|
|||||||
NotConsumed=Not consumed
|
NotConsumed=Not consumed
|
||||||
NoReplacableInvoice=No replacable invoices
|
NoReplacableInvoice=No replacable invoices
|
||||||
NoInvoiceToCorrect=No invoice to correct
|
NoInvoiceToCorrect=No invoice to correct
|
||||||
InvoiceHasAvoir=Corrected by one or several invoices
|
InvoiceHasAvoir=Was source of one or several credit notes
|
||||||
CardBill=Invoice card
|
CardBill=Invoice card
|
||||||
PredefinedInvoices=Predefined Invoices
|
PredefinedInvoices=Predefined Invoices
|
||||||
Invoice=Invoice
|
Invoice=Invoice
|
||||||
@ -321,7 +321,7 @@ ListOfNextSituationInvoices=List of next situation invoices
|
|||||||
FrequencyPer_d=Every %s days
|
FrequencyPer_d=Every %s days
|
||||||
FrequencyPer_m=Every %s months
|
FrequencyPer_m=Every %s months
|
||||||
FrequencyPer_y=Every %s years
|
FrequencyPer_y=Every %s years
|
||||||
toolTipFrequency=Examples:<br /><b>Set 7 / day</b>: give a new invoice every 7 days<br /><b>Set 3 / month</b>: give a new invoice every 3 month
|
toolTipFrequency=Examples:<br /><b>Set 7, Day</b>: give a new invoice every 7 days<br /><b>Set 3, Month</b>: give a new invoice every 3 month
|
||||||
NextDateToExecution=Date for next invoice generation
|
NextDateToExecution=Date for next invoice generation
|
||||||
DateLastGeneration=Date of latest generation
|
DateLastGeneration=Date of latest generation
|
||||||
MaxPeriodNumber=Max nb of invoice generation
|
MaxPeriodNumber=Max nb of invoice generation
|
||||||
|
|||||||
@ -53,6 +53,7 @@ StatusOrderBilled=Billed
|
|||||||
StatusOrderReceivedPartially=Partially received
|
StatusOrderReceivedPartially=Partially received
|
||||||
StatusOrderReceivedAll=Everything received
|
StatusOrderReceivedAll=Everything received
|
||||||
ShippingExist=A shipment exists
|
ShippingExist=A shipment exists
|
||||||
|
QtyOrdered=Qty ordered
|
||||||
ProductQtyInDraft=Product quantity into draft orders
|
ProductQtyInDraft=Product quantity into draft orders
|
||||||
ProductQtyInDraftOrWaitingApproved=Product quantity into draft or approved orders, not yet ordered
|
ProductQtyInDraftOrWaitingApproved=Product quantity into draft or approved orders, not yet ordered
|
||||||
MenuOrdersToBill=Orders delivered
|
MenuOrdersToBill=Orders delivered
|
||||||
|
|||||||
@ -565,7 +565,7 @@ class Entrepot extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0, $option='',$showfullpath=0, $notooltip=0)
|
function getNomUrl($withpicto=0, $option='',$showfullpath=0, $notooltip=0)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $conf, $langs;
|
||||||
$langs->load("stocks");
|
$langs->load("stocks");
|
||||||
|
|
||||||
if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
|
if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
|
||||||
|
|||||||
@ -613,14 +613,16 @@ if ($id > 0 || $ref)
|
|||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $form->textwithpicto($langs->trans("PhysicalStock"), $text_stock_options, 1);
|
print $form->textwithpicto($langs->trans("PhysicalStock"), $text_stock_options, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>'.$object->stock_reel;
|
print '<td>'.price2num($object->stock_reel, 'MS');
|
||||||
if ($object->seuil_stock_alerte != '' && ($object->stock_reel < $object->seuil_stock_alerte)) print ' '.img_warning($langs->trans("StockLowerThanLimit"));
|
if ($object->seuil_stock_alerte != '' && ($object->stock_reel < $object->seuil_stock_alerte)) print ' '.img_warning($langs->trans("StockLowerThanLimit"));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
$stocktheo = price2num($object->stock_theorique, 'MS');
|
||||||
|
|
||||||
// Calculating a theorical value
|
// Calculating a theorical value
|
||||||
print '<tr><td>'.$langs->trans("VirtualStock").'</td>';
|
print '<tr><td>'.$langs->trans("VirtualStock").'</td>';
|
||||||
print "<td>".(empty($object->stock_theorique)?0:$object->stock_theorique);
|
print "<td>".(empty($stocktheo)?0:$stocktheo);
|
||||||
if ($object->seuil_stock_alerte != '' && ($object->stock_theorique < $object->seuil_stock_alerte)) print ' '.img_warning($langs->trans("StockLowerThanLimit"));
|
if ($object->seuil_stock_alerte != '' && ($object->stock_theorique < $object->seuil_stock_alerte)) print ' '.img_warning($langs->trans("StockLowerThanLimit"));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -703,44 +705,19 @@ if ($id > 0 || $ref)
|
|||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// Correct stock
|
||||||
* Correct stock
|
|
||||||
*/
|
|
||||||
if ($action == "correction")
|
if ($action == "correction")
|
||||||
{
|
{
|
||||||
include DOL_DOCUMENT_ROOT.'/product/stock/tpl/stockcorrection.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/product/stock/tpl/stockcorrection.tpl.php';
|
||||||
print '<br><br>';
|
print '<br><br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// Transfer of units
|
||||||
* Transfer of units
|
|
||||||
*/
|
|
||||||
if ($action == "transfert")
|
if ($action == "transfert")
|
||||||
{
|
{
|
||||||
include DOL_DOCUMENT_ROOT.'/product/stock/tpl/stocktransfer.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/product/stock/tpl/stocktransfer.tpl.php';
|
||||||
print '<br><br>';
|
print '<br><br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Set initial stock
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
if ($_GET["action"] == "definir")
|
|
||||||
{
|
|
||||||
print load_fiche_titre($langs->trans("SetStock"));
|
|
||||||
print "<form action=\"product.php?id=$object->id\" method=\"post\">\n";
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<input type="hidden" name="action" value="create_stock">';
|
|
||||||
print '<table class="border" width="100%"><tr>';
|
|
||||||
print '<td width="15%">'.$langs->trans("Warehouse").'</td><td width="40%">';
|
|
||||||
print $formproduct->selectWarehouses('','id_entrepot','',1);
|
|
||||||
print '</td><td width="15%">'.$langs->trans("NumberOfUnit").'</td><td width="15%"><input name="nbpiece" size="10" value=""></td></tr>';
|
|
||||||
print '<tr><td colspan="4" align="center"><input type="submit" class="button" value="'.$langs->trans('Save').'"> ';
|
|
||||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans('Cancel').'"></td></tr>';
|
|
||||||
print '</table>';
|
|
||||||
print '</form>';
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -831,7 +808,7 @@ if ($resql)
|
|||||||
$entrepotstatic->id=$obj->rowid;
|
$entrepotstatic->id=$obj->rowid;
|
||||||
$entrepotstatic->libelle=$obj->label;
|
$entrepotstatic->libelle=$obj->label;
|
||||||
$entrepotstatic->lieu=$obj->lieu;
|
$entrepotstatic->lieu=$obj->lieu;
|
||||||
$stock_real = round($obj->reel, 10);
|
$stock_real = price2num($obj->reel, 'MS');
|
||||||
print '<tr '.$bc[$var].'>';
|
print '<tr '.$bc[$var].'>';
|
||||||
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 align="right">'.$stock_real.($stock_real < 0 ?' '.img_warning():'').'</td>';
|
||||||
@ -862,8 +839,10 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
if ($action == 'editline' && GETPOST('lineid','int') == $pdluo->id)
|
if ($action == 'editline' && GETPOST('lineid','int') == $pdluo->id)
|
||||||
{ //Current line edit
|
{ //Current line edit
|
||||||
print "\n".'<tr><td colspan="9">';
|
print "\n".'<tr>';
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST"><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 colspan="9">';
|
||||||
|
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 '<td align="right" width="10%"><input type="text" name="batch_number" value="'.$pdluo->batch.'"></td>';
|
print '<td align="right" width="10%"><input type="text" name="batch_number" value="'.$pdluo->batch.'"></td>';
|
||||||
print '<td align="center" width="10%">';
|
print '<td align="center" width="10%">';
|
||||||
$form->select_date($pdluo->eatby,'eatby','','',1,'',1,0,1);
|
$form->select_date($pdluo->eatby,'eatby','','',1,'',1,0,1);
|
||||||
@ -874,7 +853,8 @@ if ($resql)
|
|||||||
print '<td align="right" width="10%">'.$pdluo->qty.($pdluo->qty<0?' '.img_warning():'').'</td>';
|
print '<td align="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></form>';
|
print '</table>';
|
||||||
|
print '</form>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -901,7 +881,7 @@ if ($resql)
|
|||||||
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 align="right" class="liste_total" colspan="4">'.$langs->trans("Total").':</td>';
|
||||||
print '<td class="liste_total" align="right">'.$total.'</td>';
|
print '<td class="liste_total" align="right">'.price2num($total, 'MS').'</td>';
|
||||||
print '<td class="liste_total" align="right">';
|
print '<td class="liste_total" align="right">';
|
||||||
print ($totalwithpmp?price(price2num($totalvalue/$totalwithpmp,'MU')):' '); // This value may have rounding errors
|
print ($totalwithpmp?price(price2num($totalvalue/$totalwithpmp,'MU')):' '); // This value may have rounding errors
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -674,14 +674,12 @@ elseif ($object->id > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
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 '<input type="hidden" name="id" value="'.$object->id.'">';
|
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||||
print '<input type="hidden" name="comefromclone" value="'.$comefromclone.'">';
|
print '<input type="hidden" name="comefromclone" value="'.$comefromclone.'">';
|
||||||
|
|
||||||
|
|
||||||
$head=project_prepare_head($object);
|
$head=project_prepare_head($object);
|
||||||
dol_fiche_head($head, 'project', $langs->trans("Project"),0,($object->public?'projectpub':'project'));
|
dol_fiche_head($head, 'project', $langs->trans("Project"),0,($object->public?'projectpub':'project'));
|
||||||
|
|
||||||
|
|||||||
@ -877,6 +877,8 @@ foreach ($listofreferent as $key => $value)
|
|||||||
$warning='';
|
$warning='';
|
||||||
if (empty($value['disableamount']))
|
if (empty($value['disableamount']))
|
||||||
{
|
{
|
||||||
|
$total_ht_by_line=null;
|
||||||
|
$othermessage='';
|
||||||
if ($tablename == 'don') $total_ht_by_line=$element->amount;
|
if ($tablename == 'don') $total_ht_by_line=$element->amount;
|
||||||
elseif ($tablename == 'projet_task')
|
elseif ($tablename == 'projet_task')
|
||||||
{
|
{
|
||||||
@ -893,7 +895,7 @@ foreach ($listofreferent as $key => $value)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $langs->trans("ModuleDisabled");
|
$othermessage=$form->textwithpicto($langs->trans("NotAvailable"), $langs->trans("ModuleSalaryToDefineHourlyRateMustBeEnabled"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -901,9 +903,13 @@ foreach ($listofreferent as $key => $value)
|
|||||||
$total_ht_by_line=$element->total_ht;
|
$total_ht_by_line=$element->total_ht;
|
||||||
}
|
}
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
if (! $qualifiedfortotal) print '<strike>';
|
if ($othermessage) print $othermessage;
|
||||||
print (isset($total_ht_by_line)?price($total_ht_by_line):' ');
|
if (isset($total_ht_by_line))
|
||||||
if (! $qualifiedfortotal) print '</strike>';
|
{
|
||||||
|
if (! $qualifiedfortotal) print '<strike>';
|
||||||
|
print price($total_ht_by_line);
|
||||||
|
if (! $qualifiedfortotal) print '</strike>';
|
||||||
|
}
|
||||||
if ($warning) print ' '.img_warning($warning);
|
if ($warning) print ' '.img_warning($warning);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
@ -912,20 +918,33 @@ foreach ($listofreferent as $key => $value)
|
|||||||
// Amount inc tax
|
// Amount inc tax
|
||||||
if (empty($value['disableamount']))
|
if (empty($value['disableamount']))
|
||||||
{
|
{
|
||||||
|
$total_ttc_by_line=null;
|
||||||
if ($tablename == 'don') $total_ttc_by_line=$element->amount;
|
if ($tablename == 'don') $total_ttc_by_line=$element->amount;
|
||||||
elseif ($tablename == 'projet_task')
|
elseif ($tablename == 'projet_task')
|
||||||
{
|
{
|
||||||
$defaultvat = get_default_tva($mysoc, $mysoc);
|
if (! empty($conf->salaries->enabled))
|
||||||
$total_ttc_by_line = price2num($total_ht_by_line * (1 + ($defaultvat / 100)),'MT');
|
{
|
||||||
|
// TODO Permission to read daily rate
|
||||||
|
$defaultvat = get_default_tva($mysoc, $mysoc);
|
||||||
|
$total_ttc_by_line = price2num($total_ht_by_line * (1 + ($defaultvat / 100)),'MT');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$othermessage=$form->textwithpicto($langs->trans("NotAvailable"), $langs->trans("ModuleSalaryToDefineHourlyRateMustBeEnabled"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$total_ttc_by_line=$element->total_ttc;
|
$total_ttc_by_line=$element->total_ttc;
|
||||||
}
|
}
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
if (! $qualifiedfortotal) print '<strike>';
|
if ($othermessage) print $othermessage;
|
||||||
print (isset($total_ttc_by_line)?price($total_ttc_by_line):' ');
|
if (isset($total_ttc_by_line))
|
||||||
if (! $qualifiedfortotal) print '</strike>';
|
{
|
||||||
|
if (! $qualifiedfortotal) print '<strike>';
|
||||||
|
print price($total_ttc_by_line);
|
||||||
|
if (! $qualifiedfortotal) print '</strike>';
|
||||||
|
}
|
||||||
if ($warning) print ' '.img_warning($warning);
|
if ($warning) print ' '.img_warning($warning);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
@ -988,15 +1007,25 @@ foreach ($listofreferent as $key => $value)
|
|||||||
|
|
||||||
if ($breakline) print $breakline;
|
if ($breakline) print $breakline;
|
||||||
|
|
||||||
|
// Total
|
||||||
print '<tr class="liste_total"><td colspan="4">'.$langs->trans("Number").': '.$i.'</td>';
|
print '<tr class="liste_total"><td colspan="4">'.$langs->trans("Number").': '.$i.'</td>';
|
||||||
//if (empty($value['disableamount']) && ! in_array($tablename, array('projet_task'))) print '<td align="right" width="100">'.$langs->trans("TotalHT").' : '.price($total_ht).'</td>';
|
//if (empty($value['disableamount']) && ! in_array($tablename, array('projet_task'))) print '<td align="right" width="100">'.$langs->trans("TotalHT").' : '.price($total_ht).'</td>';
|
||||||
//elseif (empty($value['disableamount']) && in_array($tablename, array('projet_task'))) print '<td align="right" width="100">'.$langs->trans("Total").' : '.price($total_ht).'</td>';
|
//elseif (empty($value['disableamount']) && in_array($tablename, array('projet_task'))) print '<td align="right" width="100">'.$langs->trans("Total").' : '.price($total_ht).'</td>';
|
||||||
if (empty($value['disableamount'])) print '<td align="right" width="100">'.$langs->trans("TotalHT").' : '.price($total_ht).'</td>';
|
print '<td align="right">';
|
||||||
else print '<td></td>';
|
if (empty($value['disableamount']))
|
||||||
|
{
|
||||||
|
if (! empty($conf->salaries->enabled)) print ''.$langs->trans("TotalHT").' : '.price($total_ht);
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
//if (empty($value['disableamount']) && ! in_array($tablename, array('projet_task'))) print '<td align="right" width="100">'.$langs->trans("TotalTTC").' : '.price($total_ttc).'</td>';
|
//if (empty($value['disableamount']) && ! in_array($tablename, array('projet_task'))) print '<td align="right" width="100">'.$langs->trans("TotalTTC").' : '.price($total_ttc).'</td>';
|
||||||
//elseif (empty($value['disableamount']) && in_array($tablename, array('projet_task'))) print '<td align="right" width="100"></td>';
|
//elseif (empty($value['disableamount']) && in_array($tablename, array('projet_task'))) print '<td align="right" width="100"></td>';
|
||||||
if (empty($value['disableamount'])) print '<td align="right" width="100">'.$langs->trans("TotalTTC").' : '.price($total_ttc).'</td>';
|
print '<td align="right">';
|
||||||
else print '<td></td>';
|
if (empty($value['disableamount']))
|
||||||
|
{
|
||||||
|
|
||||||
|
if (! empty($conf->salaries->enabled)) print $langs->trans("TotalTTC").' : '.price($total_ttc);
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
50
htdocs/public/notice.php
Normal file
50
htdocs/public/notice.php
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* 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
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file htdocs/public/notice.php
|
||||||
|
* \brief Dolibarr page to show a notice.
|
||||||
|
* Default notice is a message to say network connection is off.
|
||||||
|
* You can also call this page with URL:
|
||||||
|
* /public/notice.php?lang=xx_XX&transkey=translation_key (key must be inside file main.lang, error.lang or other.lang)
|
||||||
|
* /public/notice.php?transphrase=url_encoded_sentence_to_show
|
||||||
|
*/
|
||||||
|
|
||||||
|
define('NOCSRFCHECK',1);
|
||||||
|
define('NOLOGIN',1);
|
||||||
|
|
||||||
|
require '../main.inc.php';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* View
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (! GETPOST('transkey') && ! GETPOST('transphrase'))
|
||||||
|
{
|
||||||
|
print 'Sorry, it seems your internet connexion is off.<br>';
|
||||||
|
print 'You need to be connected to network to use this software.<br>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$langs->load("error");
|
||||||
|
$langs->load("other");
|
||||||
|
|
||||||
|
if (GETPOST('transphrase')) print GETPOST('transphrase');
|
||||||
|
if (GETPOST('transkey')) print $langs->trans(GETPOST('transkey'));
|
||||||
|
}
|
||||||
|
|
||||||
@ -1,37 +0,0 @@
|
|||||||
<?php
|
|
||||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
|
||||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
|
||||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
* 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
|
|
||||||
* 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/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \file htdocs/public/offline.php
|
|
||||||
* \brief Dolibarr offline page
|
|
||||||
*/
|
|
||||||
|
|
||||||
define('NOCSRFCHECK',1);
|
|
||||||
define('NOLOGIN',1);
|
|
||||||
|
|
||||||
require '../main.inc.php';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* View
|
|
||||||
*/
|
|
||||||
|
|
||||||
print 'Sorry, it seems your internet connexion is off.<br>';
|
|
||||||
print 'You need to be connected to network to use this software.<br>';
|
|
||||||
|
|
||||||
@ -249,6 +249,7 @@ if ($type_element == 'supplier_invoice')
|
|||||||
$tables_from = MAIN_DB_PREFIX."facture_fourn as f,".MAIN_DB_PREFIX."facture_fourn_det as d";
|
$tables_from = MAIN_DB_PREFIX."facture_fourn as f,".MAIN_DB_PREFIX."facture_fourn_det as d";
|
||||||
$where = " WHERE f.fk_soc = s.rowid AND s.rowid = ".$socid;
|
$where = " WHERE f.fk_soc = s.rowid AND s.rowid = ".$socid;
|
||||||
$where.= " AND d.fk_facture_fourn = f.rowid";
|
$where.= " AND d.fk_facture_fourn = f.rowid";
|
||||||
|
$where.= " AND f.entity = ".$conf->entity;
|
||||||
$dateprint = 'f.datef';
|
$dateprint = 'f.datef';
|
||||||
$doc_number='f.ref';
|
$doc_number='f.ref';
|
||||||
$thirdTypeSelect='supplier';
|
$thirdTypeSelect='supplier';
|
||||||
@ -261,6 +262,7 @@ if ($type_element == 'supplier_order')
|
|||||||
$tables_from = MAIN_DB_PREFIX."commande_fournisseur as c,".MAIN_DB_PREFIX."commande_fournisseurdet as d";
|
$tables_from = MAIN_DB_PREFIX."commande_fournisseur as c,".MAIN_DB_PREFIX."commande_fournisseurdet as d";
|
||||||
$where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".$socid;
|
$where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".$socid;
|
||||||
$where.= " AND d.fk_commande = c.rowid";
|
$where.= " AND d.fk_commande = c.rowid";
|
||||||
|
$where.= " AND c.entity = ".$conf->entity;
|
||||||
$dateprint = 'c.date_valid';
|
$dateprint = 'c.date_valid';
|
||||||
$doc_number='c.ref';
|
$doc_number='c.ref';
|
||||||
$thirdTypeSelect='supplier';
|
$thirdTypeSelect='supplier';
|
||||||
@ -274,6 +276,7 @@ if ($type_element == 'contract')
|
|||||||
$tables_from = MAIN_DB_PREFIX."contrat as c,".MAIN_DB_PREFIX."contratdet as d";
|
$tables_from = MAIN_DB_PREFIX."contrat as c,".MAIN_DB_PREFIX."contratdet as d";
|
||||||
$where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".$socid;
|
$where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".$socid;
|
||||||
$where.= " AND d.fk_contrat = c.rowid";
|
$where.= " AND d.fk_contrat = c.rowid";
|
||||||
|
$where.= " AND c.entity = ".$conf->entity;
|
||||||
$dateprint = 'c.date_valid';
|
$dateprint = 'c.date_valid';
|
||||||
$doc_number='c.ref';
|
$doc_number='c.ref';
|
||||||
$thirdTypeSelect='customer';
|
$thirdTypeSelect='customer';
|
||||||
|
|||||||
@ -1439,7 +1439,7 @@ table.login_table_securitycode tr td {
|
|||||||
#img_securitycode {
|
#img_securitycode {
|
||||||
border: 1px solid #DDDDDD;
|
border: 1px solid #DDDDDD;
|
||||||
}
|
}
|
||||||
#img_logo {
|
#img_logo, .img_logo {
|
||||||
max-width: 200px;
|
max-width: 200px;
|
||||||
max-height: 100px;
|
max-height: 100px;
|
||||||
}
|
}
|
||||||
@ -2380,7 +2380,7 @@ div.tabBar div.border .table-border-row, div.tabBar div.border .table-key-border
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
div .tdtop {
|
div .tdtop {
|
||||||
vertical-align: top;
|
vertical-align: top !important;
|
||||||
padding-top: 5px !important;
|
padding-top: 5px !important;
|
||||||
padding-bottom: 0px;
|
padding-bottom: 0px;
|
||||||
}
|
}
|
||||||
@ -3041,14 +3041,14 @@ div.error {
|
|||||||
|
|
||||||
/* Info admin */
|
/* Info admin */
|
||||||
div.info {
|
div.info {
|
||||||
color: #302010;
|
color: #303020;
|
||||||
padding: 0.4em 0.4em 0.4em 0.4em;
|
padding: 0.4em 0.4em 0.4em 0.4em;
|
||||||
margin: 0.5em 0em 0.5em 0em;
|
margin: 0.5em 0em 0.5em 0em;
|
||||||
border: 1px solid #DFBF9A;
|
border: 1px solid #AAAAAA;
|
||||||
-moz-border-radius: 4px;
|
-moz-border-radius: 4px;
|
||||||
-webkit-border-radius: 4px;
|
-webkit-border-radius: 4px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background: #EFCFAA;
|
background: #E0EAE4;
|
||||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1479,7 +1479,7 @@ table.login_table_securitycode tr td {
|
|||||||
#img_securitycode {
|
#img_securitycode {
|
||||||
border: 1px solid #f4f4f4;
|
border: 1px solid #f4f4f4;
|
||||||
}
|
}
|
||||||
#img_logo {
|
#img_logo, .img-logo {
|
||||||
max-width: 200px;
|
max-width: 200px;
|
||||||
max-height: 100px;
|
max-height: 100px;
|
||||||
}
|
}
|
||||||
@ -2768,6 +2768,11 @@ div.tabBar .noborder {
|
|||||||
-webkit-box-shadow: 0px 0px 0px #f4f4f4 !important;
|
-webkit-box-shadow: 0px 0px 0px #f4f4f4 !important;
|
||||||
box-shadow: 0px 0px 0px #f4f4f4 !important;
|
box-shadow: 0px 0px 0px #f4f4f4 !important;
|
||||||
}
|
}
|
||||||
|
div .tdtop {
|
||||||
|
vertical-align: top !important;
|
||||||
|
padding-top: 5px !important;
|
||||||
|
padding-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
#tablelines tr.liste_titre td, .paymenttable tr.liste_titre td, .margintable tr.liste_titre td, .tableforservicepart1 tr.liste_titre td {
|
#tablelines tr.liste_titre td, .paymenttable tr.liste_titre td, .margintable tr.liste_titre td, .tableforservicepart1 tr.liste_titre td {
|
||||||
border-bottom: 1px solid #AAA !important;
|
border-bottom: 1px solid #AAA !important;
|
||||||
@ -2944,14 +2949,14 @@ div.error {
|
|||||||
|
|
||||||
/* Info admin */
|
/* Info admin */
|
||||||
div.info {
|
div.info {
|
||||||
color: #302010;
|
color: #303020;
|
||||||
padding: 0.4em 0.4em 0.4em 0.4em;
|
padding: 0.4em 0.4em 0.4em 0.4em;
|
||||||
margin: 0.5em 0em 0.5em 0em;
|
margin: 0.5em 0em 0.5em 0em;
|
||||||
border: 1px solid #DFBF9A;
|
border: 1px solid #AAAAAA;
|
||||||
-moz-border-radius:3px;
|
-moz-border-radius: 4px;
|
||||||
-webkit-border-radius: 3px;
|
-webkit-border-radius: 4px;
|
||||||
border-radius:3px;
|
border-radius: 4px;
|
||||||
background: #EFCFAA;
|
background: #E0EAE4;
|
||||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user