';
- print '';
+ print ' ';
+ print '';
print $langs->trans('PaymentMode');
print ' ';
if (($action != 'editmode') && $user->rights->societe->creer) print ' id.'">'.img_edit($langs->trans('SetMode'),1).' ';
@@ -338,8 +338,8 @@ if ($id > 0)
print ' ';
// Relative discounts (Discounts-Drawbacks-Rebates)
- print '';
- print '';
+ print ' ';
+ print '';
print $langs->trans("CustomerRelativeDiscountShort");
print ' ';
if ($user->rights->societe->creer && !$user->societe_id > 0)
@@ -351,9 +351,9 @@ if ($id > 0)
print ' ';
// Absolute discounts (Discounts-Drawbacks-Rebates)
- 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 ' ';
+ print '';
print $langs->trans('ProspectLevel');
print ' ';
if ($action != 'editlevel' && $user->rights->societe->creer) print ' id.'">'.img_edit($langs->trans('Modify'),1).' ';
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 '\n";
print " \n";
@@ -117,9 +117,9 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire)
print '\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 ' \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 '';
@@ -1617,7 +1618,6 @@ else
}
print ' ';
print ' ';
-
// Company
print ''.$langs->trans('Company').' '.$soc->getNomUrl(1).' ';
print ' ';
@@ -1932,7 +1932,7 @@ else
// Amount HT
print ''.$langs->trans('AmountHT').' ';
- print ''.price($object->total_ht).' ';
+ print ''.price($object->total_ht).' ';
print ''.$langs->trans("Currency".$conf->currency).' ';
// Margin Infos
@@ -1945,27 +1945,27 @@ else
// Amount VAT
print ''.$langs->trans('AmountVAT').' ';
- print ''.price($object->total_tva).' ';
+ print ''.price($object->total_tva).' ';
print ''.$langs->trans("Currency".$conf->currency).' ';
// Amount Local Taxes
if ($mysoc->localtax1_assuj=="1") //Localtax1
{
print ''.$langs->transcountry("AmountLT1",$mysoc->country_code).' ';
- print ''.price($object->total_localtax1).' ';
+ print ''.price($object->total_localtax1).' ';
print ''.$langs->trans("Currency".$conf->currency).' ';
}
if ($mysoc->localtax2_assuj=="1") //Localtax2
{
print ''.$langs->transcountry("AmountLT2",$mysoc->country_code).' ';
- print ''.price($object->total_localtax2).' ';
+ print ''.price($object->total_localtax2).' ';
print ''.$langs->trans("Currency".$conf->currency).' ';
}
// Amount TTC
print ''.$langs->trans('AmountTTC').' ';
- print ''.price($object->total_ttc).' ';
+ print ''.price($object->total_ttc).' ';
print ''.$langs->trans("Currency".$conf->currency).' ';
// 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 '';
print $langs->trans('RefCustomer').' ';
print ' ';
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 '';
print $langs->trans('RefCustomer').' ';
print ' ';
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 ' \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_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 ' ';
+ print ' ';
print '';
print ' ';
print ' ';
@@ -293,7 +302,7 @@ if ($result)
print '';
print ' ';
print ' ';
-
+
print '';
print ' ';
print ' ';
@@ -345,12 +354,17 @@ if ($result)
print $companystatic->getNomUrl(1,'customer');
print '';
+ // Town
+ print '';
+ print $objp->town;
+ print ' ';
+
// Customer ref
- print '';
+ print ' ';
print $objp->ref_client;
print ' ';
- // Date propale
+ // Date proposal
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." \n";
- // Date fin validite
+ // Date end validity
if ($objp->dfv)
{
print ''.dol_print_date($db->jdate($objp->dfv),'day');
@@ -399,19 +413,19 @@ if ($result)
if($num<$limit){
$var=!$var;
print ' '.$langs->trans("Total HT").' ';
- print ''.price($total).' ';
+ print ' '.price($total).' ';
print ' ';
}
else
{
$var=!$var;
print ''.$langs->trans("Total HT for this page").' ';
- print ''.price($total).' ';
+ print ' '.price($total).' ';
print ' ';
}
-
+
}
-
+
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 ' \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 $langs->trans('RefCustomer').' ';
print ' ';
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 ' \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 '';
+ print '';
print $langs->trans('RefCustomer').' ';
print ' ';
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 ' ';
// Payment term
- 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 ' ';
// 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 ''.($objp->num_chq?$objp->num_chq:"")." \n";
+ print ''.($objp->num_chq?$objp->num_chq:"")." \n";
// Description
print "";
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 ' ';
// Payment term
- 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 ' ';
@@ -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 '';
print ' ';
print ' ';
print '';
@@ -361,8 +363,8 @@ if ($resql)
print " \n";
- print ''.dol_print_date($db->jdate($objp->df),'day').' '."\n";
- print ''.dol_print_date($db->jdate($objp->datelimite),'day').' '."\n";
+ print ''.dol_print_date($db->jdate($objp->df),'day').' '."\n";
+ print ''.dol_print_date($db->jdate($objp->datelimite),'day').' '."\n";
print ''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,28).' ';
@@ -382,7 +384,7 @@ if ($resql)
print '';
// Remain to receive
- //print ''.((! empty($objp->am) || ! empty($cn))?price($objp->total_ttc-$objp->am-$cn):' ').' ';
+ print ''.((! empty($objp->am) || ! empty($cn))?price($objp->total_ttc-$objp->am-$cn):' ').' ';
// Status of invoice
print '';
@@ -412,7 +414,7 @@ if ($resql)
print ' '.price($total_tva).' ';
print ''.price($total_ttc).' ';
print ''.price($total_paid).' ';
- print ' ';
+ print ''.price($total_ttc - $total_paid).' ';
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 ' ';
$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 " ";
- print "".$i." ";
+ print ''.$i." ";
$company_static->id=$coll->socid;
$company_static->nom=$coll->nom;
- print ''.$company_static->getNomUrl(1).' ';
+ print ''.$company_static->getNomUrl(1).' ';
$find = array(' ','.');
$replace = array('','');
- print "".$intra." ";
- print "".price($coll->amount)." ";
- print "".price($coll->localtax2)." ";
+ print ''.$intra." ";
+ print "".price($coll->amount)." ";
+ print "".price($coll->localtax2)." ";
$totalamount = $totalamount + $coll->amount;
$total = $total + $coll->localtax2;
print " \n";
@@ -194,8 +194,8 @@ if (is_array($coll_list))
$x_coll_sum = $total;
print ''.$langs->trans("Total").': ';
- print ''.price($totalamount).' ';
- print ''.price($total).' ';
+ print ''.price($totalamount).' ';
+ print ''.price($total).' ';
print ' ';
}
else
@@ -245,15 +245,15 @@ if (is_array($coll_list))
}
}
print "";
- print "".$i." ";
+ print ''.$i." ";
$company_static->id=$coll->socid;
$company_static->nom=$coll->nom;
- print ''.$company_static->getNomUrl(1).' ';
+ print ''.$company_static->getNomUrl(1).' ';
$find = array(' ','.');
$replace = array('','');
- print "".$intra." ";
- print "".price($coll->amount)." ";
- print "".price($coll->localtax2)." ";
+ print ''.$intra." ";
+ print "".price($coll->amount)." ";
+ print "".price($coll->localtax2)." ";
$totalamount = $totalamount + $coll->amount;
$total = $total + $coll->localtax2;
print " \n";
@@ -263,8 +263,8 @@ if (is_array($coll_list))
$x_paye_sum = $total;
print ''.$langs->trans("Total").': ';
- print ''.price($totalamount).' ';
- print ''.price($total).' ';
+ print ''.price($totalamount).' ';
+ print ''.price($total).' ';
print ' ';
print '
';
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 " ";
- print ''.dol_print_date(dol_mktime(0,0,0,$m,1,$y),"%b %Y").' ';
+ print ''.dol_print_date(dol_mktime(0,0,0,$m,1,$y),"%b %Y").' ';
$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 "".price($x_coll)." ";
+ print "".price($x_coll)." ";
$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 "".price($x_paye)." ";
+ print "".price($x_paye)." ";
$diff = $x_coll - $x_paye;
$total = $total + $diff;
$subtotal = $subtotal + $diff;
- print "".price($diff)." \n";
+ print "".price($diff)." \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 ''.$langs->trans("Ref").' ';
+ print ''.$langs->trans("Ref").' ';
print "".$langs->trans("Label")." ";
- print ''.$langs->trans("DatePayment").' ';
+ print ''.$langs->trans("DatePayment").' ';
print "".$langs->trans("PayedByThisPayment")." ";
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 $langs->trans('RefExt');
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 ''.$langs->trans("RefusedData").' ';
+ print ''.$langs->trans("RefusedData").' ';
print '';
print $form->select_date('','','','','',"confirm_rejet");
print ' ';
//Reason
- print ''.$langs->trans("RefusedReason").' ';
+ print ''.$langs->trans("RefusedReason").' ';
print '';
print $form->selectarray("motif", $rej->motifs);
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 "".$i." ";
+ print ''.$i." ";
$company_static->id=$coll->socid;
$company_static->nom=$coll->nom;
$company_static->client=1;
- print ''.$company_static->getNomUrl(1,'customer').' ';
+ print ''.$company_static->getNomUrl(1,'customer').' ';
$find = array(' ','.');
$replace = array('','');
- print "".$intra." ";
- print "".price($coll->amount)." ";
- print "".price($coll->tva)." ";
+ print ''.$intra." ";
+ print "".price($coll->amount)." ";
+ print "".price($coll->tva)." ";
$totalamount = $totalamount + $coll->amount;
$total = $total + $coll->tva;
print " \n";
@@ -226,8 +226,8 @@ if (is_array($coll_list))
$x_coll_sum = $total;
print ''.$langs->trans("Total").': ';
- print ''.price($totalamount).' ';
- print ''.price($total).' ';
+ print ''.price($totalamount).' ';
+ print ''.price($total).' ';
print ' ';
}
else
@@ -285,16 +285,16 @@ if (is_array($coll_list))
}
}
print "";
- print "".$i." ";
+ print ''.$i." ";
$company_static->id=$coll->socid;
$company_static->nom=$coll->nom;
$company_static->fournisseur=1;
- print ''.$company_static->getNomUrl(1,'supplier').' ';
+ print ''.$company_static->getNomUrl(1,'supplier').' ';
$find = array(' ','.');
$replace = array('','');
- print "".$intra." ";
- print "".price($coll->amount)." ";
- print "".price($coll->tva)." ";
+ print ''.$intra." ";
+ print "".price($coll->amount)." ";
+ print "".price($coll->tva)." ";
$totalamount = $totalamount + $coll->amount;
$total = $total + $coll->tva;
print " \n";
@@ -304,8 +304,8 @@ if (is_array($coll_list))
$x_paye_sum = $total;
print ''.$langs->trans("Total").': ';
- print ''.price($totalamount).' ';
- print ''.price($total).' ';
+ print ''.price($totalamount).' ';
+ print ''.price($total).' ';
print ' ';
print '
';
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 " ";
- print ''.dol_print_date(dol_mktime(0,0,0,$m,1,$y),"%b %Y").' ';
+ print ''.dol_print_date(dol_mktime(0,0,0,$m,1,$y),"%b %Y").' ';
$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 "".price($x_coll)." ";
+ print "".price($x_coll)." ";
$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 "".price($x_paye)." ";
+ print "".price($x_paye)." ";
$diff = $x_coll - $x_paye;
$total = $total + $diff;
$subtotal = $subtotal + $diff;
- print "".price($diff)." \n";
+ print "".price($diff)." \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 "$rate% ";
- print "".price($both['coll']['totalht'])." ";
- print "".price($both['coll']['vat'])." ";
+ print "".price($both['coll']['totalht'])." ";
+ print "".price($both['coll']['vat'])." ";
print "".$both['coll']['links']." ";
- print "".price($both['paye']['totalht'])." ";
- print "".price($both['paye']['vat'])." ";
+ print "".price($both['paye']['totalht'])." ";
+ print "".price($both['paye']['vat'])." ";
print "".$both['paye']['links']." ";
print " ";
print " ";
@@ -286,7 +286,7 @@ if ($conf->global->COMPTA_MODE == "CREANCES-DETTES")
$var=!$var;
print "";
print ' ';
- print "".price($diff)." \n";
+ print "".price($diff)." \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 ''.$fields['link'].' ';
+ print ''.$fields['link'].' ';
// Description
print '';
@@ -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 ' ';
// VAT
- 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").': ';
if ($modetax == 0)
{
- print ' ';
+ print ' ';
print ' ';
}
print ''.price(price2num($subtot_coll_total_ht,'MT')).' ';
- print ''.price(price2num($subtot_coll_vat,'MT')).' ';
+ print ''.price(price2num($subtot_coll_vat,'MT')).' ';
print ' ';
}
@@ -450,11 +450,11 @@ else
print ''.$langs->trans("Total").': ';
if ($modetax == 0)
{
- print ' ';
+ print ' ';
print ' ';
}
print ''.price(price2num(0,'MT')).' ';
- print ''.price(price2num(0,'MT')).' ';
+ print ''.price(price2num(0,'MT')).' ';
print '';
}
@@ -499,7 +499,7 @@ else
print '';
// Ref
- print ''.$fields['link'].' ';
+ print ''.$fields['link'].' ';
// Description
print '';
@@ -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 ' ';
// VAT
- 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").': ';
if ($modetax == 0)
{
- print ' ';
+ print ' ';
print ' ';
}
print ''.price(price2num($subtot_paye_total_ht,'MT')).' ';
- print ''.price(price2num($subtot_paye_vat,'MT')).' ';
+ print ''.price(price2num($subtot_paye_vat,'MT')).' ';
print ' ';
}
@@ -601,11 +601,11 @@ else
print ''.$langs->trans("Total").': ';
if ($modetax == 0)
{
- print ' ';
+ print ' ';
print ' ';
}
print ''.price(price2num(0,'MT')).' ';
- print ''.price(price2num(0,'MT')).' ';
+ print ''.price(price2num(0,'MT')).' ';
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 '';
print '';
- print ''.$langs->trans("Ref").' ';
+ print ''.$langs->trans("Ref").' ';
print "".$langs->trans("Label")." ";
- print ''.$langs->trans("DatePayment").' ';
+ print ''.$langs->trans("DatePayment").' ';
print "".$langs->trans("PayedByThisPayment")." ";
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'];
trans("Email"); ?>
control->tpl['nb_emailing']) { ?>
- trans("NbOfEMailingsReceived"); ?>
+ trans("NbOfEMailingsReceived"); ?>
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']
trans("EMail"); ?>
control->tpl['email']; ?>
control->tpl['nb_emailing']) { ?>
- trans("NbOfEMailingsReceived"); ?>
+ trans("NbOfEMailingsReceived"); ?>
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 ''.$langs->trans("NbOfEMailingsReceived").' ';
+ print ''.$langs->trans("NbOfEMailingsReceived").' ';
print ''.$object->getNbOfEMailings().' ';
}
else
@@ -879,7 +879,7 @@ else
if (! empty($conf->mailing->enabled))
{
$langs->load("mails");
- print ''.$langs->trans("NbOfEMailingsReceived").' ';
+ print ''.$langs->trans("NbOfEMailingsReceived").' ';
print ''.$object->getNbOfEMailings().' ';
}
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 '\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 Folder
+ Create 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__
-
+
No:
@@ -45,7 +45,7 @@
-
+
__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 $langs->trans('RefCustomer').' ';
print ' ';
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 '';
print $langs->trans('RefCustomer').' ';
print ' ';
if ($action != 'RefCustomerOrder' && $commande->brouillon) print ''.img_edit($langs->trans('Modify')).' ';
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 '';
+ print ' ';
+ print '';
print $langs->trans('PaymentConditions');
print ' ';
if ($action != 'editconditions') print ' id.'">'.img_edit($langs->trans('SetConditions'),1).' ';
@@ -1247,8 +1247,8 @@ elseif (! empty($object->id))
// Mode of payment
$langs->load('bills');
$form = new Form($db);
- print '';
- print '';
+ print ' ';
+ print ' \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 " ";
$classname = "impayee";
- print '';
+ print ' ';
$facturestatic->id=$objp->facid;
$facturestatic->ref=$objp->ref;
print $facturestatic->getNomUrl(1);
print " \n";
- print "".dol_trunc($objp->ref_supplier,12)." \n";
+ print ''.dol_trunc($objp->ref_supplier,12)." \n";
- print "".dol_print_date($db->jdate($objp->df),'day')." \n";
- print "".dol_print_date($db->jdate($objp->datelimite),'day');
+ print ' '.dol_print_date($db->jdate($objp->df),'day')." \n";
+ print ''.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 " \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 ' '.$langs->trans('VATIntra').' ';
+ print ' '.$langs->trans('VATIntra').' ';
print $object->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 '';
@@ -117,132 +117,146 @@ if ($user->societe_id == 0)
print ''.$langs->trans("DolibarrStateBoard").' ';
print ' ';
print '';
+ print '';
$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]).' ';
- print ''.$title.' ';
- print ''.$board->nb[$val].' ';
- 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 ''.img_object($title,$icons[$key]).' ';
+ print ''.$title.' ';
+ print ''.$board->nb[$val].' ';
+ print ' ';
+ */
+ print '';
+ print '';
+ }
+ }
+ }
+
+ print '';
print '
';
}
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.' ';
$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 ''.$langs->trans("ChoosedMigrateScript").' '.$file.' '."\n";
+ print ''.$langs->trans("ChoosedMigrateScript").' '.$file.' '."\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 ''.$langs->trans("ChoosedMigrateScript").' (external modules) '.$modulefileshort.' '."\n";
+ print ''.$langs->trans("ChoosedMigrateScript").' (external modules) '.$modulefileshort.' '."\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 '';
+ print ' ';
+ print '';
print $langs->trans("BarcodeType");
print ' ';
if (($action != 'editbarcodetype') && $user->rights->barcode->creer) print ' id.'">'.img_edit($langs->trans('Edit'),1).' ';
@@ -1091,8 +1091,8 @@ else
print ' '."\n";
// Barcode value
- print '';
- print '';
+ print ' ';
+ print '';
print $langs->trans("BarcodeValue");
print ' ';
if (($action != 'editbarcode') && $user->rights->barcode->creer) print ' id.'">'.img_edit($langs->trans('Edit'),1).' ';
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 ' ';
$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 ' \n";
print '';
@@ -83,7 +83,7 @@ if ($canreadperms)
print ' '.$langs->trans("SearchAGroup").' ';
print '';
print $langs->trans("Ref").': ';
- print ''.$langs->trans("Other").': ';
+ print ''.$langs->trans("Other").': ';
print "
\n";
print '';
}