diff --git a/ChangeLog b/ChangeLog index b1a64f1c296..7d3297cad89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ English Dolibarr ChangeLog For users: - New: [ task #862 ] Add ODT on shipments - 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 #858 ] Holiday module: note on manual holiday assignation. - 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: Add option MAIN_GENERATE_DOCUMENT_WITH_PICTURE. - 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). -- 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: @@ -57,6 +58,7 @@ For developers: key to use a specific language file. - New: Make some changes to allow usage of several alternative $dolibarr_main_url_root variables. 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 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) or $actionclassinstance->resprints (to return string) 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 -specification: http://wiki.dolibarr.org/index.php/Hooks_system +Goal is to fix old compatibility code that does not match hook specifications: + http://wiki.dolibarr.org/index.php/Hooks_system - 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 diff --git a/build/debian/README.howto b/build/debian/README.howto index 44cfb21ab81..d98fd4648a3 100644 --- a/build/debian/README.howto +++ b/build/debian/README.howto @@ -98,17 +98,26 @@ END * Staying into git root directory, run 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 git-buildpackage -us -uc * If package .deb is ok: +git-commit (but do not use option "amend" previous commit) git-buildpackage --git-tag git push 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 +* Package will be into release when test will be moved as stable. + diff --git a/build/debian/control b/build/debian/control index 8810a7d189c..3fb705087a8 100755 --- a/build/debian/control +++ b/build/debian/control @@ -13,7 +13,7 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | libphp-adodb, libnusoap-php, libphp-pclzip, - libfpdi-php, libfpdf-tpl-php, php-fpdf + libfpdi-php, libfpdf-tpl-php, php-fpdf, libjs-jquery, libjs-jquery-ui, libjs-flot, ckeditor, ttf-dejavu-core, xdg-utils, diff --git a/htdocs/admin/livraison.php b/htdocs/admin/livraison.php index 3fd00c5727b..0235c7adc39 100644 --- a/htdocs/admin/livraison.php +++ b/htdocs/admin/livraison.php @@ -214,7 +214,7 @@ print ''; print ''; print ''; print ''; -print ''; +print ''; print ''; print ''; print ''."\n"; diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index 954ec82a9c2..5ca73fa0de3 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -261,7 +261,7 @@ print '
'.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Example").''.$langs->trans("Example").''.$langs->trans("Status").''.$langs->trans("ShortInfo").'
'; print ''; print '\n"; print '\n"; -print '\n"; +print '\n"; print ''; print ''; print ''."\n"; diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index 7b88fa1bd6f..1bd177a3015 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -550,7 +550,7 @@ else if ($id || $ref) if (! empty($conf->mailing->enabled)) { $langs->load("mails"); - print ''; + print ''; print ''; } else diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index 7ad74302655..2bb710b310f 100755 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -191,7 +191,7 @@ if ($act->id > 0) print ''; // Status - print ''; @@ -246,7 +246,7 @@ if ($act->id > 0) } // Priority - print ''; diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 59b2e6c0a80..81a635e4d9f 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -537,7 +537,7 @@ if ($action == 'create') // Realised by if ($conf->global->AGENDA_ENABLE_DONEBY) { - print ''; } @@ -570,7 +570,7 @@ if ($action == 'create') // If company is forced, we propose contacts (may be contact is also forced) if (GETPOST("contactid") > 0 || GETPOST('socid','int') > 0) { - print ''; } @@ -600,7 +600,7 @@ if ($action == 'create') } // Priority - print ''; diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 811e4a8d211..f5409681be8 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -293,7 +293,7 @@ if ($id > 0) } // TVA Intra - print ''; @@ -319,8 +319,8 @@ if ($id > 0) print ''; // Mode de reglement par defaut - print '
'.$langs->trans("Name")."'.$langs->trans("Description")."'.$langs->trans("Example")."'.$langs->trans("Example")."'.$langs->trans("Status").''.$langs->trans("ShortInfo").'
'.$langs->trans("NbOfEMailingsReceived").''.$langs->trans("NbOfEMailingsReceived").''.$object->getNbOfEMailings().'
'.$langs->trans("Status").' / '.$langs->trans("Percentage").''; + print '
'.$langs->trans("Status").' / '.$langs->trans("Percentage").''; print $act->getLibStatut(4); print '
'.$langs->trans("Priority").''; + print '
'.$langs->trans("Priority").''; print ($act->priority?$act->priority:''); print '
'.$langs->trans("ActionDoneBy").''; + print '
'.$langs->trans("ActionDoneBy").''; $form->select_users(GETPOST("doneby")?GETPOST("doneby"):(! empty($actioncomm->userdone->id) && $percent==100?$actioncomm->userdone->id:0),'doneby',1); print '
'.$langs->trans("ActionOnContact").''; + print '
'.$langs->trans("ActionOnContact").''; $form->select_contacts(GETPOST('socid','int'),GETPOST('contactid'),'contactid',1); print '
'.$langs->trans("Priority").''; + print '
'.$langs->trans("Priority").''; print ''; print '
'.$langs->trans('VATIntra').''; + print '
'.$langs->trans('VATIntra').''; print $object->tva_intra; print '
'; - print '
'; + print '
'; + print ''; @@ -338,8 +338,8 @@ if ($id > 0) print ''; // Relative discounts (Discounts-Drawbacks-Rebates) - print '
'; print $langs->trans('PaymentMode'); print ''; if (($action != 'editmode') && $user->rights->societe->creer) print 'id.'">'.img_edit($langs->trans('SetMode'),1).'
'; - print '
'; + print '
'; + print ''; // Absolute discounts (Discounts-Drawbacks-Rebates) - print '
'; print $langs->trans("CustomerRelativeDiscountShort"); print ''; if ($user->rights->societe->creer && !$user->societe_id > 0) @@ -351,9 +351,9 @@ if ($id > 0) print '
'; + print '
'; print ''; - print '
'; + print '
'; print $langs->trans("CustomerAbsoluteDiscountShort"); print ''; if ($user->rights->societe->creer && !$user->societe_id > 0) @@ -373,8 +373,8 @@ if ($id > 0) // Multiprice level if (! empty($conf->global->PRODUIT_MULTIPRICES)) { - print '
'; - print '
'; + print '
'; + print '
'; print $langs->trans("PriceLevel"); print ''; if ($user->rights->societe->creer) @@ -389,8 +389,8 @@ if ($id > 0) // Level of prospect if ($object->client == 2 || $object->client == 3) { - print '
'; - print ''; print ''; - // Company print ''; print ''; @@ -1932,7 +1932,7 @@ else // Amount HT print ''; - print ''; + print ''; print ''; // Margin Infos @@ -1945,27 +1945,27 @@ else // Amount VAT print ''; - print ''; + print ''; print ''; // Amount Local Taxes if ($mysoc->localtax1_assuj=="1") //Localtax1 { print ''; - print ''; + print ''; print ''; } if ($mysoc->localtax2_assuj=="1") //Localtax2 { print ''; - print ''; + print ''; print ''; } // Amount TTC print ''; - print ''; + print ''; print ''; // Statut @@ -2263,7 +2263,14 @@ else $formmail->withto=GETPOST("sendto")?GETPOST("sendto"):$liste; $formmail->withtocc=$liste; $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->withbody=1; $formmail->withdeliveryreceipt=1; @@ -2272,6 +2279,7 @@ else // Tableau des substitutions $formmail->substit['__PROPREF__']=$object->ref; $formmail->substit['__SIGNATURE__']=$user->signature; + $formmail->substit['__REFCLIENT__']=$object->ref_client; $formmail->substit['__PERSONALIZED__']=''; $formmail->substit['__CONTACTCIVNAME__']=''; @@ -2299,8 +2307,6 @@ else $formmail->param['models']='propal_send'; $formmail->param['id']=$object->id; $formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id; - - // Init list of files if (GETPOST("mode")=='init') { diff --git a/htdocs/comm/propal/apercu.php b/htdocs/comm/propal/apercu.php index 2fd7c86fb9a..0e14848d1e8 100644 --- a/htdocs/comm/propal/apercu.php +++ b/htdocs/comm/propal/apercu.php @@ -80,7 +80,7 @@ if ($id > 0 || ! empty($ref)) // Ref client print '
'; + print '
'; + print ''; diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index f32fa89b59b..dff264b6f25 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -98,9 +98,9 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) print '
'; print $langs->trans('ProspectLevel'); print ''; if ($action != 'editlevel' && $user->rights->societe->creer) print 'id.'">'.img_edit($langs->trans('Modify'),1).'
'; print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; print "
'.$langs->trans("SearchAProposal").'
'.$langs->trans("Ref").':'.$langs->trans("Ref").':
'.$langs->trans("Other").':
'.$langs->trans("Other").':
\n"; print "
\n"; @@ -117,9 +117,9 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire) print ''; print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; print "
'.$langs->trans("SearchAContract").'
'.$langs->trans("Ref").':'.$langs->trans("Ref").':
'.$langs->trans("Other").':
'.$langs->trans("Other").':
\n"; print "
"; diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php index 42944afabef..ac7cbdccb5d 100644 --- a/htdocs/comm/mailing/index.php +++ b/htdocs/comm/mailing/index.php @@ -55,10 +55,10 @@ print '
'; print ''; print ''; print ''; -print ''; print ''; -print ''; print "
'.$langs->trans("SearchAMailing").'
'; +print '
'; print $langs->trans("Ref").':
'; +print '
'; print $langs->trans("Other").':

\n"; diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 155e2cc0e78..56091c694b0 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1597,7 +1597,8 @@ else // Ref client print '
'; print ''; + print ''; print ''; if ($action != 'refclient' && ! empty($object->brouillon)) print ''; print '
'; - print $langs->trans('RefCustomer').''; + print $langs->trans('RefCustomer').''.img_edit($langs->transnoentitiesnoconv('RefCustomer')).''.img_edit($langs->trans('Modify')).'
'; @@ -1617,7 +1618,6 @@ else } print '
'.$langs->trans('Company').''.$soc->getNomUrl(1).'
'.$langs->trans('AmountHT').''.price($object->total_ht).''.price($object->total_ht).''.$langs->trans("Currency".$conf->currency).'
'.$langs->trans('AmountVAT').''.price($object->total_tva).''.price($object->total_tva).''.$langs->trans("Currency".$conf->currency).'
'.$langs->transcountry("AmountLT1",$mysoc->country_code).''.price($object->total_localtax1).''.price($object->total_localtax1).''.$langs->trans("Currency".$conf->currency).'
'.$langs->transcountry("AmountLT2",$mysoc->country_code).''.price($object->total_localtax2).''.price($object->total_localtax2).''.$langs->trans("Currency".$conf->currency).'
'.$langs->trans('AmountTTC').''.price($object->total_ttc).''.price($object->total_ttc).''.$langs->trans("Currency".$conf->currency).'
'; - print ' - +
'; + print ''; print '
'; print $langs->trans('RefCustomer').''; print '
'; diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index 7e94ec5a912..2d7d432a51d 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -166,7 +166,7 @@ if ($object->id > 0) // Ref client print '
'; - print ''; 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('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('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); @@ -280,6 +288,7 @@ if ($result) print ''; + print ''; print ''; @@ -293,7 +302,7 @@ if ($result) print ''; - + print ''; @@ -345,12 +354,17 @@ if ($result) print $companystatic->getNomUrl(1,'customer'); print ''; + // Town + print ''; + // Customer ref - print ''; - // Date propale + // Date proposal print '\n"; - // Date fin validite + // Date end validity if ($objp->dfv) { print ''; - print ''; } else { $var=!$var; print ''; - print ''; } - + } - + print '
'; + print ''; print '
'; print $langs->trans('RefCustomer').''; print '
'; diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index b0eca76345b..b1b91cfb89c 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -133,7 +133,7 @@ if ($object->id > 0) // Ref client print '
'; - print ''; print ''; -print ''; +print ''; print ''; print "
'; + print ''; print '
'; print $langs->trans('RefCustomer').''; print '
'; diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index 70eb2e49092..45a594c12cd 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -69,7 +69,7 @@ print ''; print '
'.$langs->trans("SearchPropal").'
'; print $langs->trans("Ref").':
'.$langs->trans("Other").':
'.$langs->trans("Other").':

\n"; diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index c3cc5fbb7cb..a911797fd49 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -54,6 +54,7 @@ $search_refcustomer=GETPOST('search_refcustomer','alpha'); $search_societe=GETPOST('search_societe','alpha'); $search_montant_ht=GETPOST('search_montant_ht','alpha'); $search_author=GETPOST('search_author','alpha'); +$search_town=GETPOST('search_town','alpha'); $sall=GETPOST("sall"); $mesg=(GETPOST("msg") ? GETPOST("msg") : GETPOST("mesg")); @@ -101,6 +102,7 @@ if (GETPOST("button_removefilter_x")) $search_societe=''; $search_montant_ht=''; $search_author=''; + $search_town=''; $year=''; $month=''; } @@ -137,7 +139,7 @@ if (! $sortfield) $sortfield='p.datep'; if (! $sortorder) $sortorder='DESC'; $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,'; if (! $user->rights->societe->client->voir && ! $socid) $sql .= " sc.fk_soc, sc.fk_user,"; $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; } +if ($search_town) //restriction +{ + $sql.= " AND s.town LIKE '%".$db->escape(trim($search_town))."%'"; +} if ($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_montant_ht) $param.='&search_montant_ht='.$search_montant_ht; 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); // Lignes des champs de filtre @@ -264,6 +271,7 @@ if ($result) print '
'; print ''; print ' '; print ''; print ''; print ''; print ''; print ''; print ''; + print $objp->town; + print ''; + print ''; print $objp->ref_client; print ''; $y = dol_print_date($db->jdate($objp->dp),'%Y'); $m = dol_print_date($db->jdate($objp->dp),'%m'); @@ -362,7 +376,7 @@ if ($result) print ' '; print $y."'.dol_print_date($db->jdate($objp->dfv),'day'); @@ -399,19 +413,19 @@ if ($result) if($num<$limit){ $var=!$var; print '
'.$langs->trans("Total HT").''.price($total).''; + print ''.price($total).''; print '
'.$langs->trans("Total HT for this page").''.price($total).''; + print ''.price($total).''; print '
'; print ''; diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index 633c0dd4cf4..a9ee5b6a839 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -96,7 +96,7 @@ if ($id > 0 || ! empty($ref)) // Ref client print '
'; - print ''; print ''; - print ''; + print ''; print ''; print "
'; + print ''; print '
'; print $langs->trans('RefCustomer').''; print '
'; diff --git a/htdocs/comm/prospect/index.php b/htdocs/comm/prospect/index.php index e6496c32a58..1f3e0fc4c0c 100644 --- a/htdocs/comm/prospect/index.php +++ b/htdocs/comm/prospect/index.php @@ -60,7 +60,7 @@ if (! empty($conf->propal->enabled)) print '
'.$langs->trans("SearchAProposal").'
'; print $langs->trans("Ref").':
'.$langs->trans("Other").':
'.$langs->trans("Other").':

\n"; } diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php index 873ef051612..ab42c2ffdaa 100755 --- a/htdocs/comm/prospect/list.php +++ b/htdocs/comm/prospect/list.php @@ -243,7 +243,7 @@ if ($resql) llxHeader('',$langs->trans("ThirdParty"),$help_url); } - $param='&stcomm='.$stcomm.'&search_nom='.urlencode($search_nom).'&search_zipcode='.urlencode($search_zipcode).'&search_ville='.urlencode($search_ville); + $param='&stcomm='.$stcomm.'&search_nom='.urlencode($search_nom).'&search_zipcode='.urlencode($search_zipcode).'&search_town='.urlencode($search_town); // Store the status filter in the URL if (isSet($search_cstc)) { diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php index b4b92e760c5..10bc0b500f4 100644 --- a/htdocs/commande/apercu.php +++ b/htdocs/commande/apercu.php @@ -90,7 +90,7 @@ if ($id > 0 || ! empty($ref)) // Ref cde client print '
'; - print '"; - print ''; + print ''; $x_coll = 0; foreach($coll_listsell as $vatrate=>$val) @@ -157,7 +157,7 @@ for ($m = 1 ; $m < 13 ; $m++ ) $x_coll+=$val['localtax2']; } $subtotalcoll = $subtotalcoll + $x_coll; - print ""; + print ""; $x_paye = 0; foreach($coll_listbuy as $vatrate=>$val) @@ -165,13 +165,13 @@ for ($m = 1 ; $m < 13 ; $m++ ) $x_paye+=$val['localtax2']; } $subtotalpaye = $subtotalpaye + $x_paye; - print ""; + print ""; $diff = $x_coll - $x_paye; $total = $total + $diff; $subtotal = $subtotal + $diff; - print "\n"; + print "\n"; print "\n"; print "\n"; diff --git a/htdocs/compta/localtax/reglement.php b/htdocs/compta/localtax/reglement.php index e750403bf2c..07d81d81df8 100644 --- a/htdocs/compta/localtax/reglement.php +++ b/htdocs/compta/localtax/reglement.php @@ -56,9 +56,9 @@ if ($result) print '
'; + print ''; print '
'; print $langs->trans('RefCustomer').''; print '
'; diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index cde8d1d4a35..055d4a42787 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -162,7 +162,7 @@ if ($id > 0 || ! empty($ref)) // Ref commande client print '
'; - print ''; print ''; -print ''; +print ''; print ''; print "
'; + print ''; print '
'; print $langs->trans('RefCustomer').''; print '
'; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 74ed72d835c..89b2fe5181e 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -2566,7 +2566,14 @@ else $formmail->withto=GETPOST('sendto')?GETPOST('sendto'):$liste; $formmail->withtocc=$liste; $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->withbody=1; $formmail->withdeliveryreceipt=1; @@ -2574,6 +2581,7 @@ else // Tableau des substitutions $formmail->substit['__ORDERREF__']=$object->ref; $formmail->substit['__SIGNATURE__']=$user->signature; + $formmail->substit['__REFCLIENT__']=$object->ref_client; $formmail->substit['__PERSONALIZED__']=''; $formmail->substit['__CONTACTCIVNAME__']=''; diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index 3c69388c8c9..2327c2063be 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -70,7 +70,7 @@ print ''; print '
'.$langs->trans("SearchOrder").'
'; print $langs->trans("Ref").':
'.$langs->trans("Other").':
'.$langs->trans("Other").':

\n"; diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index c9ca34854b7..58023beec33 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -97,7 +97,7 @@ if ($id > 0 || ! empty($ref)) // Ref commande client print '
'; - print ''; // Payment term - print ''; // Payment mode diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php index 9a3a55bfaf4..cc3f0cd548d 100644 --- a/htdocs/compta/bank/search.php +++ b/htdocs/compta/bank/search.php @@ -227,7 +227,7 @@ if ($resql) print "\n"; // Num - print '\n"; + print '\n"; // Description print "'; // Payment term - print ''; @@ -3763,7 +3763,14 @@ else if ($id > 0 || ! empty($ref)) $formmail->withto=GETPOST('sendto')?GETPOST('sendto'):$liste; $formmail->withtocc=$liste; $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->withbody=1; $formmail->withdeliveryreceipt=1; @@ -3771,6 +3778,7 @@ else if ($id > 0 || ! empty($ref)) // Tableau des substitutions $formmail->substit['__FACREF__']=$object->ref; $formmail->substit['__SIGNATURE__']=$user->signature; + $formmail->substit['__REFCLIENT__']=$object->ref_client; $formmail->substit['__PERSONALIZED__']=''; $formmail->substit['__CONTACTCIVNAME__']=''; diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index 470dfa56ba3..b334053c5b4 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -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("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("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("Merge"),$_SERVER["PHP_SELF"],"","",$param,'align="center"',$sortfield,$sortorder); print "\n"; @@ -300,7 +300,9 @@ if ($resql) print ''; print ''; print ''; - print ''; + print ''; + print ''; print '\n"; - print ''."\n"; - print ''."\n"; + print ''."\n"; + print ''."\n"; print ''; @@ -382,7 +384,7 @@ if ($resql) print ''; // Remain to receive - //print ''; + print ''; // Status of invoice print ''; print ''; print ''; - print ''; + print ''; print ''; print "\n"; } diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index f26b9a06089..6340e00c28f 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -288,7 +288,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- while ($i < $num && $i < 20) { $obj = $db->fetch_object($resql); - print '"; - print ""; + print '"; $company_static->id=$coll->socid; $company_static->nom=$coll->nom; - print ''; + print ''; $find = array(' ','.'); $replace = array('',''); - print ""; - print ""; - print ""; + print '"; + print ""; + print ""; $totalamount = $totalamount + $coll->amount; $total = $total + $coll->localtax2; print "\n"; @@ -194,8 +194,8 @@ if (is_array($coll_list)) $x_coll_sum = $total; print ''; - print ''; - print ''; + print ''; + print ''; print ''; } else @@ -245,15 +245,15 @@ if (is_array($coll_list)) } } print ""; - print ""; + print '"; $company_static->id=$coll->socid; $company_static->nom=$coll->nom; - print ''; + print ''; $find = array(' ','.'); $replace = array('',''); - print ""; - print ""; - print ""; + print '"; + print ""; + print ""; $totalamount = $totalamount + $coll->amount; $total = $total + $coll->localtax2; print "\n"; @@ -263,8 +263,8 @@ if (is_array($coll_list)) $x_paye_sum = $total; print ''; - print ''; - print ''; + print ''; + print ''; print ''; print '
'; + print ''; print '
'; print $langs->trans('RefCustomer').''; print '
'; diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index 72599d11840..16696430d40 100755 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -416,7 +416,7 @@ if ($action == 'create' && empty($mesgs)) $html->select_date(0,'','','','',"add",1,1); print '
'.$langs->trans('PaymentConditionsShort').''; + print '
'.$langs->trans('PaymentConditionsShort').''; $html->select_conditions_paiements(isset($_POST['cond_reglement_id'])?$_POST['cond_reglement_id']:$cond_reglement_id,'cond_reglement_id'); print '
'.($objp->num_chq?$objp->num_chq:"")."'.($objp->num_chq?$objp->num_chq:"").""; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index b8bc0b1ed10..33e27fdb1e9 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2253,7 +2253,7 @@ if ($action == 'create') print '
'.$langs->trans('PaymentConditionsShort').''; + print '
'.$langs->trans('PaymentConditionsShort').''; $form->select_conditions_paiements(isset($_POST['cond_reglement_id'])?$_POST['cond_reglement_id']:$cond_reglement_id,'cond_reglement_id'); print '
 '; + print '  '; print ''; print ''; @@ -361,8 +363,8 @@ if ($resql) print "'.dol_print_date($db->jdate($objp->df),'day').''.dol_print_date($db->jdate($objp->datelimite),'day').''.dol_print_date($db->jdate($objp->df),'day').''.dol_print_date($db->jdate($objp->datelimite),'day').''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,28).''.((! empty($objp->am) || ! empty($cn))?price($objp->total_ttc-$objp->am-$cn):' ').''.((! empty($objp->am) || ! empty($cn))?price($objp->total_ttc-$objp->am-$cn):' ').''; @@ -412,7 +414,7 @@ if ($resql) print ''.price($total_tva).''.price($total_ttc).''.price($total_paid).' '.price($total_ttc - $total_paid).' 
'; + print '
'; $facturesupplierstatic->ref=$obj->ref; $facturesupplierstatic->id=$obj->rowid; $facturesupplierstatic->type=$obj->type; diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php index e2eb5ab610c..72b02194bc1 100644 --- a/htdocs/compta/localtax/clients.php +++ b/htdocs/compta/localtax/clients.php @@ -176,15 +176,15 @@ if (is_array($coll_list)) } } print "
".$i."'.$i."'.$company_static->getNomUrl(1).''.$company_static->getNomUrl(1).'".$intra."".price($coll->amount)."".price($coll->localtax2)."'.$intra."".price($coll->amount)."".price($coll->localtax2)."
'.$langs->trans("Total").':'.price($totalamount).''.price($total).''.price($totalamount).''.price($total).'
".$i."'.$i."'.$company_static->getNomUrl(1).''.$company_static->getNomUrl(1).'".$intra."".price($coll->amount)."".price($coll->localtax2)."'.$intra."".price($coll->amount)."".price($coll->localtax2)."
'.$langs->trans("Total").':'.price($totalamount).''.price($total).''.price($totalamount).''.price($total).'
'; diff --git a/htdocs/compta/localtax/index.php b/htdocs/compta/localtax/index.php index 3f0cb9828d5..8acfe896fed 100644 --- a/htdocs/compta/localtax/index.php +++ b/htdocs/compta/localtax/index.php @@ -149,7 +149,7 @@ for ($m = 1 ; $m < 13 ; $m++ ) $var=!$var; print "
'.dol_print_date(dol_mktime(0,0,0,$m,1,$y),"%b %Y").''.dol_print_date(dol_mktime(0,0,0,$m,1,$y),"%b %Y").'".price($x_coll)."".price($x_coll)."".price($x_paye)."".price($x_paye)."".price($diff)."".price($diff)." 
'; print ''; - print ''; + print ''; print ""; - print ''; + print ''; print ""; print "\n"; $var=1; diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index 7ccb75793aa..aec7c54d53a 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -21,13 +21,13 @@ /** * \file htdocs/compta/paiement/cheque/class/remisecheque.class.php * \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'; /** - * Classe permettant la gestion des remises de cheque + * Class to manage cheque delivery receipts */ class RemiseCheque extends CommonObject { @@ -580,25 +580,25 @@ class RemiseCheque extends CommonObject if ( $resql ) { while ( $row = $this->db->fetch_row($resql) ) - { - $total += $row[0]; - $nb++; - } + { + $total += $row[0]; + $nb++; + } - $this->db->free($resql); + $this->db->free($resql); - $sql = "UPDATE ".MAIN_DB_PREFIX."bordereau_cheque"; - $sql.= " SET amount = '".price2num($total)."'"; - $sql.= ", nbcheque = ".$nb; - $sql.= " WHERE rowid = ".$this->id; - $sql.= " AND entity = ".$conf->entity; + $sql = "UPDATE ".MAIN_DB_PREFIX."bordereau_cheque"; + $sql.= " SET amount = '".price2num($total)."'"; + $sql.= ", nbcheque = ".$nb; + $sql.= " WHERE rowid = ".$this->id; + $sql.= " AND entity = ".$conf->entity; - $resql = $this->db->query($sql); - if (!$resql) - { - $this->errno = -1030; - dol_syslog("RemiseCheque::updateAmount ERREUR UPDATE ($this->errno)"); - } + $resql = $this->db->query($sql); + if (!$resql) + { + $this->errno = -1030; + dol_syslog("RemiseCheque::updateAmount ERREUR UPDATE ($this->errno)"); + } } else { @@ -724,41 +724,6 @@ class RemiseCheque extends CommonObject return -2; } } - - /** - * 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; - } - } /** @@ -780,7 +745,7 @@ class RemiseCheque extends CommonObject if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCheckReceipt"),'payment').$lienfin); if ($withpicto && $withpicto != 2) $result.=' '; if ($withpicto != 2) $result.=$lien.$this->ref.$lienfin; - + return $result; } diff --git a/htdocs/compta/paiement/cheque/fiche.php b/htdocs/compta/paiement/cheque/fiche.php index ff20fe04fea..e93113e028c 100644 --- a/htdocs/compta/paiement/cheque/fiche.php +++ b/htdocs/compta/paiement/cheque/fiche.php @@ -100,7 +100,7 @@ if ($action == 'setrefext' && $user->rights->banque->cheque) { $ref_ext = GETPOST('ref_ext'); - $result=$object->set_ref_ext($user, $ref_ext); + $result=$object->setValueFrom('ref_ext', $ref_ext); if ($result < 0) { $mesg='
'.$object->error.'
'; @@ -367,8 +367,8 @@ if ($action == 'new') $sql.= " AND ba.entity = ".$conf->entity; $sql.= " AND b.fk_bordereau = 0"; $sql.= " AND b.amount > 0"; - if ($filterdate) $sql.=" AND b.dateo = '".$db->idate($filterdate)."'"; - if ($filteraccountid) $sql.=" AND ba.rowid= '".$filteraccountid."'"; + if ($filterdate) $sql.=" AND b.dateo = '".$db->idate($filterdate)."'"; + if ($filteraccountid > 0) $sql.=" AND ba.rowid= '".$filteraccountid."'"; $sql.= $db->order("b.dateo,b.rowid","ASC"); $resql = $db->query($sql); @@ -514,10 +514,10 @@ else print ''; print ''; - + // External ref print '"; - print ''; + print ''; $x_coll = 0; foreach($coll_listsell as $vatrate=>$val) @@ -166,7 +166,7 @@ for ($m = 1 ; $m < 13 ; $m++ ) $x_coll+=$val['vat']; } $subtotalcoll = $subtotalcoll + $x_coll; - print ""; + print ""; $x_paye = 0; foreach($coll_listbuy as $vatrate=>$val) @@ -174,13 +174,13 @@ for ($m = 1 ; $m < 13 ; $m++ ) $x_paye+=$val['vat']; } $subtotalpaye = $subtotalpaye + $x_paye; - print ""; + print ""; $diff = $x_coll - $x_paye; $total = $total + $diff; $subtotal = $subtotal + $diff; - print "\n"; + print "\n"; print "\n"; print "\n"; diff --git a/htdocs/compta/tva/quadri.php b/htdocs/compta/tva/quadri.php index d283f877817..b97eca7bacb 100644 --- a/htdocs/compta/tva/quadri.php +++ b/htdocs/compta/tva/quadri.php @@ -263,11 +263,11 @@ if ($conf->global->COMPTA_MODE == "CREANCES-DETTES") $var=!$var; print ""; print ""; - print ""; - print ""; + print ""; + print ""; print ""; - print ""; - print ""; + print ""; + print ""; print ""; print ""; print ""; @@ -286,7 +286,7 @@ if ($conf->global->COMPTA_MODE == "CREANCES-DETTES") $var=!$var; print ""; print ''; - print "\n"; + print "\n"; print "\n"; $i++; diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php index 88c1be06409..0d859d96c06 100644 --- a/htdocs/compta/tva/quadri_detail.php +++ b/htdocs/compta/tva/quadri_detail.php @@ -342,7 +342,7 @@ else print ''; // Ref - print ''; + print ''; // Description print ''; // VAT - print ''; if ($modetax == 0) { - print ''; + print ''; print ''; } print ''; - print ''; + print ''; print ''; } @@ -450,11 +450,11 @@ else print ''; if ($modetax == 0) { - print ''; + print ''; print ''; } print ''; - print ''; + print ''; print ''; } @@ -499,7 +499,7 @@ else print ''; // Ref - print ''; + print ''; // Description print ''; // VAT - print ''; if ($modetax == 0) { - print ''; + print ''; print ''; } print ''; - print ''; + print ''; print ''; } @@ -601,11 +601,11 @@ else print ''; if ($modetax == 0) { - print ''; + print ''; print ''; } print ''; - print ''; + print ''; print ''; } diff --git a/htdocs/compta/tva/reglement.php b/htdocs/compta/tva/reglement.php index 4ca5f298514..ea9f7ea445d 100644 --- a/htdocs/compta/tva/reglement.php +++ b/htdocs/compta/tva/reglement.php @@ -60,9 +60,9 @@ if ($result) print '
'.$langs->trans("Ref").''.$langs->trans("Ref").'".$langs->trans("Label")."'.$langs->trans("DatePayment").''.$langs->trans("DatePayment").'".$langs->trans("PayedByThisPayment")."
'; - + print ''; @@ -651,10 +651,10 @@ else print '
'; -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 ''.$langs->trans('NewCheckReceipt').''; -} +}*/ if ($user->societe_id == 0 && ! empty($object->id) && $object->statut == 0 && $user->rights->banque->cheque) { diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php index a0e2d498ee0..d242deedb38 100644 --- a/htdocs/compta/prelevement/ligne.php +++ b/htdocs/compta/prelevement/ligne.php @@ -196,13 +196,13 @@ if ($id) print '
'; //Date - print ''; + print ''; print ''; //Reason - print ''; + print ''; print ''; diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php index 83f248a39be..871e8a583ef 100644 --- a/htdocs/compta/tva/clients.php +++ b/htdocs/compta/tva/clients.php @@ -207,16 +207,16 @@ if (is_array($coll_list)) } } print ""; - print ""; + print '"; $company_static->id=$coll->socid; $company_static->nom=$coll->nom; $company_static->client=1; - print ''; + print ''; $find = array(' ','.'); $replace = array('',''); - print ""; - print ""; - print ""; + print '"; + print ""; + print ""; $totalamount = $totalamount + $coll->amount; $total = $total + $coll->tva; print "\n"; @@ -226,8 +226,8 @@ if (is_array($coll_list)) $x_coll_sum = $total; print ''; - print ''; - print ''; + print ''; + print ''; print ''; } else @@ -285,16 +285,16 @@ if (is_array($coll_list)) } } print ""; - print ""; + print '"; $company_static->id=$coll->socid; $company_static->nom=$coll->nom; $company_static->fournisseur=1; - print ''; + print ''; $find = array(' ','.'); $replace = array('',''); - print ""; - print ""; - print ""; + print '"; + print ""; + print ""; $totalamount = $totalamount + $coll->amount; $total = $total + $coll->tva; print "\n"; @@ -304,8 +304,8 @@ if (is_array($coll_list)) $x_paye_sum = $total; print ''; - print ''; - print ''; + print ''; + print ''; print ''; print '
'; print $langs->trans('RefExt'); print '
'.$langs->trans("RefusedData").'
'.$langs->trans("RefusedData").''; print $form->select_date('','','','','',"confirm_rejet"); print '
'.$langs->trans("RefusedReason").'
'.$langs->trans("RefusedReason").''; print $form->selectarray("motif", $rej->motifs); print '
".$i."'.$i."'.$company_static->getNomUrl(1,'customer').''.$company_static->getNomUrl(1,'customer').'".$intra."".price($coll->amount)."".price($coll->tva)."'.$intra."".price($coll->amount)."".price($coll->tva)."
'.$langs->trans("Total").':'.price($totalamount).''.price($total).''.price($totalamount).''.price($total).'
".$i."'.$i."'.$company_static->getNomUrl(1,'supplier').''.$company_static->getNomUrl(1,'supplier').'".$intra."".price($coll->amount)."".price($coll->tva)."'.$intra."".price($coll->amount)."".price($coll->tva)."
'.$langs->trans("Total").':'.price($totalamount).''.price($total).''.price($totalamount).''.price($total).'
'; diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php index 7f23b6cfded..9bd05274f0a 100644 --- a/htdocs/compta/tva/index.php +++ b/htdocs/compta/tva/index.php @@ -158,7 +158,7 @@ for ($m = 1 ; $m < 13 ; $m++ ) $var=!$var; print "
'.dol_print_date(dol_mktime(0,0,0,$m,1,$y),"%b %Y").''.dol_print_date(dol_mktime(0,0,0,$m,1,$y),"%b %Y").'".price($x_coll)."".price($x_coll)."".price($x_paye)."".price($x_paye)."".price($diff)."".price($diff)." 
$rate%".price($both['coll']['totalht'])."".price($both['coll']['vat'])."".price($both['coll']['totalht'])."".price($both['coll']['vat'])."".$both['coll']['links']."".price($both['paye']['totalht'])."".price($both['paye']['vat'])."".price($both['paye']['totalht'])."".price($both['paye']['vat'])."".$both['paye']['links']."
".price($diff)."".price($diff)."
'.$fields['link'].''.$fields['link'].''; @@ -374,7 +374,7 @@ else // Total HT if ($modetax == 0) { - print ''; + print ''; print price($fields['totalht']); if (price2num($fields['ftotal_ttc'])) { @@ -390,7 +390,7 @@ else if ($modetax == 0) { if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); - print ''; + print ''; //print $fields['totalht']."-".$fields['payment_amount']."-".$fields['ftotal_ttc']; if ($fields['payment_amount'] && $fields['ftotal_ttc']) { @@ -409,14 +409,14 @@ else } // Total collected - print ''; + print ''; $temp_ht=$fields['totalht']; if ($type == 1) $temp_ht=$fields['totalht']*$ratiopaymentinvoice; print price(price2num($temp_ht,'MT')); print ''; + print ''; $temp_vat=$fields['vat']; if ($type == 1) $temp_vat=$fields['vat']*$ratiopaymentinvoice; print price(price2num($temp_vat,'MT')); @@ -435,11 +435,11 @@ else print ''.$langs->trans("Total").':   '.price(price2num($subtot_coll_total_ht,'MT')).''.price(price2num($subtot_coll_vat,'MT')).''.price(price2num($subtot_coll_vat,'MT')).'
'.$langs->trans("Total").':   '.price(price2num(0,'MT')).''.price(price2num(0,'MT')).''.price(price2num(0,'MT')).'
'.$fields['link'].''.$fields['link'].''; @@ -525,7 +525,7 @@ else // Total HT if ($modetax == 0) { - print ''; + print ''; print price($fields['totalht']); if (price2num($fields['ftotal_ttc'])) { @@ -541,7 +541,7 @@ else if ($modetax == 0) { if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); - print ''; + print ''; if ($fields['payment_amount'] && $fields['ftotal_ttc']) { $paymentfourn_static->id=$fields['payment_id']; @@ -560,14 +560,14 @@ else } // VAT paid - print ''; + print ''; $temp_ht=$fields['totalht']; if ($type == 1) $temp_ht=$fields['totalht']*$ratiopaymentinvoice; print price(price2num($temp_ht,'MT')); print ''; + print ''; $temp_vat=$fields['vat']; if ($type == 1) $temp_vat=$fields['vat']*$ratiopaymentinvoice; print price(price2num($temp_vat,'MT')); @@ -586,11 +586,11 @@ else print ''.$langs->trans("Total").':   '.price(price2num($subtot_paye_total_ht,'MT')).''.price(price2num($subtot_paye_vat,'MT')).''.price(price2num($subtot_paye_vat,'MT')).'
'.$langs->trans("Total").':   '.price(price2num(0,'MT')).''.price(price2num(0,'MT')).''.price(price2num(0,'MT')).'
'; print ''; - print ''; + print ''; print ""; - print ''; + print ''; print ""; print "\n"; $var=1; diff --git a/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php index 0810624eb4c..a445444e42c 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php @@ -111,7 +111,7 @@ echo $this->control->tpl['ajax_selectcountry']; control->tpl['nb_emailing']) { ?> - + diff --git a/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php index d0ad081e92e..d7556f09f9f 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php @@ -96,7 +96,7 @@ dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors'] control->tpl['nb_emailing']) { ?> - + diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 94e8fadf3bf..7a88eb7d8cd 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -678,7 +678,7 @@ else if (! empty($conf->mailing->enabled)) { $langs->load("mails"); - print ''; + print ''; print ''; } else @@ -879,7 +879,7 @@ else if (! empty($conf->mailing->enabled)) { $langs->load("mails"); - print ''; + print ''; print ''; } else diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index 845eaad86bb..05ee288b42c 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -80,9 +80,9 @@ if (! empty($conf->contrat->enabled)) print '
'.$langs->trans("Ref").''.$langs->trans("Ref").'".$langs->trans("Label")."'.$langs->trans("DatePayment").''.$langs->trans("DatePayment").'".$langs->trans("PayedByThisPayment")."
trans("Email"); ?> trans("NbOfEMailingsReceived"); ?>trans("NbOfEMailingsReceived"); ?> control->tpl['nb_emailing']; ?>  trans("EMail"); ?> control->tpl['email']; ?> trans("NbOfEMailingsReceived"); ?>trans("NbOfEMailingsReceived"); ?> control->tpl['nb_emailing']; ?>  '.$langs->trans("NbOfEMailingsReceived").''.$langs->trans("NbOfEMailingsReceived").''.$object->getNbOfEMailings().''.$langs->trans("NbOfEMailingsReceived").''.$langs->trans("NbOfEMailingsReceived").''.$object->getNbOfEMailings().'
'; print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; print "
'.$langs->trans("SearchAContract").'
'.$langs->trans("Ref").':'.$langs->trans("Ref").':
'.$langs->trans("Other").':
'.$langs->trans("Other").':
\n"; print "
"; @@ -255,7 +255,7 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire) while ($i < $num && $i < 20) { $obj = $db->fetch_object($resql); - print '
'; + print '
'; $staticcontrat->ref=$obj->ref; $staticcontrat->id=$obj->rowid; print $staticcontrat->getNomUrl(1,''); diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index 17c44b8b479..63140c64c28 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -192,11 +192,11 @@ class box_graph_invoices_permonth extends ModeleBoxes $stringtoshow.=''; $stringtoshow.=''; } - $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 { - $this->info_box_contents[0][0] = array( 'td' => 'align="left"', + $this->info_box_contents[0][0] = array( 'td' => 'align="left" class="nohover"', 'maxlength'=>500, 'text' => $mesg); } diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php index 38d12179ea5..d66bffefe10 100644 --- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php @@ -192,11 +192,11 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes $stringtoshow.=''; $stringtoshow.=''; } - $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 { - $this->info_box_contents[0][0] = array( 'td' => 'align="left"', + $this->info_box_contents[0][0] = array( 'td' => 'align="left" class="nohover"', 'maxlength'=>500, 'text' => $mesg); } diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php index 987c224d423..1f292364aa2 100644 --- a/htdocs/core/boxes/box_graph_orders_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_permonth.php @@ -192,11 +192,11 @@ class box_graph_orders_permonth extends ModeleBoxes $stringtoshow.=''; $stringtoshow.=''; } - $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 { - $this->info_box_contents[0][0] = array( 'td' => 'align="left"', + $this->info_box_contents[0][0] = array( 'td' => 'align="left" class="nohover"', 'maxlength'=>500, 'text' => $mesg); } diff --git a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php index 59b778983a7..f54fc336577 100644 --- a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php @@ -192,11 +192,11 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes $stringtoshow.=''; $stringtoshow.=''; } - $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 { - $this->info_box_contents[0][0] = array( 'td' => 'align="left"', + $this->info_box_contents[0][0] = array( 'td' => 'align="left" class="nohover"', 'maxlength'=>500, 'text' => $mesg); } diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index da564fb4c71..182639da994 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -192,11 +192,11 @@ class box_graph_propales_permonth extends ModeleBoxes $stringtoshow.=''; $stringtoshow.=''; } - $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 { - $this->info_box_contents[0][0] = array( 'td' => 'align="left"', + $this->info_box_contents[0][0] = array( 'td' => 'align="left" class="nohover"', 'maxlength'=>500, 'text' => $mesg); } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index c1b75793220..4cb0f68959e 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -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 mixte $value New value - * @param string $table To force other table element or element line - * @param int $id To force other object id - * @param string $format Data format ('text' by default, 'date') - * @param string $id_field To force rowid field name + * @param string $table To force other table element or element line (should not be used) + * @param int $id To force other object id (should not be used) + * @param string $format Data format ('text', 'date'). 'text' is used if not defined + * @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 */ - function setValueFrom($field, $value, $table='', $id='', $format='text', $id_field='rowid') + function setValueFrom($field, $value, $table='', $id='', $format='', $id_field='', $user='') { global $conf; - if (empty($table)) $table=$this->table_element; - if (empty($id)) $id=$this->id; + if (empty($table)) $table=$this->table_element; + if (empty($id)) $id=$this->id; + if (empty($format)) $format='text'; + if (empty($id_field)) $id_field='rowid'; $this->db->begin(); $sql = "UPDATE ".MAIN_DB_PREFIX.$table." SET "; if ($format == 'text') $sql.= $field." = '".$this->db->escape($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; - 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); if ($resql) { @@ -2296,7 +2300,7 @@ abstract class CommonObject }); }); } - + setListDependencies(); }); '; diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index e41334a30e0..bd13cc238b1 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -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. $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 (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 $modulealreadyexecuted=array(); diff --git a/htdocs/core/filemanagerdol/browser/default/frmcreatefolder.php b/htdocs/core/filemanagerdol/browser/default/frmcreatefolder.php index c19c0d5ec43..44b00b2154c 100755 --- a/htdocs/core/filemanagerdol/browser/default/frmcreatefolder.php +++ b/htdocs/core/filemanagerdol/browser/default/frmcreatefolder.php @@ -128,7 +128,7 @@ window.onload = function()
 Create New FolderCreate New Folder
diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 64d8f50c9c7..774e16e6e68 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -86,9 +86,13 @@ function societe_prepare_head($object) 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][1] = $langs->trans("Note"); + if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')'; $head[$h][2] = 'note'; $h++; @@ -101,8 +105,12 @@ function societe_prepare_head($object) } // 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][1] = $langs->trans("Documents"); + if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')'; $head[$h][2] = 'document'; $h++; diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index 9b6f48519fa..ccebd10cea5 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -116,8 +116,14 @@ function product_prepare_head($object, $user) // $this->tabs = array('entity:-tabname); to remove a tab 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][1] = $langs->trans('Documents'); + if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')'; $head[$h][2] = 'documents'; $h++; diff --git a/htdocs/core/modules/dons/html_cerfafr.html b/htdocs/core/modules/dons/html_cerfafr.html index 2f21e1c0afe..ebdd30c9376 100644 --- a/htdocs/core/modules/dons/html_cerfafr.html +++ b/htdocs/core/modules/dons/html_cerfafr.html @@ -22,7 +22,7 @@ __DonationRef__ -
+ @@ -45,7 +45,7 @@
No: -
+ __DonationRecipient__ @@ -79,7 +79,7 @@ -
+ __Donor__ diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index acb3f51f6d2..3541160ef52 100755 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -692,13 +692,22 @@ class pdf_crabe extends ModelePDFFactures { // Check a payment mode is defined if (empty($object->mode_reglement_code) - && ! $conf->global->FACTURE_CHQ_NUMBER - && ! $conf->global->FACTURE_RIB_NUMBER) + && empty($conf->global->FACTURE_CHQ_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->SetTextColor(200,0,0); $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); $posy=$pdf->GetY()+1; diff --git a/htdocs/core/modules/facture/modules_facture.php b/htdocs/core/modules/facture/modules_facture.php index 865d1f578bd..31ec4698bb8 100644 --- a/htdocs/core/modules/facture/modules_facture.php +++ b/htdocs/core/modules/facture/modules_facture.php @@ -238,7 +238,7 @@ function facture_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($db); $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 return 1; diff --git a/htdocs/expedition/contact.php b/htdocs/expedition/contact.php index c907cf89ba0..bd396f0e8f5 100644 --- a/htdocs/expedition/contact.php +++ b/htdocs/expedition/contact.php @@ -199,7 +199,7 @@ if ($id > 0 || ! empty($ref)) // Ref expedition client print '
'; - print '
'; + print ''; print '
'; print $langs->trans('RefCustomer').''; print '
'; diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index f381b5bbd1c..33cf13ffc6f 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -185,7 +185,7 @@ if ($id > 0 || ! empty($ref)) // Ref commande client print '
'; - print '
'; + print ''; if ($action != 'RefCustomerOrder' && $commande->brouillon) print ''; diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 516a975e5ab..00d7589448a 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -1226,8 +1226,8 @@ elseif (! empty($object->id)) // Conditions de reglement par defaut $langs->load('bills'); $form = new Form($db); - print '
'; print $langs->trans('RefCustomer').''; print ''.img_edit($langs->trans('Modify')).'
'; - print '
'; + print '
'; + print ''; @@ -1247,8 +1247,8 @@ elseif (! empty($object->id)) // Mode of payment $langs->load('bills'); $form = new Form($db); - print ''; $name = substr($file, 0, dol_strlen($file) - 4); diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index 886276197e3..904144cad66 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -369,7 +369,7 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action'))) foreach($filelist as $file) { print ''; - print ''."\n"; + print ''."\n"; // Run sql script $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) { print ''; - print ''."\n"; + print ''."\n"; // 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. diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 3089dfb0510..913f8f71b5a 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -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'). ErrorFailedToAddContact=Failed to add contact 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 WarningMandatorySetupNotComplete=Mandatory setup parameters are not yet defined diff --git a/htdocs/langs/fr_FR/errors.lang b/htdocs/langs/fr_FR/errors.lang index f3bcee9c4d9..76888ab7179 100644 --- a/htdocs/langs/fr_FR/errors.lang +++ b/htdocs/langs/fr_FR/errors.lang @@ -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'). ErrorFailedToAddContact=Echec à l'ajout du contact 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 WarningMandatorySetupNotComplete=Les informations de configuration obligatoire doivent être renseignées diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index c5aa1916f70..aa262f9a6c2 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -1070,8 +1070,8 @@ else if ($showbarcode) { // Barcode type - print '
'; print $langs->trans('PaymentConditions'); print ''; if ($action != 'editconditions') print 'id.'">'.img_edit($langs->trans('SetConditions'),1).'
'; - print '"; $classname = "impayee"; - print '\n"; - print "\n"; + print '\n"; - print "\n"; - print "\n"; + print '\n"; diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index 5899870b955..d61d49476bc 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -190,7 +190,7 @@ if ($object->fetch($id)) } // TVA Intra - print ''; diff --git a/htdocs/index.php b/htdocs/index.php index 6108985a0b6..f6d476dade8 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -109,7 +109,7 @@ $langs->load("orders"); $langs->load("contracts"); //print memory_get_usage(); -if ($user->societe_id == 0) +if (empty($user->societe_id)) { print '
'; print '
'; + print '
'; + print ''; if ($action != 'editmode') print ''; diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php index 52064cb39eb..9a1aaf4164f 100644 --- a/htdocs/fourn/commande/index.php +++ b/htdocs/fourn/commande/index.php @@ -64,7 +64,7 @@ print ''; print ''; print ''; -print ''; +print ''; print ''; print "
'; print $langs->trans('PaymentMode'); print 'id.'">'.img_edit($langs->trans('SetMode'),1).'
'.$langs->trans("SearchOrder").'
'; print $langs->trans("Ref").':
'.$langs->trans("Other").':
'.$langs->trans("Other").':

\n"; diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index 4a7b61f2768..87c3c7e6dc8 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -237,16 +237,16 @@ if ($user->rights->fournisseur->facture->lire) print "
'; + print ''; $facturestatic->id=$objp->facid; $facturestatic->ref=$objp->ref; print $facturestatic->getNomUrl(1); print "".dol_trunc($objp->ref_supplier,12)."'.dol_trunc($objp->ref_supplier,12)."".dol_print_date($db->jdate($objp->df),'day')."".dol_print_date($db->jdate($objp->datelimite),'day'); + print ''.dol_print_date($db->jdate($objp->df),'day')."'.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")); print "
'.$langs->trans('VATIntra').''; + print '
'.$langs->trans('VATIntra').''; print $object->tva_intra; print '
'; @@ -117,132 +117,146 @@ if ($user->societe_id == 0) print ''; print ''; print ''; + print ''; - print ''; - print ''; - print ''; - } - } - $object=new stdClass(); $parameters=array(); $action=''; $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 ''; + print ''; + print ''; + print ''; + */ + print ''; + print ''; + } + } + } + + print ''; print '
'.$langs->trans("DolibarrStateBoard").' 
'; $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 '
'.img_object($title,$icons[$key]).''.$title.''.$board->nb[$val].'
'.img_object($title,$icons[$key]).''.$title.''.$board->nb[$val].'
'; } diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index 081204415b2..a8a4099004a 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -82,7 +82,7 @@ if (! defined('DONOTLOADCONF') && file_exists($conffile)) $result=include_once $conffile; // Load conf file 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 $dolibarr_main_data_root =isset($dolibarr_main_data_root)?trim($dolibarr_main_data_root):''; diff --git a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql index 76137d75b7f..f13042bff2e 100755 --- a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql +++ b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql @@ -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('TN24', 1001, '', 0, '', 'Zaghouan', 1); -# Add ref_ext on bordereau_cheque -ALTER TABLE `llx_bordereau_cheque` ADD `ref_ext` VARCHAR( 255 ) NOT NULL; +-- Add ref_ext on bordereau_cheque +ALTER TABLE llx_bordereau_cheque ADD ref_ext VARCHAR(255); +ALTER TABLE llx_bordereau_cheque ADD tms timestamp; + diff --git a/htdocs/install/mysql/tables/llx_bordereau_cheque.sql b/htdocs/install/mysql/tables/llx_bordereau_cheque.sql index 60365665932..cbaea000c33 100644 --- a/htdocs/install/mysql/tables/llx_bordereau_cheque.sql +++ b/htdocs/install/mysql/tables/llx_bordereau_cheque.sql @@ -24,16 +24,16 @@ create table llx_bordereau_cheque ( rowid integer AUTO_INCREMENT PRIMARY KEY, + number varchar(16) NOT NULL, -- ref + ref_ext varchar(255), -- ref_ext datec datetime NOT NULL, - date_bordereau date, -- A quoi sert cette date ? - number varchar(16) NOT NULL, - entity integer DEFAULT 1 NOT NULL, -- multi company id + date_bordereau date, -- A quoi sert cette date ? amount double(24,8) NOT NULL, nbcheque smallint NOT NULL, fk_bank_account integer, fk_user_author integer, - note text, 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; diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php index 2751c963158..a6c0975ec97 100644 --- a/htdocs/install/repair.php +++ b/htdocs/install/repair.php @@ -180,7 +180,7 @@ if ($ok) // Loop on each file foreach($filelist as $file) { - print '
'; + print '
'; print $langs->trans("Script").''.$file.'

'.$langs->trans("ChoosedMigrateScript").''.$file.'
'.$langs->trans("ChoosedMigrateScript").''.$file.'

'.$langs->trans("ChoosedMigrateScript").' (external modules)'.$modulefileshort.'
'.$langs->trans("ChoosedMigrateScript").' (external modules)'.$modulefileshort.'
'; - print '
'; + print '
'; + print ''; @@ -1091,8 +1091,8 @@ else print ''."\n"; // Barcode value - print '
'; print $langs->trans("BarcodeType"); print ''; if (($action != 'editbarcodetype') && $user->rights->barcode->creer) print 'id.'">'.img_edit($langs->trans('Edit'),1).'
'; - print '
'; + print '
'; + print ''; diff --git a/htdocs/projet/admin/project.php b/htdocs/projet/admin/project.php index 136e5124ca5..658d87fff0d 100644 --- a/htdocs/projet/admin/project.php +++ b/htdocs/projet/admin/project.php @@ -444,7 +444,7 @@ foreach ($dirmodels as $reldir) print ''; // Show example of numbering module - print ''; print ''; - print ''; + print ''; print "
'; print $langs->trans("BarcodeValue"); print ''; if (($action != 'editbarcode') && $user->rights->barcode->creer) print 'id.'">'.img_edit($langs->trans('Edit'),1).''; + print ''; $tmp=$module->getExample(); if (preg_match('/^Error/',$tmp)) print '
'.$langs->trans($tmp).'
'; elseif ($tmp=='NotConfigured') print $langs->trans($tmp); diff --git a/htdocs/theme/amarok/style.css.php b/htdocs/theme/amarok/style.css.php index 2866da54411..e8b168f4507 100755 --- a/htdocs/theme/amarok/style.css.php +++ b/htdocs/theme/amarok/style.css.php @@ -333,7 +333,12 @@ th .button { .nowrap { white-space: ; } - +.nobold { + font-weight: normal !important; +} +.nounderline { + text-decoration: none; +} .blockvmenubookmarks .menu_contenu { background-color: transparent; @@ -1298,6 +1303,19 @@ tr.impair table.nobordernopadding td, tr.pair table.nobordernopadding td { paddi * Boxes */ +.boxstats { + + 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 { -moz-box-shadow:2px 4px 2px #cccccc; -webkit-box-shadow:2px 4px 2px #cccccc; diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index 3e0390b91c0..e2d8523a5b2 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -219,6 +219,12 @@ div.inline-block .nowrap { white-space: ; } +.nobold { + font-weight: normal !important; +} +.nounderline { + text-decoration: none; +} /* ============================================================================== */ @@ -1432,6 +1438,19 @@ div.tabBar .noborder { * Boxes */ +.boxstats { + + 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 { -moz-box-shadow: 4px 4px 4px #CCC; -webkit-box-shadow: 4px 4px 4px #CCC; diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php index 7de1adf9cdb..bc4a8bde676 100644 --- a/htdocs/theme/bureau2crea/style.css.php +++ b/htdocs/theme/bureau2crea/style.css.php @@ -246,9 +246,13 @@ div.inline-block .nowrap { white-space: ; } -/*.dolibarrcombobox { - height: 22px; -}*/ +.nobold { + font-weight: normal !important; +} +.nounderline { + text-decoration: none; +} + /* ============================================================================== */ /* Styles to hide objects */ @@ -1570,6 +1574,19 @@ tr.pair td.nohover { * Boxes */ +.boxstats { + + 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 { padding-right: 0px; padding-left: 0px; diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php index 316d8515158..07bae5caf48 100644 --- a/htdocs/theme/cameleo/style.css.php +++ b/htdocs/theme/cameleo/style.css.php @@ -224,6 +224,12 @@ div.inline-block .nowrap { white-space: ; } +.nobold { + font-weight: normal !important; +} +.nounderline { + text-decoration: none; +} /* ============================================================================== */ @@ -1532,6 +1538,10 @@ background: #c0c4c7; border: 0px; } +tr.impair td.nohover, form.impair div.nohover { + background: #eaeaea; +} + .pair { background: #FFFFFF; font-family: ; @@ -1543,6 +1553,10 @@ background: #c0c4c7; border: 0px; } +tr.pair td.nohover { + background: #FFFFFF; +} + .pair td, .impair td { padding: 2px; } @@ -1558,6 +1572,19 @@ border: 0px; * Boxes */ +.boxstats { + + 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 { padding-right: 0px; padding-left: 0px; @@ -1591,6 +1618,10 @@ background: #c0c4c7; border: 0px; } +tr.box_impair .nohover { +background: #eaeaea; +} + tr.box_pair { /* background: #d0d4d7; */ background: #f4f4f4; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 8a49ac69e3b..130a6fa8706 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -381,6 +381,12 @@ th .button { .nowrap { white-space: ; } +.nobold { + font-weight: normal !important; +} +.nounderline { + text-decoration: none; +} /* ============================================================================== */ @@ -1818,6 +1824,19 @@ div.tabBar .noborder { * Boxes */ +.boxstats { + + 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 { -moz-box-shadow: 4px 4px 4px #DDD; -webkit-box-shadow: 4px 4px 4px #DDD; diff --git a/htdocs/user/home.php b/htdocs/user/home.php index a8a62df999a..3f43e40e43a 100644 --- a/htdocs/user/home.php +++ b/htdocs/user/home.php @@ -69,7 +69,7 @@ print ''; print ''; print ''; -print ''; +print ''; print "
'.$langs->trans("SearchAUser").'
'; print $langs->trans("Ref").':
'.$langs->trans("Other").':
'.$langs->trans("Other").':

\n"; print ''; @@ -83,7 +83,7 @@ if ($canreadperms) print '
'.$langs->trans("SearchAGroup").'
'; print $langs->trans("Ref").':
'.$langs->trans("Other").':
'.$langs->trans("Other").':

\n"; print ''; }