Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop

Conflicts:
	ChangeLog
This commit is contained in:
Geoffrey 2013-07-19 17:33:29 +02:00
commit 27e26c872e
80 changed files with 558 additions and 394 deletions

View File

@ -6,6 +6,7 @@ English Dolibarr ChangeLog
For users: For users:
- New: [ task #862 ] Add ODT on shipments - New: [ task #862 ] Add ODT on shipments
- New: [ task #149 ] Add # of notes and attachments in tabs - New: [ task #149 ] Add # of notes and attachments in tabs
- New: Can edit customer ref at eny time.
- New: [ task #877 ] Reorganize menus. - New: [ task #877 ] Reorganize menus.
- New: [ task #858 ] Holiday module: note on manual holiday assignation. - New: [ task #858 ] Holiday module: note on manual holiday assignation.
- New: [ task #892 ] Add hidden option in thirdparty customer/supplier module to hide non active - New: [ task #892 ] Add hidden option in thirdparty customer/supplier module to hide non active
@ -31,12 +32,12 @@ For users:
- New: Can add an event automatically when a projet is create. - New: Can add an event automatically when a projet is create.
- New: Add option MAIN_GENERATE_DOCUMENT_WITH_PICTURE. - New: Add option MAIN_GENERATE_DOCUMENT_WITH_PICTURE.
- New: Add option excludethirdparties and onlythirdparties into merge pdf scripts. - New: Add option excludethirdparties and onlythirdparties into merge pdf scripts.
- New : [ task #925 ] Add ODT document generation for Tasks in project module.
- New : [ task #924 ] Add numbering rule on task.
- New : [ task #165 ] Add import/export of multiprices.
- New: Add Maghreb regions and departments.
- New: A more responsive desgin for statistic box of home page.
- Qual: Implement same rule for return value of all command line scripts (0 when success, <>0 if error). - Qual: Implement same rule for return value of all command line scripts (0 when success, <>0 if error).
- New : [ task #925 ] Add ODT document generation for Tasks in project module
- New : [ task #924 ] Add numbering rule on task
- New : [ task #165 ] Add import/export of multiprices
- New: Add Maghreb regions and departments
For translators: For translators:
@ -57,6 +58,7 @@ For developers:
key to use a specific language file. key to use a specific language file.
- New: Make some changes to allow usage of several alternative $dolibarr_main_url_root variables. - New: Make some changes to allow usage of several alternative $dolibarr_main_url_root variables.
Fix also several bugs with old code. Fix also several bugs with old code.
- Qual: All nowrap properties are now using CSS class nowrap.
WARNING: This may create regression for some external modules, but was necessary to make WARNING: This may create regression for some external modules, but was necessary to make
Dolibarr better: Dolibarr better:
@ -67,8 +69,8 @@ If your action class for hook was returning a string or an array, instead your m
set $actionclassinstance->results (to return array) set $actionclassinstance->results (to return array)
or $actionclassinstance->resprints (to return string) or $actionclassinstance->resprints (to return string)
to return same thing. The return value must be replaced by a "return 0"; to return same thing. The return value must be replaced by a "return 0";
Goal is to fix old compatibility code that does not match hook Goal is to fix old compatibility code that does not match hook specifications:
specification: http://wiki.dolibarr.org/index.php/Hooks_system http://wiki.dolibarr.org/index.php/Hooks_system
- Some methods object->addline used a first parameter that was object->id, some not. Of course - Some methods object->addline used a first parameter that was object->id, some not. Of course
this was not a good pratice, since object->id is already known so no need to provide it as this was not a good pratice, since object->id is already known so no need to provide it as

View File

@ -98,17 +98,26 @@ END
* Staying into git root directory, run * Staying into git root directory, run
git-import-orig -vv ../tcpdf_6.0.020+dfsg.orig.tar.xz git-import-orig -vv ../tcpdf_6.0.020+dfsg.orig.tar.xz
git-commit
* Add an entry into debian/changelog and commit by amending previous commit. * Add an entry into debian/changelog
date -R will return formated string date to use into changelog
* We try to build package * We try to build package
git-buildpackage -us -uc git-buildpackage -us -uc
* If package .deb is ok: * If package .deb is ok:
git-commit (but do not use option "amend" previous commit)
git-buildpackage --git-tag git-buildpackage --git-tag
git push git push
git push --tags git push --tags
* Then ??? * Compilation par un développeur debian et envoi par
sbuild ...
dput ...
* Go into page. You should see new package into unstable.
http://packages.qa.debian.org/t/tcpdf.html http://packages.qa.debian.org/t/tcpdf.html
* Package will be into release when test will be moved as stable.

View File

@ -13,7 +13,7 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
libphp-adodb, libphp-adodb,
libnusoap-php, libnusoap-php,
libphp-pclzip, libphp-pclzip,
libfpdi-php, libfpdf-tpl-php, php-fpdf libfpdi-php, libfpdf-tpl-php, php-fpdf,
libjs-jquery, libjs-jquery-ui, libjs-flot, ckeditor, libjs-jquery, libjs-jquery-ui, libjs-flot, ckeditor,
ttf-dejavu-core, ttf-dejavu-core,
xdg-utils, xdg-utils,

View File

@ -214,7 +214,7 @@ print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td width="100">'.$langs->trans("Name").'</td>'; print '<td width="100">'.$langs->trans("Name").'</td>';
print '<td>'.$langs->trans("Description").'</td>'; print '<td>'.$langs->trans("Description").'</td>';
print '<td nowrap>'.$langs->trans("Example").'</td>'; print '<td class="nowrap">'.$langs->trans("Example").'</td>';
print '<td align="center" width="60">'.$langs->trans("Status").'</td>'; print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>'; print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>';
print '</tr>'."\n"; print '</tr>'."\n";

View File

@ -261,7 +261,7 @@ print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Name")."</td>\n"; print '<td>'.$langs->trans("Name")."</td>\n";
print '<td>'.$langs->trans("Description")."</td>\n"; print '<td>'.$langs->trans("Description")."</td>\n";
print '<td nowrap>'.$langs->trans("Example")."</td>\n"; print '<td class="nowrap">'.$langs->trans("Example")."</td>\n";
print '<td align="center" width="60">'.$langs->trans("Status").'</td>'; print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>'; print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>';
print '</tr>'."\n"; print '</tr>'."\n";

View File

@ -550,7 +550,7 @@ else if ($id || $ref)
if (! empty($conf->mailing->enabled)) if (! empty($conf->mailing->enabled))
{ {
$langs->load("mails"); $langs->load("mails");
print '<td nowrap>'.$langs->trans("NbOfEMailingsReceived").'</td>'; print '<td class="nowrap">'.$langs->trans("NbOfEMailingsReceived").'</td>';
print '<td><a href="'.DOL_URL_ROOT.'/comm/mailing/liste.php?filteremail='.urlencode($object->email).'">'.$object->getNbOfEMailings().'</a></td>'; print '<td><a href="'.DOL_URL_ROOT.'/comm/mailing/liste.php?filteremail='.urlencode($object->email).'">'.$object->getNbOfEMailings().'</a></td>';
} }
else else

View File

@ -191,7 +191,7 @@ if ($act->id > 0)
print '</td></tr>'; print '</td></tr>';
// Status // Status
print '<tr><td nowrap>'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="2">'; print '<tr><td class="nowrap">'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="2">';
print $act->getLibStatut(4); print $act->getLibStatut(4);
print '</td></tr>'; print '</td></tr>';
@ -246,7 +246,7 @@ if ($act->id > 0)
} }
// Priority // Priority
print '<tr><td nowrap>'.$langs->trans("Priority").'</td><td colspan="3">'; print '<tr><td class="nowrap">'.$langs->trans("Priority").'</td><td colspan="3">';
print ($act->priority?$act->priority:''); print ($act->priority?$act->priority:'');
print '</td></tr>'; print '</td></tr>';

View File

@ -537,7 +537,7 @@ if ($action == 'create')
// Realised by // Realised by
if ($conf->global->AGENDA_ENABLE_DONEBY) if ($conf->global->AGENDA_ENABLE_DONEBY)
{ {
print '<tr><td nowrap>'.$langs->trans("ActionDoneBy").'</td><td>'; print '<tr><td class="nowrap">'.$langs->trans("ActionDoneBy").'</td><td>';
$form->select_users(GETPOST("doneby")?GETPOST("doneby"):(! empty($actioncomm->userdone->id) && $percent==100?$actioncomm->userdone->id:0),'doneby',1); $form->select_users(GETPOST("doneby")?GETPOST("doneby"):(! empty($actioncomm->userdone->id) && $percent==100?$actioncomm->userdone->id:0),'doneby',1);
print '</td></tr>'; print '</td></tr>';
} }
@ -570,7 +570,7 @@ if ($action == 'create')
// If company is forced, we propose contacts (may be contact is also forced) // If company is forced, we propose contacts (may be contact is also forced)
if (GETPOST("contactid") > 0 || GETPOST('socid','int') > 0) if (GETPOST("contactid") > 0 || GETPOST('socid','int') > 0)
{ {
print '<tr><td nowrap>'.$langs->trans("ActionOnContact").'</td><td>'; print '<tr><td class="nowrap">'.$langs->trans("ActionOnContact").'</td><td>';
$form->select_contacts(GETPOST('socid','int'),GETPOST('contactid'),'contactid',1); $form->select_contacts(GETPOST('socid','int'),GETPOST('contactid'),'contactid',1);
print '</td></tr>'; print '</td></tr>';
} }
@ -600,7 +600,7 @@ if ($action == 'create')
} }
// Priority // Priority
print '<tr><td nowrap>'.$langs->trans("Priority").'</td><td colspan="3">'; print '<tr><td class="nowrap">'.$langs->trans("Priority").'</td><td colspan="3">';
print '<input type="text" name="priority" value="'.(GETPOST('priority')?GETPOST('priority'):($actioncomm->priority?$actioncomm->priority:'')).'" size="5">'; print '<input type="text" name="priority" value="'.(GETPOST('priority')?GETPOST('priority'):($actioncomm->priority?$actioncomm->priority:'')).'" size="5">';
print '</td></tr>'; print '</td></tr>';

View File

@ -293,7 +293,7 @@ if ($id > 0)
} }
// TVA Intra // TVA Intra
print '<tr><td nowrap>'.$langs->trans('VATIntra').'</td><td colspan="3">'; print '<tr><td class="nowrap">'.$langs->trans('VATIntra').'</td><td colspan="3">';
print $object->tva_intra; print $object->tva_intra;
print '</td></tr>'; print '</td></tr>';
@ -319,8 +319,8 @@ if ($id > 0)
print '</tr>'; print '</tr>';
// Mode de reglement par defaut // Mode de reglement par defaut
print '<tr><td nowrap>'; print '<tr><td class="nowrap">';
print '<table width="100%" class="nobordernopadding"><tr><td nowrap>'; print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans('PaymentMode'); print $langs->trans('PaymentMode');
print '<td>'; print '<td>';
if (($action != 'editmode') && $user->rights->societe->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmode&amp;socid='.$object->id.'">'.img_edit($langs->trans('SetMode'),1).'</a></td>'; if (($action != 'editmode') && $user->rights->societe->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmode&amp;socid='.$object->id.'">'.img_edit($langs->trans('SetMode'),1).'</a></td>';
@ -338,8 +338,8 @@ if ($id > 0)
print '</tr>'; print '</tr>';
// Relative discounts (Discounts-Drawbacks-Rebates) // Relative discounts (Discounts-Drawbacks-Rebates)
print '<tr><td nowrap>'; print '<tr><td class="nowrap">';
print '<table width="100%" class="nobordernopadding"><tr><td nowrap>'; print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans("CustomerRelativeDiscountShort"); print $langs->trans("CustomerRelativeDiscountShort");
print '<td><td align="right">'; print '<td><td align="right">';
if ($user->rights->societe->creer && !$user->societe_id > 0) if ($user->rights->societe->creer && !$user->societe_id > 0)
@ -351,9 +351,9 @@ if ($id > 0)
print '</tr>'; print '</tr>';
// Absolute discounts (Discounts-Drawbacks-Rebates) // Absolute discounts (Discounts-Drawbacks-Rebates)
print '<tr><td nowrap>'; print '<tr><td class="nowrap">';
print '<table width="100%" class="nobordernopadding">'; print '<table width="100%" class="nobordernopadding">';
print '<tr><td nowrap>'; print '<tr><td class="nowrap">';
print $langs->trans("CustomerAbsoluteDiscountShort"); print $langs->trans("CustomerAbsoluteDiscountShort");
print '<td><td align="right">'; print '<td><td align="right">';
if ($user->rights->societe->creer && !$user->societe_id > 0) if ($user->rights->societe->creer && !$user->societe_id > 0)
@ -373,8 +373,8 @@ if ($id > 0)
// Multiprice level // Multiprice level
if (! empty($conf->global->PRODUIT_MULTIPRICES)) if (! empty($conf->global->PRODUIT_MULTIPRICES))
{ {
print '<tr><td nowrap>'; print '<tr><td class="nowrap">';
print '<table width="100%" class="nobordernopadding"><tr><td nowrap>'; print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans("PriceLevel"); print $langs->trans("PriceLevel");
print '<td><td align="right">'; print '<td><td align="right">';
if ($user->rights->societe->creer) if ($user->rights->societe->creer)
@ -389,8 +389,8 @@ if ($id > 0)
// Level of prospect // Level of prospect
if ($object->client == 2 || $object->client == 3) if ($object->client == 2 || $object->client == 3)
{ {
print '<tr><td nowrap>'; print '<tr><td class="nowrap">';
print '<table width="100%" class="nobordernopadding"><tr><td nowrap>'; print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans('ProspectLevel'); print $langs->trans('ProspectLevel');
print '<td>'; print '<td>';
if ($action != 'editlevel' && $user->rights->societe->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editlevel&amp;socid='.$object->id.'">'.img_edit($langs->trans('Modify'),1).'</a></td>'; if ($action != 'editlevel' && $user->rights->societe->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editlevel&amp;socid='.$object->id.'">'.img_edit($langs->trans('Modify'),1).'</a></td>';

View File

@ -98,9 +98,9 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
print '<table class="noborder nohover" width="100%">'; print '<table class="noborder nohover" width="100%">';
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchAProposal").'</td></tr>'; print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchAProposal").'</td></tr>';
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';
print '<td nowrap>'.$langs->trans("Ref").':</td><td><input type="text" class="flat" name="sf_ref" size="18"></td>'; print '<td class="nowrap">'.$langs->trans("Ref").':</td><td><input type="text" class="flat" name="sf_ref" size="18"></td>';
print '<td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print '<td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
print '<tr '.$bc[$var].'><td nowrap>'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td>'; print '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td>';
print '</tr>'; print '</tr>';
print "</table></form>\n"; print "</table></form>\n";
print "<br>\n"; print "<br>\n";
@ -117,9 +117,9 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire)
print '<table class="noborder nohover" width="100%">'; print '<table class="noborder nohover" width="100%">';
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchAContract").'</td></tr>'; print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchAContract").'</td></tr>';
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';
print '<td nowrap>'.$langs->trans("Ref").':</td><td><input type="text" class="flat" name="search_contract" size="18"></td>'; print '<td class="nowrap">'.$langs->trans("Ref").':</td><td><input type="text" class="flat" name="search_contract" size="18"></td>';
print '<td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print '<td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
print '<tr '.$bc[$var].'><td nowrap>'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td>'; print '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td>';
print '</tr>'; print '</tr>';
print "</table></form>\n"; print "</table></form>\n";
print "<br>"; print "<br>";

View File

@ -55,10 +55,10 @@ print '<form method="post" action="'.DOL_URL_ROOT.'/comm/mailing/liste.php">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="noborder nohover" width="100%">'; print '<table class="noborder nohover" width="100%">';
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchAMailing").'</td></tr>'; print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchAMailing").'</td></tr>';
print '<tr '.$bc[$var].'><td nowrap>'; print '<tr '.$bc[$var].'><td class="nowrap">';
print $langs->trans("Ref").':</td><td><input type="text" class="flat" name="sref" size="18"></td>'; print $langs->trans("Ref").':</td><td><input type="text" class="flat" name="sref" size="18"></td>';
print '<td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print '<td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
print '<tr '.$bc[$var].'><td nowrap>'; print '<tr '.$bc[$var].'><td class="nowrap">';
print $langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td>'; print $langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td>';
print "</table></form><br>\n"; print "</table></form><br>\n";

View File

@ -1597,7 +1597,8 @@ else
// Ref client // Ref client
print '<tr><td>'; print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap">'; print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap">';
print $langs->trans('RefCustomer').'</td><td align="left">'; print $langs->trans('RefCustomer').'</td>';
print '<td align="right"><a href="'.$_SERVER['PHP_SELF'].'?action=refclient&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('RefCustomer')).'</a></td>';
print '</td>'; print '</td>';
if ($action != 'refclient' && ! empty($object->brouillon)) print '<td align="right"><a href="'.$_SERVER['PHP_SELF'].'?action=refclient&amp;id='.$object->id.'">'.img_edit($langs->trans('Modify')).'</a></td>'; if ($action != 'refclient' && ! empty($object->brouillon)) print '<td align="right"><a href="'.$_SERVER['PHP_SELF'].'?action=refclient&amp;id='.$object->id.'">'.img_edit($langs->trans('Modify')).'</a></td>';
print '</tr></table>'; print '</tr></table>';
@ -1617,7 +1618,6 @@ else
} }
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
// Company // Company
print '<tr><td>'.$langs->trans('Company').'</td><td colspan="5">'.$soc->getNomUrl(1).'</td>'; print '<tr><td>'.$langs->trans('Company').'</td><td colspan="5">'.$soc->getNomUrl(1).'</td>';
print '</tr>'; print '</tr>';
@ -1932,7 +1932,7 @@ else
// Amount HT // Amount HT
print '<tr><td height="10" width="25%">'.$langs->trans('AmountHT').'</td>'; print '<tr><td height="10" width="25%">'.$langs->trans('AmountHT').'</td>';
print '<td align="right" nowrap><b>'.price($object->total_ht).'</b></td>'; print '<td align="right" class="nowrap"><b>'.price($object->total_ht).'</b></td>';
print '<td>'.$langs->trans("Currency".$conf->currency).'</td>'; print '<td>'.$langs->trans("Currency".$conf->currency).'</td>';
// Margin Infos // Margin Infos
@ -1945,27 +1945,27 @@ else
// Amount VAT // Amount VAT
print '<tr><td height="10">'.$langs->trans('AmountVAT').'</td>'; print '<tr><td height="10">'.$langs->trans('AmountVAT').'</td>';
print '<td align="right" nowrap>'.price($object->total_tva).'</td>'; print '<td align="right" class="nowrap">'.price($object->total_tva).'</td>';
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>'; print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
// Amount Local Taxes // Amount Local Taxes
if ($mysoc->localtax1_assuj=="1") //Localtax1 if ($mysoc->localtax1_assuj=="1") //Localtax1
{ {
print '<tr><td height="10">'.$langs->transcountry("AmountLT1",$mysoc->country_code).'</td>'; print '<tr><td height="10">'.$langs->transcountry("AmountLT1",$mysoc->country_code).'</td>';
print '<td align="right" nowrap>'.price($object->total_localtax1).'</td>'; print '<td align="right" class="nowrap">'.price($object->total_localtax1).'</td>';
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>'; print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
} }
if ($mysoc->localtax2_assuj=="1") //Localtax2 if ($mysoc->localtax2_assuj=="1") //Localtax2
{ {
print '<tr><td height="10">'.$langs->transcountry("AmountLT2",$mysoc->country_code).'</td>'; print '<tr><td height="10">'.$langs->transcountry("AmountLT2",$mysoc->country_code).'</td>';
print '<td align="right" nowrap>'.price($object->total_localtax2).'</td>'; print '<td align="right" class="nowrap">'.price($object->total_localtax2).'</td>';
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>'; print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
} }
// Amount TTC // Amount TTC
print '<tr><td height="10">'.$langs->trans('AmountTTC').'</td>'; print '<tr><td height="10">'.$langs->trans('AmountTTC').'</td>';
print '<td align="right" nowrap>'.price($object->total_ttc).'</td>'; print '<td align="right" class="nowrap">'.price($object->total_ttc).'</td>';
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>'; print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
// Statut // Statut
@ -2263,7 +2263,14 @@ else
$formmail->withto=GETPOST("sendto")?GETPOST("sendto"):$liste; $formmail->withto=GETPOST("sendto")?GETPOST("sendto"):$liste;
$formmail->withtocc=$liste; $formmail->withtocc=$liste;
$formmail->withtoccc=(! empty($conf->global->MAIN_EMAIL_USECCC)?$conf->global->MAIN_EMAIL_USECCC:false); $formmail->withtoccc=(! empty($conf->global->MAIN_EMAIL_USECCC)?$conf->global->MAIN_EMAIL_USECCC:false);
$formmail->withtopic=$langs->trans('SendPropalRef','__PROPREF__'); if(empty($object->ref_client))
{
$formmail->withtopic=$langs->trans('SendPropalRef','__PROPREF__');
}
else if(!empty($object->ref_client))
{
$formmail->withtopic=$langs->trans('SendPropalRef','__PROPREF__(__REFCLIENT__)');
}
$formmail->withfile=2; $formmail->withfile=2;
$formmail->withbody=1; $formmail->withbody=1;
$formmail->withdeliveryreceipt=1; $formmail->withdeliveryreceipt=1;
@ -2272,6 +2279,7 @@ else
// Tableau des substitutions // Tableau des substitutions
$formmail->substit['__PROPREF__']=$object->ref; $formmail->substit['__PROPREF__']=$object->ref;
$formmail->substit['__SIGNATURE__']=$user->signature; $formmail->substit['__SIGNATURE__']=$user->signature;
$formmail->substit['__REFCLIENT__']=$object->ref_client;
$formmail->substit['__PERSONALIZED__']=''; $formmail->substit['__PERSONALIZED__']='';
$formmail->substit['__CONTACTCIVNAME__']=''; $formmail->substit['__CONTACTCIVNAME__']='';
@ -2299,8 +2307,6 @@ else
$formmail->param['models']='propal_send'; $formmail->param['models']='propal_send';
$formmail->param['id']=$object->id; $formmail->param['id']=$object->id;
$formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id; $formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id;
// Init list of files // Init list of files
if (GETPOST("mode")=='init') if (GETPOST("mode")=='init')
{ {

View File

@ -80,7 +80,7 @@ if ($id > 0 || ! empty($ref))
// Ref client // Ref client
print '<tr><td>'; print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td nowrap>'; print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap">';
print $langs->trans('RefCustomer').'</td><td align="left">'; print $langs->trans('RefCustomer').'</td><td align="left">';
print '</td>'; print '</td>';
print '</tr></table>'; print '</tr></table>';

View File

@ -166,7 +166,7 @@ if ($object->id > 0)
// Ref client // Ref client
print '<tr><td>'; print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td nowrap>'; print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap">';
print $langs->trans('RefCustomer').'</td><td align="left">'; print $langs->trans('RefCustomer').'</td><td align="left">';
print '</td>'; print '</td>';
print '</tr></table>'; print '</tr></table>';

View File

@ -133,7 +133,7 @@ if ($object->id > 0)
// Ref client // Ref client
print '<tr><td>'; print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td nowrap>'; print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap">';
print $langs->trans('RefCustomer').'</td><td align="left">'; print $langs->trans('RefCustomer').'</td><td align="left">';
print '</td>'; print '</td>';
print '</tr></table>'; print '</tr></table>';

View File

@ -69,7 +69,7 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchPropal").'</td></tr>'; print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchPropal").'</td></tr>';
print '<tr '.$bc[$var].'><td>'; print '<tr '.$bc[$var].'><td>';
print $langs->trans("Ref").':</td><td><input type="text" class="flat" name="sref" size=18></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print $langs->trans("Ref").':</td><td><input type="text" class="flat" name="sref" size=18></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
print '<tr '.$bc[$var].'><td nowrap>'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td>'; print '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td>';
print '</tr>'; print '</tr>';
print "</form></table><br>\n"; print "</form></table><br>\n";

View File

@ -54,6 +54,7 @@ $search_refcustomer=GETPOST('search_refcustomer','alpha');
$search_societe=GETPOST('search_societe','alpha'); $search_societe=GETPOST('search_societe','alpha');
$search_montant_ht=GETPOST('search_montant_ht','alpha'); $search_montant_ht=GETPOST('search_montant_ht','alpha');
$search_author=GETPOST('search_author','alpha'); $search_author=GETPOST('search_author','alpha');
$search_town=GETPOST('search_town','alpha');
$sall=GETPOST("sall"); $sall=GETPOST("sall");
$mesg=(GETPOST("msg") ? GETPOST("msg") : GETPOST("mesg")); $mesg=(GETPOST("msg") ? GETPOST("msg") : GETPOST("mesg"));
@ -101,6 +102,7 @@ if (GETPOST("button_removefilter_x"))
$search_societe=''; $search_societe='';
$search_montant_ht=''; $search_montant_ht='';
$search_author=''; $search_author='';
$search_town='';
$year=''; $year='';
$month=''; $month='';
} }
@ -137,7 +139,7 @@ if (! $sortfield) $sortfield='p.datep';
if (! $sortorder) $sortorder='DESC'; if (! $sortorder) $sortorder='DESC';
$limit = $conf->liste_limit; $limit = $conf->liste_limit;
$sql = 'SELECT s.rowid, s.nom, s.client, '; $sql = 'SELECT s.rowid, s.nom, s.town, s.client, ';
$sql.= 'p.rowid as propalid, p.total_ht, p.ref, p.ref_client, p.fk_statut, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,'; $sql.= 'p.rowid as propalid, p.total_ht, p.ref, p.ref_client, p.fk_statut, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,';
if (! $user->rights->societe->client->voir && ! $socid) $sql .= " sc.fk_soc, sc.fk_user,"; if (! $user->rights->societe->client->voir && ! $socid) $sql .= " sc.fk_soc, sc.fk_user,";
$sql.= ' u.login'; $sql.= ' u.login';
@ -157,6 +159,10 @@ if (! $user->rights->societe->client->voir && ! $socid) //restriction
{ {
$sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
} }
if ($search_town) //restriction
{
$sql.= " AND s.town LIKE '%".$db->escape(trim($search_town))."%'";
}
if ($search_ref) if ($search_ref)
{ {
$sql.= " AND p.ref LIKE '%".$db->escape(trim($search_ref))."%'"; $sql.= " AND p.ref LIKE '%".$db->escape(trim($search_ref))."%'";
@ -229,6 +235,7 @@ if ($result)
if ($search_sale > 0) $param.='&search_sale='.$search_sale; if ($search_sale > 0) $param.='&search_sale='.$search_sale;
if ($search_montant_ht) $param.='&search_montant_ht='.$search_montant_ht; if ($search_montant_ht) $param.='&search_montant_ht='.$search_montant_ht;
if ($search_author) $param.='&search_author='.$search_author; if ($search_author) $param.='&search_author='.$search_author;
if ($search_town) $param.='&search_town='.$search_town;
print_barre_liste($langs->trans('ListOfProposals').' '.($socid?'- '.$soc->nom:''), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num); print_barre_liste($langs->trans('ListOfProposals').' '.($socid?'- '.$soc->nom:''), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num);
// Lignes des champs de filtre // Lignes des champs de filtre
@ -264,6 +271,7 @@ if ($result)
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans('Ref'),$_SERVER["PHP_SELF"],'p.ref','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Ref'),$_SERVER["PHP_SELF"],'p.ref','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('Company'),$_SERVER["PHP_SELF"],'s.nom','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Company'),$_SERVER["PHP_SELF"],'s.nom','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('Town'),$_SERVER["PHP_SELF"],'s.town','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('RefCustomer'),$_SERVER["PHP_SELF"],'p.ref_client','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('RefCustomer'),$_SERVER["PHP_SELF"],'p.ref_client','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('Date'),$_SERVER["PHP_SELF"],'p.datep','',$param, 'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Date'),$_SERVER["PHP_SELF"],'p.datep','',$param, 'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('DateEndPropalShort'),$_SERVER["PHP_SELF"],'dfv','',$param, 'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('DateEndPropalShort'),$_SERVER["PHP_SELF"],'dfv','',$param, 'align="center"',$sortfield,$sortorder);
@ -280,6 +288,7 @@ if ($result)
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" size="16" name="search_societe" value="'.$search_societe.'">'; print '<input class="flat" type="text" size="16" name="search_societe" value="'.$search_societe.'">';
print '</td>'; print '</td>';
print '<td>&nbsp;</td>';
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat" size="10" type="text" name="search_refcustomer" value="'.$search_refcustomer.'">'; print '<input class="flat" size="10" type="text" name="search_refcustomer" value="'.$search_refcustomer.'">';
print '</td>'; print '</td>';
@ -345,12 +354,17 @@ if ($result)
print $companystatic->getNomUrl(1,'customer'); print $companystatic->getNomUrl(1,'customer');
print '</td>'; print '</td>';
// Town
print '<td class="nocellnopadd">';
print $objp->town;
print '</td>';
// Customer ref // Customer ref
print '<td class="nowrap">'; print '<td class="nocellnopadd nowrap">';
print $objp->ref_client; print $objp->ref_client;
print '</td>'; print '</td>';
// Date propale // Date proposal
print '<td align="center">'; print '<td align="center">';
$y = dol_print_date($db->jdate($objp->dp),'%Y'); $y = dol_print_date($db->jdate($objp->dp),'%Y');
$m = dol_print_date($db->jdate($objp->dp),'%m'); $m = dol_print_date($db->jdate($objp->dp),'%m');
@ -362,7 +376,7 @@ if ($result)
print ' <a href="'.$_SERVER["PHP_SELF"].'?year='.$y.'">'; print ' <a href="'.$_SERVER["PHP_SELF"].'?year='.$y.'">';
print $y."</a></td>\n"; print $y."</a></td>\n";
// Date fin validite // Date end validity
if ($objp->dfv) if ($objp->dfv)
{ {
print '<td align="center">'.dol_print_date($db->jdate($objp->dfv),'day'); print '<td align="center">'.dol_print_date($db->jdate($objp->dfv),'day');
@ -399,14 +413,14 @@ if ($result)
if($num<$limit){ if($num<$limit){
$var=!$var; $var=!$var;
print '<tr class="liste_total"><td align="left">'.$langs->trans("Total HT").'</td>'; print '<tr class="liste_total"><td align="left">'.$langs->trans("Total HT").'</td>';
print '<td colspan="5" align="right"">'.price($total).'<td colspan="3"</td>'; print '<td colspan="6" align="right"">'.price($total).'<td colspan="3"</td>';
print '</tr>'; print '</tr>';
} }
else else
{ {
$var=!$var; $var=!$var;
print '<tr class="liste_total"><td align="left">'.$langs->trans("Total HT for this page").'</td>'; print '<tr class="liste_total"><td align="left">'.$langs->trans("Total HT for this page").'</td>';
print '<td colspan="5" align="right"">'.price($total).'<td colspan="3"</td>'; print '<td colspan="6" align="right"">'.price($total).'<td colspan="3"</td>';
print '</tr>'; print '</tr>';
} }

View File

@ -96,7 +96,7 @@ if ($id > 0 || ! empty($ref))
// Ref client // Ref client
print '<tr><td>'; print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td nowrap>'; print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap">';
print $langs->trans('RefCustomer').'</td><td align="left">'; print $langs->trans('RefCustomer').'</td><td align="left">';
print '</td>'; print '</td>';
print '</tr></table>'; print '</tr></table>';

View File

@ -60,7 +60,7 @@ if (! empty($conf->propal->enabled))
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchAProposal").'</td></tr>'; print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchAProposal").'</td></tr>';
print '<tr '.$bc[$var].'><td>'; print '<tr '.$bc[$var].'><td>';
print $langs->trans("Ref").':</td><td><input type="text" class="flat" name="sf_ref" size="18"></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print $langs->trans("Ref").':</td><td><input type="text" class="flat" name="sf_ref" size="18"></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
print '<tr '.$bc[$var].'><td nowrap>'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td>'; print '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td>';
print '</tr>'; print '</tr>';
print "</form></table><br>\n"; print "</form></table><br>\n";
} }

View File

@ -243,7 +243,7 @@ if ($resql)
llxHeader('',$langs->trans("ThirdParty"),$help_url); llxHeader('',$langs->trans("ThirdParty"),$help_url);
} }
$param='&amp;stcomm='.$stcomm.'&amp;search_nom='.urlencode($search_nom).'&amp;search_zipcode='.urlencode($search_zipcode).'&amp;search_ville='.urlencode($search_ville); $param='&amp;stcomm='.$stcomm.'&amp;search_nom='.urlencode($search_nom).'&amp;search_zipcode='.urlencode($search_zipcode).'&amp;search_town='.urlencode($search_town);
// Store the status filter in the URL // Store the status filter in the URL
if (isSet($search_cstc)) if (isSet($search_cstc))
{ {

View File

@ -90,7 +90,7 @@ if ($id > 0 || ! empty($ref))
// Ref cde client // Ref cde client
print '<tr><td>'; print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td nowrap>'; print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap">';
print $langs->trans('RefCustomer').'</td><td align="left">'; print $langs->trans('RefCustomer').'</td><td align="left">';
print '</td>'; print '</td>';
print '</tr></table>'; print '</tr></table>';

View File

@ -162,7 +162,7 @@ if ($id > 0 || ! empty($ref))
// Ref commande client // Ref commande client
print '<tr><td>'; print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td nowrap>'; print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap">';
print $langs->trans('RefCustomer').'</td><td align="left">'; print $langs->trans('RefCustomer').'</td><td align="left">';
print '</td>'; print '</td>';
print '</tr></table>'; print '</tr></table>';

View File

@ -2566,7 +2566,14 @@ else
$formmail->withto=GETPOST('sendto')?GETPOST('sendto'):$liste; $formmail->withto=GETPOST('sendto')?GETPOST('sendto'):$liste;
$formmail->withtocc=$liste; $formmail->withtocc=$liste;
$formmail->withtoccc=$conf->global->MAIN_EMAIL_USECCC; $formmail->withtoccc=$conf->global->MAIN_EMAIL_USECCC;
$formmail->withtopic=$langs->trans('SendOrderRef','__ORDERREF__'); if(empty($object->ref_client))
{
$formmail->withtopic=$langs->trans('SendOrderRef','__ORDERREF__');
}
else if(!empty($object->ref_client))
{
$formmail->withtopic=$langs->trans('SendOrderRef','__ORDERREF__(__REFCLIENT__)');
}
$formmail->withfile=2; $formmail->withfile=2;
$formmail->withbody=1; $formmail->withbody=1;
$formmail->withdeliveryreceipt=1; $formmail->withdeliveryreceipt=1;
@ -2574,6 +2581,7 @@ else
// Tableau des substitutions // Tableau des substitutions
$formmail->substit['__ORDERREF__']=$object->ref; $formmail->substit['__ORDERREF__']=$object->ref;
$formmail->substit['__SIGNATURE__']=$user->signature; $formmail->substit['__SIGNATURE__']=$user->signature;
$formmail->substit['__REFCLIENT__']=$object->ref_client;
$formmail->substit['__PERSONALIZED__']=''; $formmail->substit['__PERSONALIZED__']='';
$formmail->substit['__CONTACTCIVNAME__']=''; $formmail->substit['__CONTACTCIVNAME__']='';

View File

@ -70,7 +70,7 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchOrder").'</td></tr>'; print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchOrder").'</td></tr>';
print '<tr '.$bc[$var].'><td>'; print '<tr '.$bc[$var].'><td>';
print $langs->trans("Ref").':</td><td><input type="text" class="flat" name="sref" size=18></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print $langs->trans("Ref").':</td><td><input type="text" class="flat" name="sref" size=18></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
print '<tr '.$bc[$var].'><td nowrap>'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td>'; print '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td>';
print '</tr>'; print '</tr>';
print "</form></table><br>\n"; print "</form></table><br>\n";

View File

@ -97,7 +97,7 @@ if ($id > 0 || ! empty($ref))
// Ref commande client // Ref commande client
print '<tr><td>'; print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td nowrap>'; print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap">';
print $langs->trans('RefCustomer').'</td><td align="left">'; print $langs->trans('RefCustomer').'</td><td align="left">';
print '</td>'; print '</td>';
print '</tr></table>'; print '</tr></table>';

View File

@ -416,7 +416,7 @@ if ($action == 'create' && empty($mesgs))
$html->select_date(0,'','','','',"add",1,1); $html->select_date(0,'','','','',"add",1,1);
print '</td></tr>'; print '</td></tr>';
// Payment term // Payment term
print '<tr><td nowrap>'.$langs->trans('PaymentConditionsShort').'</td><td colspan="2">'; print '<tr><td class="nowrap">'.$langs->trans('PaymentConditionsShort').'</td><td colspan="2">';
$html->select_conditions_paiements(isset($_POST['cond_reglement_id'])?$_POST['cond_reglement_id']:$cond_reglement_id,'cond_reglement_id'); $html->select_conditions_paiements(isset($_POST['cond_reglement_id'])?$_POST['cond_reglement_id']:$cond_reglement_id,'cond_reglement_id');
print '</td></tr>'; print '</td></tr>';
// Payment mode // Payment mode

View File

@ -227,7 +227,7 @@ if ($resql)
print "</td>\n"; print "</td>\n";
// Num // Num
print '<td nowrap>'.($objp->num_chq?$objp->num_chq:"")."</td>\n"; print '<td class="nowrap">'.($objp->num_chq?$objp->num_chq:"")."</td>\n";
// Description // Description
print "<td>"; print "<td>";

View File

@ -2253,7 +2253,7 @@ if ($action == 'create')
print '</td></tr>'; print '</td></tr>';
// Payment term // Payment term
print '<tr><td nowrap>'.$langs->trans('PaymentConditionsShort').'</td><td colspan="2">'; print '<tr><td class="nowrap">'.$langs->trans('PaymentConditionsShort').'</td><td colspan="2">';
$form->select_conditions_paiements(isset($_POST['cond_reglement_id'])?$_POST['cond_reglement_id']:$cond_reglement_id,'cond_reglement_id'); $form->select_conditions_paiements(isset($_POST['cond_reglement_id'])?$_POST['cond_reglement_id']:$cond_reglement_id,'cond_reglement_id');
print '</td></tr>'; print '</td></tr>';
@ -3763,7 +3763,14 @@ else if ($id > 0 || ! empty($ref))
$formmail->withto=GETPOST('sendto')?GETPOST('sendto'):$liste; $formmail->withto=GETPOST('sendto')?GETPOST('sendto'):$liste;
$formmail->withtocc=$liste; $formmail->withtocc=$liste;
$formmail->withtoccc=$conf->global->MAIN_EMAIL_USECCC; $formmail->withtoccc=$conf->global->MAIN_EMAIL_USECCC;
$formmail->withtopic=$langs->transnoentities($topicmail,'__FACREF__'); if(empty($object->ref_client))
{
$formmail->withtopic=$langs->transnoentities($topicmail,'__FACREF__');
}
else if(!empty($object->ref_client))
{
$formmail->withtopic=$langs->transnoentities($topicmail,'__FACREF__(__REFCLIENT__)');
}
$formmail->withfile=2; $formmail->withfile=2;
$formmail->withbody=1; $formmail->withbody=1;
$formmail->withdeliveryreceipt=1; $formmail->withdeliveryreceipt=1;
@ -3771,6 +3778,7 @@ else if ($id > 0 || ! empty($ref))
// Tableau des substitutions // Tableau des substitutions
$formmail->substit['__FACREF__']=$object->ref; $formmail->substit['__FACREF__']=$object->ref;
$formmail->substit['__SIGNATURE__']=$user->signature; $formmail->substit['__SIGNATURE__']=$user->signature;
$formmail->substit['__REFCLIENT__']=$object->ref_client;
$formmail->substit['__PERSONALIZED__']=''; $formmail->substit['__PERSONALIZED__']='';
$formmail->substit['__CONTACTCIVNAME__']=''; $formmail->substit['__CONTACTCIVNAME__']='';

View File

@ -283,7 +283,7 @@ if ($resql)
print_liste_field_titre($langs->trans("Taxes"),$_SERVER["PHP_SELF"],"f.tva","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Taxes"),$_SERVER["PHP_SELF"],"f.tva","",$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("AmountTTC"),$_SERVER["PHP_SELF"],"f.total_ttc","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("AmountTTC"),$_SERVER["PHP_SELF"],"f.total_ttc","",$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Received"),$_SERVER["PHP_SELF"],"am","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Received"),$_SERVER["PHP_SELF"],"am","",$param,'align="right"',$sortfield,$sortorder);
//print_liste_field_titre($langs->trans("Remain"),$_SERVER["PHP_SELF"],"am","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Rest"),$_SERVER["PHP_SELF"],"am","",$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"fk_statut,paye,am","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"fk_statut,paye,am","",$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Merge"),$_SERVER["PHP_SELF"],"","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Merge"),$_SERVER["PHP_SELF"],"","",$param,'align="center"',$sortfield,$sortorder);
print "</tr>\n"; print "</tr>\n";
@ -300,7 +300,9 @@ if ($resql)
print '<td class="liste_titre" align="right"><input class="flat" type="text" size="8" name="search_montant_ht" value="'.$search_montant_ht.'"></td>'; print '<td class="liste_titre" align="right"><input class="flat" type="text" size="8" name="search_montant_ht" value="'.$search_montant_ht.'"></td>';
print '<td class="liste_titre">&nbsp;</td>'; print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre" align="right"><input class="flat" type="text" size="8" name="search_montant_ttc" value="'.$search_montant_ttc.'"></td>'; print '<td class="liste_titre" align="right"><input class="flat" type="text" size="8" name="search_montant_ttc" value="'.$search_montant_ttc.'"></td>';
print '<td class="liste_titre" colspan="2" align="right">'; print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre" align="right">';
print '<input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">'; print '<input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
print '</td>'; print '</td>';
print '<td class="liste_titre" align="center">'; print '<td class="liste_titre" align="center">';
@ -361,8 +363,8 @@ if ($resql)
print "</td>\n"; print "</td>\n";
print '<td nowrap align="center">'.dol_print_date($db->jdate($objp->df),'day').'</td>'."\n"; print '<td class="nowrap" align="center">'.dol_print_date($db->jdate($objp->df),'day').'</td>'."\n";
print '<td nowrap align="center">'.dol_print_date($db->jdate($objp->datelimite),'day').'</td>'."\n"; print '<td class="nowrap" align="center">'.dol_print_date($db->jdate($objp->datelimite),'day').'</td>'."\n";
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,28).'</a></td>'; print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,28).'</a></td>';
@ -382,7 +384,7 @@ if ($resql)
print '</td>'; print '</td>';
// Remain to receive // Remain to receive
//print '<td align="right">'.((! empty($objp->am) || ! empty($cn))?price($objp->total_ttc-$objp->am-$cn):'&nbsp;').'</td>'; print '<td align="right">'.((! empty($objp->am) || ! empty($cn))?price($objp->total_ttc-$objp->am-$cn):'&nbsp;').'</td>';
// Status of invoice // Status of invoice
print '<td align="right" class="nowrap">'; print '<td align="right" class="nowrap">';
@ -412,7 +414,7 @@ if ($resql)
print '<td align="right"><b>'.price($total_tva).'</b></td>'; print '<td align="right"><b>'.price($total_tva).'</b></td>';
print '<td align="right"><b>'.price($total_ttc).'</b></td>'; print '<td align="right"><b>'.price($total_ttc).'</b></td>';
print '<td align="right"><b>'.price($total_paid).'</b></td>'; print '<td align="right"><b>'.price($total_paid).'</b></td>';
print '<td align="center">&nbsp;</td>'; print '<td align="right"><b>'.price($total_ttc - $total_paid).'</b></td>';
print '<td align="center">&nbsp;</td>'; print '<td align="center">&nbsp;</td>';
print "</tr>\n"; print "</tr>\n";
} }

View File

@ -288,7 +288,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
while ($i < $num && $i < 20) while ($i < $num && $i < 20)
{ {
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
print '<tr '.$bc[$var].'><td nowrap>'; print '<tr '.$bc[$var].'><td class="nowrap">';
$facturesupplierstatic->ref=$obj->ref; $facturesupplierstatic->ref=$obj->ref;
$facturesupplierstatic->id=$obj->rowid; $facturesupplierstatic->id=$obj->rowid;
$facturesupplierstatic->type=$obj->type; $facturesupplierstatic->type=$obj->type;

View File

@ -176,15 +176,15 @@ if (is_array($coll_list))
} }
} }
print "<tr ".$bc[$var].">"; print "<tr ".$bc[$var].">";
print "<td nowrap>".$i."</td>"; print '<td class="nowrap">'.$i."</td>";
$company_static->id=$coll->socid; $company_static->id=$coll->socid;
$company_static->nom=$coll->nom; $company_static->nom=$coll->nom;
print '<td nowrap>'.$company_static->getNomUrl(1).'</td>'; print '<td class="nowrap">'.$company_static->getNomUrl(1).'</td>';
$find = array(' ','.'); $find = array(' ','.');
$replace = array('',''); $replace = array('','');
print "<td nowrap>".$intra."</td>"; print '<td class="nowrap">'.$intra."</td>";
print "<td nowrap align=\"right\">".price($coll->amount)."</td>"; print "<td class=\"nowrap\" align=\"right\">".price($coll->amount)."</td>";
print "<td nowrap align=\"right\">".price($coll->localtax2)."</td>"; print "<td class=\"nowrap\" align=\"right\">".price($coll->localtax2)."</td>";
$totalamount = $totalamount + $coll->amount; $totalamount = $totalamount + $coll->amount;
$total = $total + $coll->localtax2; $total = $total + $coll->localtax2;
print "</tr>\n"; print "</tr>\n";
@ -194,8 +194,8 @@ if (is_array($coll_list))
$x_coll_sum = $total; $x_coll_sum = $total;
print '<tr class="liste_total"><td align="right" colspan="3">'.$langs->trans("Total").':</td>'; print '<tr class="liste_total"><td align="right" colspan="3">'.$langs->trans("Total").':</td>';
print '<td nowrap align="right">'.price($totalamount).'</td>'; print '<td class="nowrap" align="right">'.price($totalamount).'</td>';
print '<td nowrap align="right">'.price($total).'</td>'; print '<td class="nowrap" align="right">'.price($total).'</td>';
print '</tr>'; print '</tr>';
} }
else else
@ -245,15 +245,15 @@ if (is_array($coll_list))
} }
} }
print "<tr ".$bc[$var].">"; print "<tr ".$bc[$var].">";
print "<td nowrap>".$i."</td>"; print '<td class="nowrap">'.$i."</td>";
$company_static->id=$coll->socid; $company_static->id=$coll->socid;
$company_static->nom=$coll->nom; $company_static->nom=$coll->nom;
print '<td nowrap>'.$company_static->getNomUrl(1).'</td>'; print '<td class="nowrap">'.$company_static->getNomUrl(1).'</td>';
$find = array(' ','.'); $find = array(' ','.');
$replace = array('',''); $replace = array('','');
print "<td nowrap>".$intra."</td>"; print '<td class="nowrap">'.$intra."</td>";
print "<td nowrap align=\"right\">".price($coll->amount)."</td>"; print "<td class=\"nowrap\" align=\"right\">".price($coll->amount)."</td>";
print "<td nowrap align=\"right\">".price($coll->localtax2)."</td>"; print "<td class=\"nowrap\" align=\"right\">".price($coll->localtax2)."</td>";
$totalamount = $totalamount + $coll->amount; $totalamount = $totalamount + $coll->amount;
$total = $total + $coll->localtax2; $total = $total + $coll->localtax2;
print "</tr>\n"; print "</tr>\n";
@ -263,8 +263,8 @@ if (is_array($coll_list))
$x_paye_sum = $total; $x_paye_sum = $total;
print '<tr class="liste_total"><td align="right" colspan="3">'.$langs->trans("Total").':</td>'; print '<tr class="liste_total"><td align="right" colspan="3">'.$langs->trans("Total").':</td>';
print '<td nowrap align="right">'.price($totalamount).'</td>'; print '<td class="nowrap" align="right">'.price($totalamount).'</td>';
print '<td nowrap align="right">'.price($total).'</td>'; print '<td class="nowrap" align="right">'.price($total).'</td>';
print '</tr>'; print '</tr>';
print '</table>'; print '</table>';

View File

@ -149,7 +149,7 @@ for ($m = 1 ; $m < 13 ; $m++ )
$var=!$var; $var=!$var;
print "<tr ".$bc[$var].">"; print "<tr ".$bc[$var].">";
print '<td nowrap>'.dol_print_date(dol_mktime(0,0,0,$m,1,$y),"%b %Y").'</td>'; print '<td class="nowrap">'.dol_print_date(dol_mktime(0,0,0,$m,1,$y),"%b %Y").'</td>';
$x_coll = 0; $x_coll = 0;
foreach($coll_listsell as $vatrate=>$val) foreach($coll_listsell as $vatrate=>$val)
@ -157,7 +157,7 @@ for ($m = 1 ; $m < 13 ; $m++ )
$x_coll+=$val['localtax2']; $x_coll+=$val['localtax2'];
} }
$subtotalcoll = $subtotalcoll + $x_coll; $subtotalcoll = $subtotalcoll + $x_coll;
print "<td nowrap align=\"right\">".price($x_coll)."</td>"; print "<td class=\"nowrap\" align=\"right\">".price($x_coll)."</td>";
$x_paye = 0; $x_paye = 0;
foreach($coll_listbuy as $vatrate=>$val) foreach($coll_listbuy as $vatrate=>$val)
@ -165,13 +165,13 @@ for ($m = 1 ; $m < 13 ; $m++ )
$x_paye+=$val['localtax2']; $x_paye+=$val['localtax2'];
} }
$subtotalpaye = $subtotalpaye + $x_paye; $subtotalpaye = $subtotalpaye + $x_paye;
print "<td nowrap align=\"right\">".price($x_paye)."</td>"; print "<td class=\"nowrap\" align=\"right\">".price($x_paye)."</td>";
$diff = $x_coll - $x_paye; $diff = $x_coll - $x_paye;
$total = $total + $diff; $total = $total + $diff;
$subtotal = $subtotal + $diff; $subtotal = $subtotal + $diff;
print "<td nowrap align=\"right\">".price($diff)."</td>\n"; print "<td class=\"nowrap\" align=\"right\">".price($diff)."</td>\n";
print "<td>&nbsp;</td>\n"; print "<td>&nbsp;</td>\n";
print "</tr>\n"; print "</tr>\n";

View File

@ -56,9 +56,9 @@ if ($result)
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td nowrap align="left">'.$langs->trans("Ref").'</td>'; print '<td class="nowrap" align="left">'.$langs->trans("Ref").'</td>';
print "<td>".$langs->trans("Label")."</td>"; print "<td>".$langs->trans("Label")."</td>";
print '<td nowrap align="left">'.$langs->trans("DatePayment").'</td>'; print '<td class="nowrap" align="left">'.$langs->trans("DatePayment").'</td>';
print "<td align=\"right\">".$langs->trans("PayedByThisPayment")."</td>"; print "<td align=\"right\">".$langs->trans("PayedByThisPayment")."</td>";
print "</tr>\n"; print "</tr>\n";
$var=1; $var=1;

View File

@ -21,13 +21,13 @@
/** /**
* \file htdocs/compta/paiement/cheque/class/remisecheque.class.php * \file htdocs/compta/paiement/cheque/class/remisecheque.class.php
* \ingroup compta * \ingroup compta
* \brief Fichier de la classe des bordereau de remise de cheque * \brief File with class to manage cheque delivery receipts
*/ */
require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php';
/** /**
* Classe permettant la gestion des remises de cheque * Class to manage cheque delivery receipts
*/ */
class RemiseCheque extends CommonObject class RemiseCheque extends CommonObject
{ {
@ -580,25 +580,25 @@ class RemiseCheque extends CommonObject
if ( $resql ) if ( $resql )
{ {
while ( $row = $this->db->fetch_row($resql) ) while ( $row = $this->db->fetch_row($resql) )
{ {
$total += $row[0]; $total += $row[0];
$nb++; $nb++;
} }
$this->db->free($resql); $this->db->free($resql);
$sql = "UPDATE ".MAIN_DB_PREFIX."bordereau_cheque"; $sql = "UPDATE ".MAIN_DB_PREFIX."bordereau_cheque";
$sql.= " SET amount = '".price2num($total)."'"; $sql.= " SET amount = '".price2num($total)."'";
$sql.= ", nbcheque = ".$nb; $sql.= ", nbcheque = ".$nb;
$sql.= " WHERE rowid = ".$this->id; $sql.= " WHERE rowid = ".$this->id;
$sql.= " AND entity = ".$conf->entity; $sql.= " AND entity = ".$conf->entity;
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if (!$resql) if (!$resql)
{ {
$this->errno = -1030; $this->errno = -1030;
dol_syslog("RemiseCheque::updateAmount ERREUR UPDATE ($this->errno)"); dol_syslog("RemiseCheque::updateAmount ERREUR UPDATE ($this->errno)");
} }
} }
else else
{ {
@ -725,41 +725,6 @@ class RemiseCheque extends CommonObject
} }
} }
/**
* Set the external ref
*
* @param User $user Object user
* @param timestamp $ref_rext External ref
* @return int <0 if KO, >0 if OK
*/
function set_ref_ext($user, $ref_ext)
{
if ($user->rights->banque->cheque)
{
$sql = "UPDATE ".MAIN_DB_PREFIX."bordereau_cheque";
$sql.= " SET ref_ext = '".$ref_ext."'";
$sql.= " WHERE rowid = ".$this->id;
dol_syslog("RemiseCheque::set_ref_ext sql=$sql",LOG_DEBUG);
$resql=$this->db->query($sql);
if ($resql)
{
$this->ref_ext = $ref_ext;
return 1;
}
else
{
$this->error=$this->db->error();
dol_syslog("RemiseCheque::set_ref_ext ".$this->error,LOG_ERR);
return -1;
}
}
else
{
return -2;
}
}
/** /**
* Renvoie nom clicable (avec eventuellement le picto) * Renvoie nom clicable (avec eventuellement le picto)

View File

@ -100,7 +100,7 @@ if ($action == 'setrefext' && $user->rights->banque->cheque)
{ {
$ref_ext = GETPOST('ref_ext'); $ref_ext = GETPOST('ref_ext');
$result=$object->set_ref_ext($user, $ref_ext); $result=$object->setValueFrom('ref_ext', $ref_ext);
if ($result < 0) if ($result < 0)
{ {
$mesg='<div class="error">'.$object->error.'</div>'; $mesg='<div class="error">'.$object->error.'</div>';
@ -367,8 +367,8 @@ if ($action == 'new')
$sql.= " AND ba.entity = ".$conf->entity; $sql.= " AND ba.entity = ".$conf->entity;
$sql.= " AND b.fk_bordereau = 0"; $sql.= " AND b.fk_bordereau = 0";
$sql.= " AND b.amount > 0"; $sql.= " AND b.amount > 0";
if ($filterdate) $sql.=" AND b.dateo = '".$db->idate($filterdate)."'"; if ($filterdate) $sql.=" AND b.dateo = '".$db->idate($filterdate)."'";
if ($filteraccountid) $sql.=" AND ba.rowid= '".$filteraccountid."'"; if ($filteraccountid > 0) $sql.=" AND ba.rowid= '".$filteraccountid."'";
$sql.= $db->order("b.dateo,b.rowid","ASC"); $sql.= $db->order("b.dateo,b.rowid","ASC");
$resql = $db->query($sql); $resql = $db->query($sql);
@ -651,10 +651,10 @@ else
print '<div class="tabsAction">'; print '<div class="tabsAction">';
if ($user->societe_id == 0 && count($accounts) == 1 && $action == 'new' && $user->rights->banque->cheque) /*if ($user->societe_id == 0 && count($accounts) == 1 && $action == 'new' && $user->rights->banque->cheque)
{ {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=create&amp;accountid='.$account_id.'">'.$langs->trans('NewCheckReceipt').'</a>'; print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=create&amp;accountid='.$account_id.'">'.$langs->trans('NewCheckReceipt').'</a>';
} }*/
if ($user->societe_id == 0 && ! empty($object->id) && $object->statut == 0 && $user->rights->banque->cheque) if ($user->societe_id == 0 && ! empty($object->id) && $object->statut == 0 && $user->rights->banque->cheque)
{ {

View File

@ -196,13 +196,13 @@ if ($id)
print '</td></tr>'; print '</td></tr>';
//Date //Date
print '<tr><td class="fieldrequired" class="valid">'.$langs->trans("RefusedData").'</td>'; print '<tr><td class="fieldrequired valid">'.$langs->trans("RefusedData").'</td>';
print '<td colspan="2" class="valid">'; print '<td colspan="2" class="valid">';
print $form->select_date('','','','','',"confirm_rejet"); print $form->select_date('','','','','',"confirm_rejet");
print '</td></tr>'; print '</td></tr>';
//Reason //Reason
print '<tr><td class="fieldrequired" class="valid">'.$langs->trans("RefusedReason").'</td>'; print '<tr><td class="fieldrequired valid">'.$langs->trans("RefusedReason").'</td>';
print '<td class="valid">'; print '<td class="valid">';
print $form->selectarray("motif", $rej->motifs); print $form->selectarray("motif", $rej->motifs);
print '</td></tr>'; print '</td></tr>';

View File

@ -207,16 +207,16 @@ if (is_array($coll_list))
} }
} }
print "<tr ".$bc[$var].">"; print "<tr ".$bc[$var].">";
print "<td nowrap>".$i."</td>"; print '<td class="nowrap">'.$i."</td>";
$company_static->id=$coll->socid; $company_static->id=$coll->socid;
$company_static->nom=$coll->nom; $company_static->nom=$coll->nom;
$company_static->client=1; $company_static->client=1;
print '<td nowrap>'.$company_static->getNomUrl(1,'customer').'</td>'; print '<td class="nowrap">'.$company_static->getNomUrl(1,'customer').'</td>';
$find = array(' ','.'); $find = array(' ','.');
$replace = array('',''); $replace = array('','');
print "<td nowrap>".$intra."</td>"; print '<td class="nowrap">'.$intra."</td>";
print "<td nowrap align=\"right\">".price($coll->amount)."</td>"; print "<td class=\"nowrap\" align=\"right\">".price($coll->amount)."</td>";
print "<td nowrap align=\"right\">".price($coll->tva)."</td>"; print "<td class=\"nowrap\" align=\"right\">".price($coll->tva)."</td>";
$totalamount = $totalamount + $coll->amount; $totalamount = $totalamount + $coll->amount;
$total = $total + $coll->tva; $total = $total + $coll->tva;
print "</tr>\n"; print "</tr>\n";
@ -226,8 +226,8 @@ if (is_array($coll_list))
$x_coll_sum = $total; $x_coll_sum = $total;
print '<tr class="liste_total"><td align="right" colspan="3">'.$langs->trans("Total").':</td>'; print '<tr class="liste_total"><td align="right" colspan="3">'.$langs->trans("Total").':</td>';
print '<td nowrap align="right">'.price($totalamount).'</td>'; print '<td class="nowrap" align="right">'.price($totalamount).'</td>';
print '<td nowrap align="right">'.price($total).'</td>'; print '<td class="nowrap" align="right">'.price($total).'</td>';
print '</tr>'; print '</tr>';
} }
else else
@ -285,16 +285,16 @@ if (is_array($coll_list))
} }
} }
print "<tr ".$bc[$var].">"; print "<tr ".$bc[$var].">";
print "<td nowrap>".$i."</td>"; print '<td class="nowrap">'.$i."</td>";
$company_static->id=$coll->socid; $company_static->id=$coll->socid;
$company_static->nom=$coll->nom; $company_static->nom=$coll->nom;
$company_static->fournisseur=1; $company_static->fournisseur=1;
print '<td nowrap>'.$company_static->getNomUrl(1,'supplier').'</td>'; print '<td class="nowrap">'.$company_static->getNomUrl(1,'supplier').'</td>';
$find = array(' ','.'); $find = array(' ','.');
$replace = array('',''); $replace = array('','');
print "<td nowrap>".$intra."</td>"; print '<td class="nowrap">'.$intra."</td>";
print "<td nowrap align=\"right\">".price($coll->amount)."</td>"; print "<td class=\"nowrap\" align=\"right\">".price($coll->amount)."</td>";
print "<td nowrap align=\"right\">".price($coll->tva)."</td>"; print "<td class=\"nowrap\" align=\"right\">".price($coll->tva)."</td>";
$totalamount = $totalamount + $coll->amount; $totalamount = $totalamount + $coll->amount;
$total = $total + $coll->tva; $total = $total + $coll->tva;
print "</tr>\n"; print "</tr>\n";
@ -304,8 +304,8 @@ if (is_array($coll_list))
$x_paye_sum = $total; $x_paye_sum = $total;
print '<tr class="liste_total"><td align="right" colspan="3">'.$langs->trans("Total").':</td>'; print '<tr class="liste_total"><td align="right" colspan="3">'.$langs->trans("Total").':</td>';
print '<td nowrap align="right">'.price($totalamount).'</td>'; print '<td class="nowrap" align="right">'.price($totalamount).'</td>';
print '<td nowrap align="right">'.price($total).'</td>'; print '<td class="nowrap" align="right">'.price($total).'</td>';
print '</tr>'; print '</tr>';
print '</table>'; print '</table>';

View File

@ -158,7 +158,7 @@ for ($m = 1 ; $m < 13 ; $m++ )
$var=!$var; $var=!$var;
print "<tr ".$bc[$var].">"; print "<tr ".$bc[$var].">";
print '<td nowrap><a href="quadri_detail.php?leftmenu=tax_vat&month='.$m.'&year='.$y.'">'.dol_print_date(dol_mktime(0,0,0,$m,1,$y),"%b %Y").'</a></td>'; print '<td class="nowrap"><a href="quadri_detail.php?leftmenu=tax_vat&month='.$m.'&year='.$y.'">'.dol_print_date(dol_mktime(0,0,0,$m,1,$y),"%b %Y").'</a></td>';
$x_coll = 0; $x_coll = 0;
foreach($coll_listsell as $vatrate=>$val) foreach($coll_listsell as $vatrate=>$val)
@ -166,7 +166,7 @@ for ($m = 1 ; $m < 13 ; $m++ )
$x_coll+=$val['vat']; $x_coll+=$val['vat'];
} }
$subtotalcoll = $subtotalcoll + $x_coll; $subtotalcoll = $subtotalcoll + $x_coll;
print "<td nowrap align=\"right\">".price($x_coll)."</td>"; print "<td class=\"nowrap\" align=\"right\">".price($x_coll)."</td>";
$x_paye = 0; $x_paye = 0;
foreach($coll_listbuy as $vatrate=>$val) foreach($coll_listbuy as $vatrate=>$val)
@ -174,13 +174,13 @@ for ($m = 1 ; $m < 13 ; $m++ )
$x_paye+=$val['vat']; $x_paye+=$val['vat'];
} }
$subtotalpaye = $subtotalpaye + $x_paye; $subtotalpaye = $subtotalpaye + $x_paye;
print "<td nowrap align=\"right\">".price($x_paye)."</td>"; print "<td class=\"nowrap\" align=\"right\">".price($x_paye)."</td>";
$diff = $x_coll - $x_paye; $diff = $x_coll - $x_paye;
$total = $total + $diff; $total = $total + $diff;
$subtotal = $subtotal + $diff; $subtotal = $subtotal + $diff;
print "<td nowrap align=\"right\">".price($diff)."</td>\n"; print "<td class=\"nowrap\" align=\"right\">".price($diff)."</td>\n";
print "<td>&nbsp;</td>\n"; print "<td>&nbsp;</td>\n";
print "</tr>\n"; print "</tr>\n";

View File

@ -263,11 +263,11 @@ if ($conf->global->COMPTA_MODE == "CREANCES-DETTES")
$var=!$var; $var=!$var;
print "<tr ".$bc[$var].">"; print "<tr ".$bc[$var].">";
print "<td>$rate%</td>"; print "<td>$rate%</td>";
print "<td nowrap align=\"right\">".price($both['coll']['totalht'])."</td>"; print "<td class=\"nowrap\" align=\"right\">".price($both['coll']['totalht'])."</td>";
print "<td nowrap align=\"right\">".price($both['coll']['vat'])."</td>"; print "<td class=\"nowrap\" align=\"right\">".price($both['coll']['vat'])."</td>";
print "<td align=\"right\">".$both['coll']['links']."</td>"; print "<td align=\"right\">".$both['coll']['links']."</td>";
print "<td nowrap align=\"right\">".price($both['paye']['totalht'])."</td>"; print "<td class=\"nowrap\" align=\"right\">".price($both['paye']['totalht'])."</td>";
print "<td nowrap align=\"right\">".price($both['paye']['vat'])."</td>"; print "<td class=\"nowrap\" align=\"right\">".price($both['paye']['vat'])."</td>";
print "<td align=\"right\">".$both['paye']['links']."</td>"; print "<td align=\"right\">".$both['paye']['links']."</td>";
print "<td></td>"; print "<td></td>";
print "</tr>"; print "</tr>";
@ -286,7 +286,7 @@ if ($conf->global->COMPTA_MODE == "CREANCES-DETTES")
$var=!$var; $var=!$var;
print "<tr ".$bc[$var].">"; print "<tr ".$bc[$var].">";
print '<td colspan="7"></td>'; print '<td colspan="7"></td>';
print "<td nowrap align=\"right\">".price($diff)."</td>\n"; print "<td class=\"nowrap\" align=\"right\">".price($diff)."</td>\n";
print "</tr>\n"; print "</tr>\n";
$i++; $i++;

View File

@ -342,7 +342,7 @@ else
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';
// Ref // Ref
print '<td nowrap align="left">'.$fields['link'].'</td>'; print '<td class="nowrap" align="left">'.$fields['link'].'</td>';
// Description // Description
print '<td align="left">'; print '<td align="left">';
@ -374,7 +374,7 @@ else
// Total HT // Total HT
if ($modetax == 0) if ($modetax == 0)
{ {
print '<td nowrap align="right">'; print '<td class="nowrap" align="right">';
print price($fields['totalht']); print price($fields['totalht']);
if (price2num($fields['ftotal_ttc'])) if (price2num($fields['ftotal_ttc']))
{ {
@ -390,7 +390,7 @@ else
if ($modetax == 0) if ($modetax == 0)
{ {
if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']);
print '<td nowrap align="right">'; print '<td class="nowrap" align="right">';
//print $fields['totalht']."-".$fields['payment_amount']."-".$fields['ftotal_ttc']; //print $fields['totalht']."-".$fields['payment_amount']."-".$fields['ftotal_ttc'];
if ($fields['payment_amount'] && $fields['ftotal_ttc']) if ($fields['payment_amount'] && $fields['ftotal_ttc'])
{ {
@ -409,14 +409,14 @@ else
} }
// Total collected // Total collected
print '<td nowrap align="right">'; print '<td class="nowrap" align="right">';
$temp_ht=$fields['totalht']; $temp_ht=$fields['totalht'];
if ($type == 1) $temp_ht=$fields['totalht']*$ratiopaymentinvoice; if ($type == 1) $temp_ht=$fields['totalht']*$ratiopaymentinvoice;
print price(price2num($temp_ht,'MT')); print price(price2num($temp_ht,'MT'));
print '</td>'; print '</td>';
// VAT // VAT
print '<td nowrap align="right">'; print '<td class="nowrap" align="right">';
$temp_vat=$fields['vat']; $temp_vat=$fields['vat'];
if ($type == 1) $temp_vat=$fields['vat']*$ratiopaymentinvoice; if ($type == 1) $temp_vat=$fields['vat']*$ratiopaymentinvoice;
print price(price2num($temp_vat,'MT')); print price(price2num($temp_vat,'MT'));
@ -435,11 +435,11 @@ else
print '<td align="right">'.$langs->trans("Total").':</td>'; print '<td align="right">'.$langs->trans("Total").':</td>';
if ($modetax == 0) if ($modetax == 0)
{ {
print '<td nowrap align="right">&nbsp;</td>'; print '<td class="nowrap" align="right">&nbsp;</td>';
print '<td align="right">&nbsp;</td>'; print '<td align="right">&nbsp;</td>';
} }
print '<td align="right">'.price(price2num($subtot_coll_total_ht,'MT')).'</td>'; print '<td align="right">'.price(price2num($subtot_coll_total_ht,'MT')).'</td>';
print '<td nowrap align="right">'.price(price2num($subtot_coll_vat,'MT')).'</td>'; print '<td class="nowrap" align="right">'.price(price2num($subtot_coll_vat,'MT')).'</td>';
print '</tr>'; print '</tr>';
} }
@ -450,11 +450,11 @@ else
print '<td align="right">'.$langs->trans("Total").':</td>'; print '<td align="right">'.$langs->trans("Total").':</td>';
if ($modetax == 0) if ($modetax == 0)
{ {
print '<td nowrap align="right">&nbsp;</td>'; print '<td class="nowrap" align="right">&nbsp;</td>';
print '<td align="right">&nbsp;</td>'; print '<td align="right">&nbsp;</td>';
} }
print '<td align="right">'.price(price2num(0,'MT')).'</td>'; print '<td align="right">'.price(price2num(0,'MT')).'</td>';
print '<td nowrap align="right">'.price(price2num(0,'MT')).'</td>'; print '<td class="nowrap" align="right">'.price(price2num(0,'MT')).'</td>';
print '</tr>'; print '</tr>';
} }
@ -499,7 +499,7 @@ else
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';
// Ref // Ref
print '<td nowrap align="left">'.$fields['link'].'</td>'; print '<td class="nowrap" align="left">'.$fields['link'].'</td>';
// Description // Description
print '<td align="left">'; print '<td align="left">';
@ -525,7 +525,7 @@ else
// Total HT // Total HT
if ($modetax == 0) if ($modetax == 0)
{ {
print '<td nowrap align="right">'; print '<td class="nowrap" align="right">';
print price($fields['totalht']); print price($fields['totalht']);
if (price2num($fields['ftotal_ttc'])) if (price2num($fields['ftotal_ttc']))
{ {
@ -541,7 +541,7 @@ else
if ($modetax == 0) if ($modetax == 0)
{ {
if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']);
print '<td nowrap align="right">'; print '<td class="nowrap" align="right">';
if ($fields['payment_amount'] && $fields['ftotal_ttc']) if ($fields['payment_amount'] && $fields['ftotal_ttc'])
{ {
$paymentfourn_static->id=$fields['payment_id']; $paymentfourn_static->id=$fields['payment_id'];
@ -560,14 +560,14 @@ else
} }
// VAT paid // VAT paid
print '<td nowrap align="right">'; print '<td class="nowrap" align="right">';
$temp_ht=$fields['totalht']; $temp_ht=$fields['totalht'];
if ($type == 1) $temp_ht=$fields['totalht']*$ratiopaymentinvoice; if ($type == 1) $temp_ht=$fields['totalht']*$ratiopaymentinvoice;
print price(price2num($temp_ht,'MT')); print price(price2num($temp_ht,'MT'));
print '</td>'; print '</td>';
// VAT // VAT
print '<td nowrap align="right">'; print '<td class="nowrap" align="right">';
$temp_vat=$fields['vat']; $temp_vat=$fields['vat'];
if ($type == 1) $temp_vat=$fields['vat']*$ratiopaymentinvoice; if ($type == 1) $temp_vat=$fields['vat']*$ratiopaymentinvoice;
print price(price2num($temp_vat,'MT')); print price(price2num($temp_vat,'MT'));
@ -586,11 +586,11 @@ else
print '<td align="right">'.$langs->trans("Total").':</td>'; print '<td align="right">'.$langs->trans("Total").':</td>';
if ($modetax == 0) if ($modetax == 0)
{ {
print '<td nowrap align="right">&nbsp;</td>'; print '<td class="nowrap" align="right">&nbsp;</td>';
print '<td align="right">&nbsp;</td>'; print '<td align="right">&nbsp;</td>';
} }
print '<td align="right">'.price(price2num($subtot_paye_total_ht,'MT')).'</td>'; print '<td align="right">'.price(price2num($subtot_paye_total_ht,'MT')).'</td>';
print '<td nowrap align="right">'.price(price2num($subtot_paye_vat,'MT')).'</td>'; print '<td class="nowrap" align="right">'.price(price2num($subtot_paye_vat,'MT')).'</td>';
print '</tr>'; print '</tr>';
} }
@ -601,11 +601,11 @@ else
print '<td align="right">'.$langs->trans("Total").':</td>'; print '<td align="right">'.$langs->trans("Total").':</td>';
if ($modetax == 0) if ($modetax == 0)
{ {
print '<td nowrap align="right">&nbsp;</td>'; print '<td class="nowrap" align="right">&nbsp;</td>';
print '<td align="right">&nbsp;</td>'; print '<td align="right">&nbsp;</td>';
} }
print '<td align="right">'.price(price2num(0,'MT')).'</td>'; print '<td align="right">'.price(price2num(0,'MT')).'</td>';
print '<td nowrap align="right">'.price(price2num(0,'MT')).'</td>'; print '<td class="nowrap" align="right">'.price(price2num(0,'MT')).'</td>';
print '</tr>'; print '</tr>';
} }

View File

@ -60,9 +60,9 @@ if ($result)
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td nowrap align="left">'.$langs->trans("Ref").'</td>'; print '<td class="nowrap" align="left">'.$langs->trans("Ref").'</td>';
print "<td>".$langs->trans("Label")."</td>"; print "<td>".$langs->trans("Label")."</td>";
print '<td nowrap align="left">'.$langs->trans("DatePayment").'</td>'; print '<td class="nowrap" align="left">'.$langs->trans("DatePayment").'</td>';
print "<td align=\"right\">".$langs->trans("PayedByThisPayment")."</td>"; print "<td align=\"right\">".$langs->trans("PayedByThisPayment")."</td>";
print "</tr>\n"; print "</tr>\n";
$var=1; $var=1;

View File

@ -111,7 +111,7 @@ echo $this->control->tpl['ajax_selectcountry'];
<td><?php echo $langs->trans("Email"); ?></td> <td><?php echo $langs->trans("Email"); ?></td>
<td><input name="email" type="text" size="50" maxlength="80" value="<?php echo $this->control->tpl['email']; ?>"></td> <td><input name="email" type="text" size="50" maxlength="80" value="<?php echo $this->control->tpl['email']; ?>"></td>
<?php if ($this->control->tpl['nb_emailing']) { ?> <?php if ($this->control->tpl['nb_emailing']) { ?>
<td nowrap><?php echo $langs->trans("NbOfEMailingsReceived"); ?></td> <td class="nowrap"><?php echo $langs->trans("NbOfEMailingsReceived"); ?></td>
<td><?php echo $this->control->tpl['nb_emailing']; ?></td> <td><?php echo $this->control->tpl['nb_emailing']; ?></td>
<?php } else { ?> <?php } else { ?>
<td colspan="2">&nbsp;</td> <td colspan="2">&nbsp;</td>

View File

@ -96,7 +96,7 @@ dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors']
<td><?php echo $langs->trans("EMail"); ?></td> <td><?php echo $langs->trans("EMail"); ?></td>
<td><?php echo $this->control->tpl['email']; ?></td> <td><?php echo $this->control->tpl['email']; ?></td>
<?php if ($this->control->tpl['nb_emailing']) { ?> <?php if ($this->control->tpl['nb_emailing']) { ?>
<td nowrap><?php echo $langs->trans("NbOfEMailingsReceived"); ?></td> <td class="nowrap"><?php echo $langs->trans("NbOfEMailingsReceived"); ?></td>
<td><?php echo $this->control->tpl['nb_emailing']; ?></td> <td><?php echo $this->control->tpl['nb_emailing']; ?></td>
<?php } else { ?> <?php } else { ?>
<td colspan="2">&nbsp;</td> <td colspan="2">&nbsp;</td>

View File

@ -678,7 +678,7 @@ else
if (! empty($conf->mailing->enabled)) if (! empty($conf->mailing->enabled))
{ {
$langs->load("mails"); $langs->load("mails");
print '<td nowrap>'.$langs->trans("NbOfEMailingsReceived").'</td>'; print '<td class="nowrap">'.$langs->trans("NbOfEMailingsReceived").'</td>';
print '<td>'.$object->getNbOfEMailings().'</td>'; print '<td>'.$object->getNbOfEMailings().'</td>';
} }
else else
@ -879,7 +879,7 @@ else
if (! empty($conf->mailing->enabled)) if (! empty($conf->mailing->enabled))
{ {
$langs->load("mails"); $langs->load("mails");
print '<td nowrap>'.$langs->trans("NbOfEMailingsReceived").'</td>'; print '<td class="nowrap">'.$langs->trans("NbOfEMailingsReceived").'</td>';
print '<td><a href="'.DOL_URL_ROOT.'/comm/mailing/liste.php?filteremail='.urlencode($object->email).'">'.$object->getNbOfEMailings().'</a></td>'; print '<td><a href="'.DOL_URL_ROOT.'/comm/mailing/liste.php?filteremail='.urlencode($object->email).'">'.$object->getNbOfEMailings().'</a></td>';
} }
else else

View File

@ -80,9 +80,9 @@ if (! empty($conf->contrat->enabled))
print '<table class="noborder nohover" width="100%">'; print '<table class="noborder nohover" width="100%">';
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchAContract").'</td></tr>'; print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchAContract").'</td></tr>';
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';
print '<td nowrap>'.$langs->trans("Ref").':</td><td><input type="text" class="flat" name="search_contract" size="18"></td>'; print '<td class="nowrap">'.$langs->trans("Ref").':</td><td><input type="text" class="flat" name="search_contract" size="18"></td>';
print '<td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print '<td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
print '<tr '.$bc[$var].'><td nowrap>'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td>'; print '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td>';
print '</tr>'; print '</tr>';
print "</table></form>\n"; print "</table></form>\n";
print "<br>"; print "<br>";
@ -255,7 +255,7 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire)
while ($i < $num && $i < 20) while ($i < $num && $i < 20)
{ {
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
print '<tr '.$bc[$var].'><td nowrap>'; print '<tr '.$bc[$var].'><td class="nowrap">';
$staticcontrat->ref=$obj->ref; $staticcontrat->ref=$obj->ref;
$staticcontrat->id=$obj->rowid; $staticcontrat->id=$obj->rowid;
print $staticcontrat->getNomUrl(1,''); print $staticcontrat->getNomUrl(1,'');

View File

@ -192,11 +192,11 @@ class box_graph_invoices_permonth extends ModeleBoxes
$stringtoshow.='</div>'; $stringtoshow.='</div>';
$stringtoshow.='</div>'; $stringtoshow.='</div>';
} }
$this->info_box_contents[0][0] = array('td' => 'align="center"','textnoformat'=>$stringtoshow); $this->info_box_contents[0][0] = array('td' => 'align="center" class="nohover"','textnoformat'=>$stringtoshow);
} }
else else
{ {
$this->info_box_contents[0][0] = array( 'td' => 'align="left"', $this->info_box_contents[0][0] = array( 'td' => 'align="left" class="nohover"',
'maxlength'=>500, 'maxlength'=>500,
'text' => $mesg); 'text' => $mesg);
} }

View File

@ -192,11 +192,11 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
$stringtoshow.='</div>'; $stringtoshow.='</div>';
$stringtoshow.='</div>'; $stringtoshow.='</div>';
} }
$this->info_box_contents[0][0] = array('td' => 'align="center"','textnoformat'=>$stringtoshow); $this->info_box_contents[0][0] = array('td' => 'align="center" class="nohover"','textnoformat'=>$stringtoshow);
} }
else else
{ {
$this->info_box_contents[0][0] = array( 'td' => 'align="left"', $this->info_box_contents[0][0] = array( 'td' => 'align="left" class="nohover"',
'maxlength'=>500, 'maxlength'=>500,
'text' => $mesg); 'text' => $mesg);
} }

View File

@ -192,11 +192,11 @@ class box_graph_orders_permonth extends ModeleBoxes
$stringtoshow.='</div>'; $stringtoshow.='</div>';
$stringtoshow.='</div>'; $stringtoshow.='</div>';
} }
$this->info_box_contents[0][0] = array('td' => 'align="center"','textnoformat'=>$stringtoshow); $this->info_box_contents[0][0] = array('td' => 'align="center" class="nohover"','textnoformat'=>$stringtoshow);
} }
else else
{ {
$this->info_box_contents[0][0] = array( 'td' => 'align="left"', $this->info_box_contents[0][0] = array( 'td' => 'align="left" class="nohover"',
'maxlength'=>500, 'maxlength'=>500,
'text' => $mesg); 'text' => $mesg);
} }

View File

@ -192,11 +192,11 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
$stringtoshow.='</div>'; $stringtoshow.='</div>';
$stringtoshow.='</div>'; $stringtoshow.='</div>';
} }
$this->info_box_contents[0][0] = array('td' => 'align="center"','textnoformat'=>$stringtoshow); $this->info_box_contents[0][0] = array('td' => 'align="center" class="nohover"','textnoformat'=>$stringtoshow);
} }
else else
{ {
$this->info_box_contents[0][0] = array( 'td' => 'align="left"', $this->info_box_contents[0][0] = array( 'td' => 'align="left" class="nohover"',
'maxlength'=>500, 'maxlength'=>500,
'text' => $mesg); 'text' => $mesg);
} }

View File

@ -192,11 +192,11 @@ class box_graph_propales_permonth extends ModeleBoxes
$stringtoshow.='</div>'; $stringtoshow.='</div>';
$stringtoshow.='</div>'; $stringtoshow.='</div>';
} }
$this->info_box_contents[0][0] = array('td' => 'align="center"','textnoformat'=>$stringtoshow); $this->info_box_contents[0][0] = array('td' => 'align="center" class="nohover"','textnoformat'=>$stringtoshow);
} }
else else
{ {
$this->info_box_contents[0][0] = array( 'td' => 'align="left"', $this->info_box_contents[0][0] = array( 'td' => 'align="left" class="nohover"',
'maxlength'=>500, 'maxlength'=>500,
'text' => $mesg); 'text' => $mesg);
} }

View File

@ -736,31 +736,35 @@ abstract class CommonObject
} }
/** /**
* Update a specific field from an object * Update a specific field into database
* *
* @param string $field Field to update * @param string $field Field to update
* @param mixte $value New value * @param mixte $value New value
* @param string $table To force other table element or element line * @param string $table To force other table element or element line (should not be used)
* @param int $id To force other object id * @param int $id To force other object id (should not be used)
* @param string $format Data format ('text' by default, 'date') * @param string $format Data format ('text', 'date'). 'text' is used if not defined
* @param string $id_field To force rowid field name * @param string $id_field To force rowid field name. 'rowid' is used it not defined
* @param string $user Update last update fields also if user object provided
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function setValueFrom($field, $value, $table='', $id='', $format='text', $id_field='rowid') function setValueFrom($field, $value, $table='', $id='', $format='', $id_field='', $user='')
{ {
global $conf; global $conf;
if (empty($table)) $table=$this->table_element; if (empty($table)) $table=$this->table_element;
if (empty($id)) $id=$this->id; if (empty($id)) $id=$this->id;
if (empty($format)) $format='text';
if (empty($id_field)) $id_field='rowid';
$this->db->begin(); $this->db->begin();
$sql = "UPDATE ".MAIN_DB_PREFIX.$table." SET "; $sql = "UPDATE ".MAIN_DB_PREFIX.$table." SET ";
if ($format == 'text') $sql.= $field." = '".$this->db->escape($value)."'"; if ($format == 'text') $sql.= $field." = '".$this->db->escape($value)."'";
else if ($format == 'date') $sql.= $field." = '".$this->db->idate($value)."'"; else if ($format == 'date') $sql.= $field." = '".$this->db->idate($value)."'";
if (is_object($user)) $sql.=", fk_user_modif = ".$user->id;
$sql.= " WHERE ".$id_field." = ".$id; $sql.= " WHERE ".$id_field." = ".$id;
dol_syslog(get_class($this)."::setValueFrom sql=".$sql, LOG_DEBUG); dol_syslog(get_class($this)."::".__FUNCTION__." sql=".$sql, LOG_DEBUG);
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if ($resql) if ($resql)
{ {

View File

@ -131,7 +131,8 @@ class HookManager
// Define type of hook ('output', 'returnvalue' or 'addreplace'). 'addreplace' should be type for all hooks. 'output' and 'returnvalue' are deprecated. // Define type of hook ('output', 'returnvalue' or 'addreplace'). 'addreplace' should be type for all hooks. 'output' and 'returnvalue' are deprecated.
$hooktype='output'; $hooktype='output';
if (preg_match('/^pdf_/',$method)) $hooktype='returnvalue'; // pdf_xxx except pdf_writelinedesc are returnvalue hooks. When there is 2 hooks of this type, only last one win. if (preg_match('/^pdf_/',$method)) $hooktype='returnvalue'; // pdf_xxx except pdf_writelinedesc are returnvalue hooks. When there is 2 hooks of this type, only last one win.
if (in_array($method,array('doActions','formObjectOptions','moveUploadedFile','pdf_writelinedesc','paymentsupplierinvoices','printSearchForm', 'formattachOptions', 'formBuilddocLineOptions'))) $hooktype='addreplace'; if (in_array($method,array('addStatisticLine','doActions','formObjectOptions','moveUploadedFile','pdf_writelinedesc','paymentsupplierinvoices',
'printSearchForm', 'formattachOptions', 'formBuilddocLineOptions'))) $hooktype='addreplace';
// Loop on each hook to qualify modules that declared context // Loop on each hook to qualify modules that declared context
$modulealreadyexecuted=array(); $modulealreadyexecuted=array();

View File

@ -128,7 +128,7 @@ window.onload = function()
<tr> <tr>
<td><?php echo img_picto_common('','treemenu/folder.gif','width="16" height="16"'); ?></td> <td><?php echo img_picto_common('','treemenu/folder.gif','width="16" height="16"'); ?></td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td nowrap>Create New Folder</td> <td class="nowrap">Create New Folder</td>
</tr> </tr>
</table> </table>
</button> </button>

View File

@ -86,9 +86,13 @@ function societe_prepare_head($object)
if ($user->societe_id == 0) if ($user->societe_id == 0)
{ {
// Notes // Notes
$nbNote = 0;
if(!empty($object->note_private)) $nbNote++;
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/societe/note.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/societe/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Note"); $head[$h][1] = $langs->trans("Note");
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
$head[$h][2] = 'note'; $head[$h][2] = 'note';
$h++; $h++;
@ -101,8 +105,12 @@ function societe_prepare_head($object)
} }
// Attached files // Attached files
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$upload_dir = $conf->societe->multidir_output[$object->entity] . "/" . $object->id;
$nbFiles = count(dol_dir_list($upload_dir));
$head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id;
$head[$h][1] = $langs->trans("Documents"); $head[$h][1] = $langs->trans("Documents");
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
$head[$h][2] = 'document'; $head[$h][2] = 'document';
$h++; $h++;

View File

@ -116,8 +116,14 @@ function product_prepare_head($object, $user)
// $this->tabs = array('entity:-tabname); to remove a tab // $this->tabs = array('entity:-tabname); to remove a tab
complete_head_from_modules($conf,$langs,$object,$head,$h,'product'); complete_head_from_modules($conf,$langs,$object,$head,$h,'product');
// Attachments
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
if (! empty($conf->product->enabled)) $upload_dir = $conf->product->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref);
elseif (! empty($conf->service->enabled)) $upload_dir = $conf->service->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref);
$nbFiles = count(dol_dir_list($upload_dir));
$head[$h][0] = DOL_URL_ROOT.'/product/document.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/product/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents'); $head[$h][1] = $langs->trans('Documents');
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
$head[$h][2] = 'documents'; $head[$h][2] = 'documents';
$h++; $h++;

View File

@ -22,7 +22,7 @@
__DonationRef__ __DonationRef__
<table width="100%" border="0" bgcolor="#000000" cellspacing="0" cellpadding="3"> <table width="100%" border="0" bgcolor="#000000" cellspacing="0" cellpadding="3">
<tr bgcolor="#ffffff" align="center"> <tr bgcolor="#ffffff" align="center">
<td nowrap> <td class="nowrap">
<table border="0" cellspacing="0" cellpadding="1"> <table border="0" cellspacing="0" cellpadding="1">
<tr> <tr>
<td width="40" class="nowrap">No:</td> <td width="40" class="nowrap">No:</td>
@ -45,7 +45,7 @@
<td valign="bottom"> <td valign="bottom">
<table width="100%" border="0" bgcolor="#ffffff" cellspacing="0" cellpadding="3"> <table width="100%" border="0" bgcolor="#ffffff" cellspacing="0" cellpadding="3">
<tr bgcolor="#e0e0e0" align="center"> <tr bgcolor="#e0e0e0" align="center">
<td nowrap> <td class="nowrap">
<font size="+2"> <font size="+2">
<b>__DonationRecipient__</b> <b>__DonationRecipient__</b>
</font> </font>
@ -79,7 +79,7 @@
<td valign="bottom"> <td valign="bottom">
<table width="100%" border="0" bgcolor="#ffffff" cellspacing="0" cellpadding="3"> <table width="100%" border="0" bgcolor="#ffffff" cellspacing="0" cellpadding="3">
<tr bgcolor="#e0e0e0" align="center"> <tr bgcolor="#e0e0e0" align="center">
<td nowrap> <td class="nowrap">
<font size="+2"> <font size="+2">
<b>__Donor__</b> <b>__Donor__</b>
</font> </font>

View File

@ -692,13 +692,22 @@ class pdf_crabe extends ModelePDFFactures
{ {
// Check a payment mode is defined // Check a payment mode is defined
if (empty($object->mode_reglement_code) if (empty($object->mode_reglement_code)
&& ! $conf->global->FACTURE_CHQ_NUMBER && empty($conf->global->FACTURE_CHQ_NUMBER)
&& ! $conf->global->FACTURE_RIB_NUMBER) && empty($conf->global->FACTURE_RIB_NUMBER))
{ {
$this->error = $outputlangs->transnoentities("ErrorNoPaiementModeConfigured");
}
// Avoid having any valid PDF with setup that is not complete
elseif (($object->mode_reglement_code == 'CHQ' && empty($conf->global->FACTURE_CHQ_NUMBER))
|| ($object->mode_reglement_code == 'VIR' && empty($conf->global->FACTURE_RIB_NUMBER)))
{
$outputlangs->load("errors");
$pdf->SetXY($this->marge_gauche, $posy); $pdf->SetXY($this->marge_gauche, $posy);
$pdf->SetTextColor(200,0,0); $pdf->SetTextColor(200,0,0);
$pdf->SetFont('','B', $default_font_size - 2); $pdf->SetFont('','B', $default_font_size - 2);
$pdf->MultiCell(80, 3, $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"),0,'L',0); $this->error = $outputlangs->transnoentities("ErrorPaymentModeDefinedToWithoutSetup",$object->mode_reglement_code);
$pdf->MultiCell(80, 3, $this->error,0,'L',0);
$pdf->SetTextColor(0,0,0); $pdf->SetTextColor(0,0,0);
$posy=$pdf->GetY()+1; $posy=$pdf->GetY()+1;

View File

@ -238,7 +238,7 @@ function facture_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0,
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($db); $interface=new Interfaces($db);
$result=$interface->run_triggers('BILL_BUILDDOC',$object,$user,$langs,$conf); $result=$interface->run_triggers('BILL_BUILDDOC',$object,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; } if ($result < 0) { $error++; $errors=$interface->errors; }
// Fin appel triggers // Fin appel triggers
return 1; return 1;

View File

@ -199,7 +199,7 @@ if ($id > 0 || ! empty($ref))
// Ref expedition client // Ref expedition client
print '<tr><td>'; print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td nowrap>'; print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap">';
print $langs->trans('RefCustomer').'</td><td align="left">'; print $langs->trans('RefCustomer').'</td><td align="left">';
print '</td>'; print '</td>';
print '</tr></table>'; print '</tr></table>';

View File

@ -185,7 +185,7 @@ if ($id > 0 || ! empty($ref))
// Ref commande client // Ref commande client
print '<tr><td>'; print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td nowrap>'; print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap">';
print $langs->trans('RefCustomer').'</td><td align="left">'; print $langs->trans('RefCustomer').'</td><td align="left">';
print '</td>'; print '</td>';
if ($action != 'RefCustomerOrder' && $commande->brouillon) print '<td align="right"><a href="'.$_SERVER['PHP_SELF'].'?action=RefCustomerOrder&amp;id='.$commande->id.'">'.img_edit($langs->trans('Modify')).'</a></td>'; if ($action != 'RefCustomerOrder' && $commande->brouillon) print '<td align="right"><a href="'.$_SERVER['PHP_SELF'].'?action=RefCustomerOrder&amp;id='.$commande->id.'">'.img_edit($langs->trans('Modify')).'</a></td>';

View File

@ -1226,8 +1226,8 @@ elseif (! empty($object->id))
// Conditions de reglement par defaut // Conditions de reglement par defaut
$langs->load('bills'); $langs->load('bills');
$form = new Form($db); $form = new Form($db);
print '<tr><td nowrap>'; print '<tr><td class="nowrap">';
print '<table width="100%" class="nobordernopadding"><tr><td nowrap>'; print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans('PaymentConditions'); print $langs->trans('PaymentConditions');
print '<td>'; print '<td>';
if ($action != 'editconditions') print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editconditions&amp;id='.$object->id.'">'.img_edit($langs->trans('SetConditions'),1).'</a></td>'; if ($action != 'editconditions') print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editconditions&amp;id='.$object->id.'">'.img_edit($langs->trans('SetConditions'),1).'</a></td>';
@ -1247,8 +1247,8 @@ elseif (! empty($object->id))
// Mode of payment // Mode of payment
$langs->load('bills'); $langs->load('bills');
$form = new Form($db); $form = new Form($db);
print '<tr><td nowrap>'; print '<tr><td class="nowrap">';
print '<table width="100%" class="nobordernopadding"><tr><td nowrap>'; print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans('PaymentMode'); print $langs->trans('PaymentMode');
print '</td>'; print '</td>';
if ($action != 'editmode') print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmode&amp;id='.$object->id.'">'.img_edit($langs->trans('SetMode'),1).'</a></td>'; if ($action != 'editmode') print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmode&amp;id='.$object->id.'">'.img_edit($langs->trans('SetMode'),1).'</a></td>';

View File

@ -64,7 +64,7 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchOrder").'</td></tr>'; print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchOrder").'</td></tr>';
print '<tr '.$bc[$var].'><td>'; print '<tr '.$bc[$var].'><td>';
print $langs->trans("Ref").':</td><td><input type="text" class="flat" name="search_ref" size=18></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print $langs->trans("Ref").':</td><td><input type="text" class="flat" name="search_ref" size=18></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
print '<tr '.$bc[$var].'><td nowrap>'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="search_all" size="18"></td>'; print '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="search_all" size="18"></td>';
print '</tr>'; print '</tr>';
print "</form></table><br>\n"; print "</form></table><br>\n";

View File

@ -237,16 +237,16 @@ if ($user->rights->fournisseur->facture->lire)
print "<tr ".$bc[$var].">"; print "<tr ".$bc[$var].">";
$classname = "impayee"; $classname = "impayee";
print '<td nowrap>'; print '<td class="nowrap">';
$facturestatic->id=$objp->facid; $facturestatic->id=$objp->facid;
$facturestatic->ref=$objp->ref; $facturestatic->ref=$objp->ref;
print $facturestatic->getNomUrl(1); print $facturestatic->getNomUrl(1);
print "</td>\n"; print "</td>\n";
print "<td nowrap>".dol_trunc($objp->ref_supplier,12)."</td>\n"; print '<td class="nowrap">'.dol_trunc($objp->ref_supplier,12)."</td>\n";
print "<td nowrap align=\"center\">".dol_print_date($db->jdate($objp->df),'day')."</td>\n"; print '<td class="nowrap" align="center">'.dol_print_date($db->jdate($objp->df),'day')."</td>\n";
print "<td nowrap align=\"center\">".dol_print_date($db->jdate($objp->datelimite),'day'); print '<td class="nowrap" align="center">'.dol_print_date($db->jdate($objp->datelimite),'day');
if ($objp->datelimite && $db->jdate($objp->datelimite) < ($now - $conf->facture->fournisseur->warning_delay) && ! $objp->paye && $objp->fk_statut == 1) print img_warning($langs->trans("Late")); if ($objp->datelimite && $db->jdate($objp->datelimite) < ($now - $conf->facture->fournisseur->warning_delay) && ! $objp->paye && $objp->fk_statut == 1) print img_warning($langs->trans("Late"));
print "</td>\n"; print "</td>\n";

View File

@ -190,7 +190,7 @@ if ($object->fetch($id))
} }
// TVA Intra // TVA Intra
print '<tr><td nowrap>'.$langs->trans('VATIntra').'</td><td colspan="3">'; print '<tr><td class="nowrap">'.$langs->trans('VATIntra').'</td><td colspan="3">';
print $object->tva_intra; print $object->tva_intra;
print '</td></tr>'; print '</td></tr>';

View File

@ -109,7 +109,7 @@ $langs->load("orders");
$langs->load("contracts"); $langs->load("contracts");
//print memory_get_usage(); //print memory_get_usage();
if ($user->societe_id == 0) if (empty($user->societe_id))
{ {
print '<br>'; print '<br>';
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
@ -117,132 +117,146 @@ if ($user->societe_id == 0)
print '<th class="liste_titre" colspan="2">'.$langs->trans("DolibarrStateBoard").'</th>'; print '<th class="liste_titre" colspan="2">'.$langs->trans("DolibarrStateBoard").'</th>';
print '<th class="liste_titre" align="right">&nbsp;</th>'; print '<th class="liste_titre" align="right">&nbsp;</th>';
print '</tr>'; print '</tr>';
print '<tr class="impair"><td colspan="3" class="impair nohover">';
$var=true; $var=true;
// Condition to be checked for each display line dashboard
$conditions=array(
! empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS),
! empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS),
! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS),
! empty($conf->adherent->enabled) && $user->rights->adherent->lire,
! empty($conf->product->enabled) && $user->rights->produit->lire,
! empty($conf->service->enabled) && $user->rights->service->lire,
! empty($conf->propal->enabled) && $user->rights->propale->lire,
! empty($conf->commande->enabled) && $user->rights->commande->lire,
! empty($conf->facture->enabled) && $user->rights->facture->lire,
! empty($conf->contrat->enabled) && $user->rights->contrat->activer);
// Class file containing the method load_state_board for each line
$includes=array(DOL_DOCUMENT_ROOT."/societe/class/client.class.php",
DOL_DOCUMENT_ROOT."/comm/prospect/class/prospect.class.php",
DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.class.php",
DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php",
DOL_DOCUMENT_ROOT."/product/class/product.class.php",
DOL_DOCUMENT_ROOT."/product/class/service.class.php",
DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php",
DOL_DOCUMENT_ROOT."/commande/class/commande.class.php",
DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php",
DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php");
// Name class containing the method load_state_board for each line
$classes=array('Client',
'Prospect',
'Fournisseur',
'Adherent',
'Product',
'Service',
'Propal',
'Commande',
'Facture',
'Contrat');
// Cle array returned by the method load_state_board for each line
$keys=array('customers',
'prospects',
'suppliers',
'members',
'products',
'services',
'proposals',
'orders',
'invoices',
'Contracts');
// Dashboard Icon lines
$icons=array('company',
'company',
'company',
'user',
'product',
'service',
'propal',
'order',
'bill',
'order');
// Translation keyword
$titres=array("ThirdPartyCustomersStats",
"ThirdPartyProspectsStats",
"Suppliers",
"Members",
"Products",
"Services",
"CommercialProposals",
"CustomersOrders",
"BillsCustomers",
"Contracts");
// Dashboard Link lines
$links=array(DOL_URL_ROOT.'/comm/list.php',
DOL_URL_ROOT.'/comm/prospect/list.php',
DOL_URL_ROOT.'/fourn/liste.php',
DOL_URL_ROOT.'/adherents/liste.php?statut=1&mainmenu=members',
DOL_URL_ROOT.'/product/liste.php?type=0&mainmenu=products',
DOL_URL_ROOT.'/product/liste.php?type=1&mainmenu=products',
DOL_URL_ROOT.'/comm/propal/list.php?mainmenu=commercial',
DOL_URL_ROOT.'/commande/liste.php?mainmenu=commercial',
DOL_URL_ROOT.'/compta/facture/list.php?mainmenu=accountancy',
DOL_URL_ROOT.'/contrat/liste.php');
// Translation lang files
$langfile=array("companies",
"prospects",
"suppliers",
"members",
"products",
"produts",
"propal",
"orders",
"bills",
"contracts");
// Loop and displays each line of table
foreach ($keys as $key=>$val)
{
if ($conditions[$key])
{
$classe=$classes[$key];
// Search in cache if load_state_board is already realized
if (! isset($boardloaded[$classe]) || ! is_object($boardloaded[$classe]))
{
include_once $includes[$key]; // Loading a class cost around 1Mb
$board=new $classe($db);
$board->load_state_board($user);
$boardloaded[$classe]=$board;
}
else $board=$boardloaded[$classe];
$var=!$var;
if ($langfile[$key]) $langs->load($langfile[$key]);
$title=$langs->trans($titres[$key]);
print '<tr '.$bc[$var].'><td width="16">'.img_object($title,$icons[$key]).'</td>';
print '<td>'.$title.'</td>';
print '<td align="right"><a href="'.$links[$key].'">'.$board->nb[$val].'</a></td>';
print '</tr>';
}
}
$object=new stdClass(); $object=new stdClass();
$parameters=array(); $parameters=array();
$action=''; $action='';
$reshook=$hookmanager->executeHooks('addStatisticLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks $reshook=$hookmanager->executeHooks('addStatisticLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
if (empty($reshook))
{
// Condition to be checked for each display line dashboard
$conditions=array(
! empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS),
! empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS),
! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS),
! empty($conf->adherent->enabled) && $user->rights->adherent->lire,
! empty($conf->product->enabled) && $user->rights->produit->lire,
! empty($conf->service->enabled) && $user->rights->service->lire,
! empty($conf->propal->enabled) && $user->rights->propale->lire,
! empty($conf->commande->enabled) && $user->rights->commande->lire,
! empty($conf->facture->enabled) && $user->rights->facture->lire,
! empty($conf->contrat->enabled) && $user->rights->contrat->activer);
// Class file containing the method load_state_board for each line
$includes=array(DOL_DOCUMENT_ROOT."/societe/class/client.class.php",
DOL_DOCUMENT_ROOT."/comm/prospect/class/prospect.class.php",
DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.class.php",
DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php",
DOL_DOCUMENT_ROOT."/product/class/product.class.php",
DOL_DOCUMENT_ROOT."/product/class/service.class.php",
DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php",
DOL_DOCUMENT_ROOT."/commande/class/commande.class.php",
DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php",
DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php");
// Name class containing the method load_state_board for each line
$classes=array('Client',
'Prospect',
'Fournisseur',
'Adherent',
'Product',
'Service',
'Propal',
'Commande',
'Facture',
'Contrat');
// Cle array returned by the method load_state_board for each line
$keys=array('customers',
'prospects',
'suppliers',
'members',
'products',
'services',
'proposals',
'orders',
'invoices',
'Contracts');
// Dashboard Icon lines
$icons=array('company',
'company',
'company',
'user',
'product',
'service',
'propal',
'order',
'bill',
'order');
// Translation keyword
$titres=array("ThirdPartyCustomersStats",
"ThirdPartyProspectsStats",
"Suppliers",
"Members",
"Products",
"Services",
"CommercialProposals",
"CustomersOrders",
"BillsCustomers",
"Contracts");
// Dashboard Link lines
$links=array(DOL_URL_ROOT.'/comm/list.php',
DOL_URL_ROOT.'/comm/prospect/list.php',
DOL_URL_ROOT.'/fourn/liste.php',
DOL_URL_ROOT.'/adherents/liste.php?statut=1&mainmenu=members',
DOL_URL_ROOT.'/product/liste.php?type=0&mainmenu=products',
DOL_URL_ROOT.'/product/liste.php?type=1&mainmenu=products',
DOL_URL_ROOT.'/comm/propal/list.php?mainmenu=commercial',
DOL_URL_ROOT.'/commande/liste.php?mainmenu=commercial',
DOL_URL_ROOT.'/compta/facture/list.php?mainmenu=accountancy',
DOL_URL_ROOT.'/contrat/liste.php');
// Translation lang files
$langfile=array("companies",
"prospects",
"suppliers",
"members",
"products",
"produts",
"propal",
"orders",
"bills",
"contracts");
// Loop and displays each line of table
foreach ($keys as $key=>$val)
{
if ($conditions[$key])
{
$classe=$classes[$key];
// Search in cache if load_state_board is already realized
if (! isset($boardloaded[$classe]) || ! is_object($boardloaded[$classe]))
{
include_once $includes[$key]; // Loading a class cost around 1Mb
$board=new $classe($db);
$board->load_state_board($user);
$boardloaded[$classe]=$board;
}
else $board=$boardloaded[$classe];
$var=!$var;
if ($langfile[$key]) $langs->load($langfile[$key]);
$title=$langs->trans($titres[$key]);
/*print '<tr '.$bc[$var].'><td width="16">'.img_object($title,$icons[$key]).'</td>';
print '<td>'.$title.'</td>';
print '<td align="right"><a href="'.$links[$key].'">'.$board->nb[$val].'</a></td>';
print '</tr>';
*/
print '<div class="boxstats">';
print '<a href="'.$links[$key].'" class="nobold nounderline">';
print img_object($title,$icons[$key]).' '.$title.'<br>';
print '</a>';
print '<a href="'.$links[$key].'">';
print $board->nb[$val];
print '</div>';
print '</a>';
}
}
}
print '</td></tr>';
print '</table>'; print '</table>';
} }

View File

@ -82,7 +82,7 @@ if (! defined('DONOTLOADCONF') && file_exists($conffile))
$result=include_once $conffile; // Load conf file $result=include_once $conffile; // Load conf file
if ($result) if ($result)
{ {
if (empty($dolibarr_main_db_type)) $dolibarr_main_db_type='mysql'; // For backward compatibility if (empty($dolibarr_main_db_type)) $dolibarr_main_db_type='mysqli'; // For backward compatibility
// Clean parameters // Clean parameters
$dolibarr_main_data_root =isset($dolibarr_main_data_root)?trim($dolibarr_main_data_root):''; $dolibarr_main_data_root =isset($dolibarr_main_data_root)?trim($dolibarr_main_data_root):'';

View File

@ -276,5 +276,7 @@ INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN23', 1001, '', 0, '', 'Tunis', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN23', 1001, '', 0, '', 'Tunis', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN24', 1001, '', 0, '', 'Zaghouan', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN24', 1001, '', 0, '', 'Zaghouan', 1);
# Add ref_ext on bordereau_cheque -- Add ref_ext on bordereau_cheque
ALTER TABLE `llx_bordereau_cheque` ADD `ref_ext` VARCHAR( 255 ) NOT NULL; ALTER TABLE llx_bordereau_cheque ADD ref_ext VARCHAR(255);
ALTER TABLE llx_bordereau_cheque ADD tms timestamp;

View File

@ -24,16 +24,16 @@
create table llx_bordereau_cheque create table llx_bordereau_cheque
( (
rowid integer AUTO_INCREMENT PRIMARY KEY, rowid integer AUTO_INCREMENT PRIMARY KEY,
number varchar(16) NOT NULL, -- ref
ref_ext varchar(255), -- ref_ext
datec datetime NOT NULL, datec datetime NOT NULL,
date_bordereau date, -- A quoi sert cette date ? date_bordereau date, -- A quoi sert cette date ?
number varchar(16) NOT NULL,
entity integer DEFAULT 1 NOT NULL, -- multi company id
amount double(24,8) NOT NULL, amount double(24,8) NOT NULL,
nbcheque smallint NOT NULL, nbcheque smallint NOT NULL,
fk_bank_account integer, fk_bank_account integer,
fk_user_author integer, fk_user_author integer,
note text,
statut smallint NOT NULL DEFAULT 0, statut smallint NOT NULL DEFAULT 0,
ref_ext varchar(255) tms timestamp,
note text,
entity integer DEFAULT 1 NOT NULL -- multi company id
)ENGINE=innodb; )ENGINE=innodb;

View File

@ -180,7 +180,7 @@ if ($ok)
// Loop on each file // Loop on each file
foreach($filelist as $file) foreach($filelist as $file)
{ {
print '<tr><td nowrap>'; print '<tr><td class="nowrap">';
print $langs->trans("Script").'</td><td align="right">'.$file.'</td></tr>'; print $langs->trans("Script").'</td><td align="right">'.$file.'</td></tr>';
$name = substr($file, 0, dol_strlen($file) - 4); $name = substr($file, 0, dol_strlen($file) - 4);

View File

@ -369,7 +369,7 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action')))
foreach($filelist as $file) foreach($filelist as $file)
{ {
print '<tr><td colspan="2"><hr></td></tr>'; print '<tr><td colspan="2"><hr></td></tr>';
print '<tr><td nowrap>'.$langs->trans("ChoosedMigrateScript").'</td><td align="right">'.$file.'</td></tr>'."\n"; print '<tr><td class="nowrap">'.$langs->trans("ChoosedMigrateScript").'</td><td align="right">'.$file.'</td></tr>'."\n";
// Run sql script // Run sql script
$ok=run_sql($dir.$file, 0, '', 1); $ok=run_sql($dir.$file, 0, '', 1);
@ -399,7 +399,7 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action')))
foreach ($modulesfile as $modulefilelong => $modulefileshort) foreach ($modulesfile as $modulefilelong => $modulefileshort)
{ {
print '<tr><td colspan="2"><hr></td></tr>'; print '<tr><td colspan="2"><hr></td></tr>';
print '<tr><td nowrap>'.$langs->trans("ChoosedMigrateScript").' (external modules)</td><td align="right">'.$modulefileshort.'</td></tr>'."\n"; print '<tr><td class="nowrap">'.$langs->trans("ChoosedMigrateScript").' (external modules)</td><td align="right">'.$modulefileshort.'</td></tr>'."\n";
// Run sql script // Run sql script
$okmodule=run_sql($modulefilelong, 0, '', 1); // Note: Result of migration of external module should not decide if we continue migration of Dolibarr or not. $okmodule=run_sql($modulefilelong, 0, '', 1); // Note: Result of migration of external module should not decide if we continue migration of Dolibarr or not.

View File

@ -124,6 +124,7 @@ ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit
ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check Mysql server is running (in most cases, you can launch it from command line with 'sudo /etc/init.d/mysql start'). ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check Mysql server is running (in most cases, you can launch it from command line with 'sudo /etc/init.d/mysql start').
ErrorFailedToAddContact=Failed to add contact ErrorFailedToAddContact=Failed to add contact
ErrorDateMustBeBeforeToday=The date can not be greater than today ErrorDateMustBeBeforeToday=The date can not be greater than today
ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode.
# Warnings # Warnings
WarningMandatorySetupNotComplete=Mandatory setup parameters are not yet defined WarningMandatorySetupNotComplete=Mandatory setup parameters are not yet defined

View File

@ -125,6 +125,7 @@ ErrorFailedToValidatePasswordReset=Echec de la réinitialisation du mot de passe
ErrorToConnectToMysqlCheckInstance=Echec de la connection au serveur de base de donnée. Vérifier que Mysql est bien lancé (dans la plupart des cas, vous pouvez le lancer depuis la ligne de commande par la commande 'sudo /etc/init.d/mysql start'). ErrorToConnectToMysqlCheckInstance=Echec de la connection au serveur de base de donnée. Vérifier que Mysql est bien lancé (dans la plupart des cas, vous pouvez le lancer depuis la ligne de commande par la commande 'sudo /etc/init.d/mysql start').
ErrorFailedToAddContact=Echec à l'ajout du contact ErrorFailedToAddContact=Echec à l'ajout du contact
ErrorDateMustBeBeforeToday=La date ne peut pas être supérieure à aujourd'hui ErrorDateMustBeBeforeToday=La date ne peut pas être supérieure à aujourd'hui
ErrorPaymentModeDefinedToWithoutSetup=Un mode de paiement a été défini de type %s mais la configuration du module Facture n'a pas été complété pour définir les informations afficher pour ce mode de paiment.
# Warnings # Warnings
WarningMandatorySetupNotComplete=Les informations de configuration obligatoire doivent être renseignées WarningMandatorySetupNotComplete=Les informations de configuration obligatoire doivent être renseignées

View File

@ -1070,8 +1070,8 @@ else
if ($showbarcode) if ($showbarcode)
{ {
// Barcode type // Barcode type
print '<tr><td nowrap>'; print '<tr><td class="nowrap">';
print '<table width="100%" class="nobordernopadding"><tr><td nowrap>'; print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans("BarcodeType"); print $langs->trans("BarcodeType");
print '<td>'; print '<td>';
if (($action != 'editbarcodetype') && $user->rights->barcode->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbarcodetype&amp;id='.$object->id.'">'.img_edit($langs->trans('Edit'),1).'</a></td>'; if (($action != 'editbarcodetype') && $user->rights->barcode->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbarcodetype&amp;id='.$object->id.'">'.img_edit($langs->trans('Edit'),1).'</a></td>';
@ -1091,8 +1091,8 @@ else
print '</td></tr>'."\n"; print '</td></tr>'."\n";
// Barcode value // Barcode value
print '<tr><td nowrap>'; print '<tr><td class="nowrap">';
print '<table width="100%" class="nobordernopadding"><tr><td nowrap>'; print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans("BarcodeValue"); print $langs->trans("BarcodeValue");
print '<td>'; print '<td>';
if (($action != 'editbarcode') && $user->rights->barcode->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbarcode&amp;id='.$object->id.'">'.img_edit($langs->trans('Edit'),1).'</a></td>'; if (($action != 'editbarcode') && $user->rights->barcode->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbarcode&amp;id='.$object->id.'">'.img_edit($langs->trans('Edit'),1).'</a></td>';

View File

@ -444,7 +444,7 @@ foreach ($dirmodels as $reldir)
print '</td>'; print '</td>';
// Show example of numbering module // Show example of numbering module
print '<td nowrap="nowrap">'; print '<td class="nowrap"="nowrap">';
$tmp=$module->getExample(); $tmp=$module->getExample();
if (preg_match('/^Error/',$tmp)) print '<div class="error">'.$langs->trans($tmp).'</div>'; if (preg_match('/^Error/',$tmp)) print '<div class="error">'.$langs->trans($tmp).'</div>';
elseif ($tmp=='NotConfigured') print $langs->trans($tmp); elseif ($tmp=='NotConfigured') print $langs->trans($tmp);

View File

@ -333,7 +333,12 @@ th .button {
.nowrap { .nowrap {
white-space: <?php print ($dol_optimize_smallscreen?'normal':'nowrap'); ?>; white-space: <?php print ($dol_optimize_smallscreen?'normal':'nowrap'); ?>;
} }
.nobold {
font-weight: normal !important;
}
.nounderline {
text-decoration: none;
}
.blockvmenubookmarks .menu_contenu { .blockvmenubookmarks .menu_contenu {
background-color: transparent; background-color: transparent;
@ -1298,6 +1303,19 @@ tr.impair table.nobordernopadding td, tr.pair table.nobordernopadding td { paddi
* Boxes * Boxes
*/ */
.boxstats {
<?php print "float: ".$left.";\n"; ?>
margin: 4px;
padding: 4px;
/*-moz-box-shadow: 4px 4px 4px #DDD;
-webkit-box-shadow: 4px 4px 4px #DDD;
box-shadow: 4px 4px 4px #DDD;
margin-bottom: 8px !important;*/
border: 1px solid #AAA;
text-align: center;
border-radius: 5px;
}
.boxtable { .boxtable {
-moz-box-shadow:2px 4px 2px #cccccc; -moz-box-shadow:2px 4px 2px #cccccc;
-webkit-box-shadow:2px 4px 2px #cccccc; -webkit-box-shadow:2px 4px 2px #cccccc;

View File

@ -219,6 +219,12 @@ div.inline-block
.nowrap { .nowrap {
white-space: <?php print ($dol_optimize_smallscreen?'normal':'nowrap'); ?>; white-space: <?php print ($dol_optimize_smallscreen?'normal':'nowrap'); ?>;
} }
.nobold {
font-weight: normal !important;
}
.nounderline {
text-decoration: none;
}
/* ============================================================================== */ /* ============================================================================== */
@ -1432,6 +1438,19 @@ div.tabBar .noborder {
* Boxes * Boxes
*/ */
.boxstats {
<?php print "float: ".$left.";\n"; ?>
margin: 4px;
padding: 4px;
/*-moz-box-shadow: 4px 4px 4px #DDD;
-webkit-box-shadow: 4px 4px 4px #DDD;
box-shadow: 4px 4px 4px #DDD;
margin-bottom: 8px !important;*/
border: 1px solid #AAA;
text-align: center;
border-radius: 5px;
}
.boxtable { .boxtable {
-moz-box-shadow: 4px 4px 4px #CCC; -moz-box-shadow: 4px 4px 4px #CCC;
-webkit-box-shadow: 4px 4px 4px #CCC; -webkit-box-shadow: 4px 4px 4px #CCC;

View File

@ -246,9 +246,13 @@ div.inline-block
.nowrap { .nowrap {
white-space: <?php print ($dol_optimize_smallscreen?'normal':'nowrap'); ?>; white-space: <?php print ($dol_optimize_smallscreen?'normal':'nowrap'); ?>;
} }
/*.dolibarrcombobox { .nobold {
height: 22px; font-weight: normal !important;
}*/ }
.nounderline {
text-decoration: none;
}
/* ============================================================================== */ /* ============================================================================== */
/* Styles to hide objects */ /* Styles to hide objects */
@ -1570,6 +1574,19 @@ tr.pair td.nohover {
* Boxes * Boxes
*/ */
.boxstats {
<?php print "float: ".$left.";\n"; ?>
margin: 4px;
padding: 4px;
/*-moz-box-shadow: 4px 4px 4px #DDD;
-webkit-box-shadow: 4px 4px 4px #DDD;
box-shadow: 4px 4px 4px #DDD;
margin-bottom: 8px !important;*/
border: 1px solid #AAA;
text-align: center;
border-radius: 5px;
}
.box { .box {
padding-right: 0px; padding-right: 0px;
padding-left: 0px; padding-left: 0px;

View File

@ -224,6 +224,12 @@ div.inline-block
.nowrap { .nowrap {
white-space: <?php print ($dol_optimize_smallscreen?'normal':'nowrap'); ?>; white-space: <?php print ($dol_optimize_smallscreen?'normal':'nowrap'); ?>;
} }
.nobold {
font-weight: normal !important;
}
.nounderline {
text-decoration: none;
}
/* ============================================================================== */ /* ============================================================================== */
@ -1532,6 +1538,10 @@ background: #c0c4c7;
border: 0px; border: 0px;
} }
tr.impair td.nohover, form.impair div.nohover {
background: #eaeaea;
}
.pair { .pair {
background: #FFFFFF; background: #FFFFFF;
font-family: <?php print $fontlist ?>; font-family: <?php print $fontlist ?>;
@ -1543,6 +1553,10 @@ background: #c0c4c7;
border: 0px; border: 0px;
} }
tr.pair td.nohover {
background: #FFFFFF;
}
.pair td, .impair td { .pair td, .impair td {
padding: 2px; padding: 2px;
} }
@ -1558,6 +1572,19 @@ border: 0px;
* Boxes * Boxes
*/ */
.boxstats {
<?php print "float: ".$left.";\n"; ?>
margin: 4px;
padding: 4px;
/*-moz-box-shadow: 4px 4px 4px #DDD;
-webkit-box-shadow: 4px 4px 4px #DDD;
box-shadow: 4px 4px 4px #DDD;
margin-bottom: 8px !important;*/
border: 1px solid #AAA;
text-align: center;
border-radius: 5px;
}
.box { .box {
padding-right: 0px; padding-right: 0px;
padding-left: 0px; padding-left: 0px;
@ -1591,6 +1618,10 @@ background: #c0c4c7;
border: 0px; border: 0px;
} }
tr.box_impair .nohover {
background: #eaeaea;
}
tr.box_pair { tr.box_pair {
/* background: #d0d4d7; */ /* background: #d0d4d7; */
background: #f4f4f4; background: #f4f4f4;

View File

@ -381,6 +381,12 @@ th .button {
.nowrap { .nowrap {
white-space: <?php print ($dol_optimize_smallscreen?'normal':'nowrap'); ?>; white-space: <?php print ($dol_optimize_smallscreen?'normal':'nowrap'); ?>;
} }
.nobold {
font-weight: normal !important;
}
.nounderline {
text-decoration: none;
}
/* ============================================================================== */ /* ============================================================================== */
@ -1818,6 +1824,19 @@ div.tabBar .noborder {
* Boxes * Boxes
*/ */
.boxstats {
<?php print "float: ".$left.";\n"; ?>
margin: 3px;
padding: 3px;
/*-moz-box-shadow: 4px 4px 4px #DDD;
-webkit-box-shadow: 4px 4px 4px #DDD;
box-shadow: 4px 4px 4px #DDD;
margin-bottom: 8px !important;*/
border: 1px solid #AAA;
text-align: center;
border-radius: 5px;
}
.boxtable { .boxtable {
-moz-box-shadow: 4px 4px 4px #DDD; -moz-box-shadow: 4px 4px 4px #DDD;
-webkit-box-shadow: 4px 4px 4px #DDD; -webkit-box-shadow: 4px 4px 4px #DDD;

View File

@ -69,7 +69,7 @@ print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchAUser").'</td></tr>'; print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchAUser").'</td></tr>';
print '<tr '.$bc[$var].'><td>'; print '<tr '.$bc[$var].'><td>';
print $langs->trans("Ref").':</td><td><input class="flat" type="text" name="search_user" size="18"></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print $langs->trans("Ref").':</td><td><input class="flat" type="text" name="search_user" size="18"></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
print '<tr '.$bc[$var].'><td nowrap>'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td></tr>'; print '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td></tr>';
print "</table><br>\n"; print "</table><br>\n";
print '</form>'; print '</form>';
@ -83,7 +83,7 @@ if ($canreadperms)
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchAGroup").'</td></tr>'; print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchAGroup").'</td></tr>';
print '<tr '.$bc[$var].'><td>'; print '<tr '.$bc[$var].'><td>';
print $langs->trans("Ref").':</td><td><input class="flat" type="text" name="search_group" size="18"></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print $langs->trans("Ref").':</td><td><input class="flat" type="text" name="search_group" size="18"></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
print '<tr '.$bc[$var].'><td nowrap>'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td></tr>'; print '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td></tr>';
print "</table><br>\n"; print "</table><br>\n";
print '</form>'; print '</form>';
} }