From 4d31759ff989e1baaa1066fd1a64f926f03aeab7 Mon Sep 17 00:00:00 2001 From: philippe grand Date: Tue, 11 Apr 2017 14:35:10 +0200 Subject: [PATCH 1/8] Update code using new css class --- htdocs/accountancy/bookkeeping/card.php | 6 ++---- htdocs/accountancy/bookkeeping/listbyaccount.php | 3 +-- htdocs/accountancy/bookkeeping/listbyyear.php | 3 +-- htdocs/accountancy/customer/index.php | 6 ++---- htdocs/accountancy/customer/list.php | 3 +-- htdocs/accountancy/expensereport/index.php | 6 ++---- htdocs/accountancy/expensereport/lines.php | 3 +-- htdocs/accountancy/expensereport/list.php | 3 +-- htdocs/accountancy/journal/bankjournal.php | 8 +++----- htdocs/accountancy/journal/expensereportsjournal.php | 9 +++------ htdocs/accountancy/journal/purchasesjournal.php | 9 +++------ htdocs/accountancy/journal/sellsjournal.php | 9 +++------ htdocs/accountancy/report/result.php | 3 +-- htdocs/accountancy/supplier/index.php | 6 ++---- htdocs/accountancy/supplier/list.php | 3 +-- 15 files changed, 27 insertions(+), 53 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index 0ec4fb07a12..116e071e42f 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -369,8 +369,7 @@ if ($action == 'create') { print "\n"; foreach ($book->linesmvt as $line) { - $var = ! $var; - print ''; + print ''; $total_debit += $line->debit; $total_credit += $line->credit; @@ -420,8 +419,7 @@ if ($action == 'create') { } if ($action == "" || $action == 'add') { - $var = ! $var; - print ''; + print ''; print ''; print $formventilation->select_account($account_number, 'account_number', 0, array (), 1, 1, ''); print ''; diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index 61753d1c39d..cbb83ba269e 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -265,7 +265,6 @@ $sous_total_credit = 0; $displayed_account_number = null; // Start with undefined to be able to distinguish with empty foreach ( $object->lines as $line ) { - $var = ! $var; $total_debit += $line->debit; $total_credit += $line->credit; @@ -298,7 +297,7 @@ foreach ( $object->lines as $line ) { $sous_total_credit = 0; } - print ''; + print ''; print ' '; print ''.$line->piece_num.''; print '' . dol_print_date($line->doc_date, 'day') . ''; diff --git a/htdocs/accountancy/bookkeeping/listbyyear.php b/htdocs/accountancy/bookkeeping/listbyyear.php index f716339bdc8..263f293043a 100644 --- a/htdocs/accountancy/bookkeeping/listbyyear.php +++ b/htdocs/accountancy/bookkeeping/listbyyear.php @@ -267,9 +267,8 @@ print "\n"; $var = True; foreach ( $object->lines as $line ) { - $var = ! $var; - print ''; + print ''; print '' . $line->piece_num . '' . "\n"; print '' . $line->doc_type . '' . "\n"; print '' . dol_print_date($line->doc_date) . ''; diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index dddc7c896c0..82a406d4a0b 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -244,8 +244,7 @@ if ($resql) { while ( $row = $db->fetch_row($resql)) { - $var = ! $var; - print '' . length_accountg($row[0]) . ''; + print '' . length_accountg($row[0]) . ''; print '' . $row[1] . ''; for($i = 2; $i <= 12; $i ++) { print '' . price($row[$i]) . ''; @@ -301,8 +300,7 @@ if ($resql) { while ( $row = $db->fetch_row($resql)) { - $var = ! $var; - print '' . length_accountg($row[0]) . ''; + print '' . length_accountg($row[0]) . ''; print '' . $row[1] . ''; for($i = 2; $i <= 12; $i ++) { print '' . price($row[$i]) . ''; diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index e8e10b4a0be..845e0a62540 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -313,7 +313,6 @@ if ($result) { $var = true; while ( $i < min($num_lines, $limit) ) { $objp = $db->fetch_object($result); - $var = ! $var; $objp->code_sell_l = ''; $objp->code_sell_p = ''; @@ -354,7 +353,7 @@ if ($result) { // $objp->code_sell_p is now code of product/service // $objp->code_sell_l is now default code of product/service - print ''; + print ''; // Line id print '' . $objp->rowid . ''; diff --git a/htdocs/accountancy/expensereport/index.php b/htdocs/accountancy/expensereport/index.php index b4d7c0bbb7a..4bfeb630b02 100644 --- a/htdocs/accountancy/expensereport/index.php +++ b/htdocs/accountancy/expensereport/index.php @@ -217,8 +217,7 @@ if ($resql) { while ( $row = $db->fetch_row($resql)) { - $var = ! $var; - print '' . length_accountg($row[0]) . ''; + print '' . length_accountg($row[0]) . ''; print '' . $row[1] . ''; for($i = 2; $i <= 12; $i ++) { print '' . price($row[$i]) . ''; @@ -271,8 +270,7 @@ if ($resql) { while ( $row = $db->fetch_row($resql)) { - $var = ! $var; - print '' . length_accountg($row[0]) . ''; + print '' . length_accountg($row[0]) . ''; print '' . $row[1] . ''; for($i = 2; $i <= 12; $i ++) { print '' . price($row[$i]) . ''; diff --git a/htdocs/accountancy/expensereport/lines.php b/htdocs/accountancy/expensereport/lines.php index 20994d76a93..4205a497c1a 100644 --- a/htdocs/accountancy/expensereport/lines.php +++ b/htdocs/accountancy/expensereport/lines.php @@ -268,13 +268,12 @@ if ($result) { $var = True; while ( $i < min($num_lines, $limit) ) { $objp = $db->fetch_object($result); - $var = ! $var; $codeCompta = length_accountg($objp->account_number) . ' - ' . $objp->label; $expensereport_static->ref = $objp->ref; $expensereport_static->id = $objp->erid; - print ''; + print ''; print '' . $objp->rowid . ''; diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php index 49a63a15698..114fd2c99ea 100644 --- a/htdocs/accountancy/expensereport/list.php +++ b/htdocs/accountancy/expensereport/list.php @@ -299,7 +299,6 @@ if ($result) { $var = true; while ( $i < min($num_lines, $limit) ) { $objp = $db->fetch_object($result); - $var = ! $var; $objp->aarowid_suggest = ''; $objp->aarowid_suggest = $objp->aarowid; @@ -307,7 +306,7 @@ if ($result) { $expensereport_static->ref = $objp->ref; $expensereport_static->id = $objp->erid; - print ''; + print ''; // Line id print '' . $objp->rowid . ''; diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index dc18a3417e8..b9567cd50a7 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -749,7 +749,6 @@ if (empty($action) || $action == 'view') { print "" . $langs->trans("Credit") . ""; print "\n"; - $var = true; $r = ''; foreach ( $tabpay as $key => $val ) { // $key is rowid in llx_bank @@ -826,7 +825,7 @@ if (empty($action) || $action == 'view') { // Bank foreach ( $tabbq[$key] as $k => $mt ) { - print ""; + print ''; print ""; print "" . $date . ""; print "" . $ref . ""; @@ -853,7 +852,7 @@ if (empty($action) || $action == 'view') { if (is_array($tabtp[$key])) { foreach ( $tabtp[$key] as $k => $mt ) { if ($k != 'type') { - print ""; + print ''; print ""; print "" . $date . ""; print "" . $ref . ""; @@ -874,7 +873,7 @@ if (empty($action) || $action == 'view') { } } else { foreach ( $tabbq[$key] as $k => $mt ) { - print ""; + print ''; print ""; print "" . $date . ""; print "" . $ref . ""; @@ -892,7 +891,6 @@ if (empty($action) || $action == 'view') { print ""; } } - $var = ! $var; } print ""; diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index 8d657ee6d11..a281b7fef8d 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -449,7 +449,6 @@ if (empty($action) || $action == 'view') { print "" . $langs->trans("Credit") . ""; print "\n"; - $var = true; $r = ''; $expensereportstatic = new ExpenseReport($db); @@ -468,7 +467,7 @@ if (empty($action) || $action == 'view') { $accountingaccount->fetch(null, $k, true); if ($mt) { - print ""; + print ''; print ""; print "" . $date . ""; print "" . $expensereportstatic->getNomUrl(1) . ""; @@ -494,7 +493,7 @@ if (empty($action) || $action == 'view') { // VAT foreach ( $tabtva[$key] as $k => $mt ) { if ($mt) { - print ""; + print ''; print ""; print "" . $date . ""; print "" . $expensereportstatic->getNomUrl(1) . ""; @@ -512,7 +511,7 @@ if (empty($action) || $action == 'view') { print ""; } } - print ""; + print ''; // Third party foreach ( $tabttc[$key] as $k => $mt ) { @@ -534,8 +533,6 @@ if (empty($action) || $action == 'view') { print '' . ($mt >= 0 ? price($mt) : '') . ""; } print ""; - - $var = ! $var; } print ""; diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 9790d124d56..a00fc9a70d8 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -498,7 +498,6 @@ if (empty($action) || $action == 'view') { print "" . $langs->trans("Type") . "" . $langs->trans("Debit") . "" . $langs->trans("Credit") . ""; print "\n"; - $var = true; $r = ''; $invoicestatic = new FactureFournisseur($db); @@ -521,7 +520,7 @@ if (empty($action) || $action == 'view') { $accountingaccount->fetch(null, $k, true); if ($mt) { - print ""; + print ''; print ""; print "" . $date . ""; print "" . $invoicestatic->getNomUrl(1) . ""; @@ -545,7 +544,7 @@ if (empty($action) || $action == 'view') { // VAT foreach ( $tabtva[$key] as $k => $mt ) { if ($mt) { - print ""; + print ''; print ""; print "" . $date . ""; print "" . $invoicestatic->getNomUrl(1) . ""; @@ -563,7 +562,7 @@ if (empty($action) || $action == 'view') { print ""; } } - print ""; + print ''; // Third party foreach ( $tabttc[$key] as $k => $mt ) { @@ -588,8 +587,6 @@ if (empty($action) || $action == 'view') { print '' . ($mt >= 0 ? price($mt) : '') . ""; } print ""; - - $var = ! $var; } print ""; diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index fc3a511d670..235af8eeb41 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -517,7 +517,6 @@ if (empty($action) || $action == 'view') { print "" . $langs->trans("Credit") . ""; print "\n"; - $var = true; $r = ''; $invoicestatic = new Facture($db); @@ -532,7 +531,7 @@ if (empty($action) || $action == 'view') { // Third party foreach ( $tabttc[$key] as $k => $mt ) { - print ""; + print ''; print ""; print "" . $date . ""; print "" . $invoicestatic->getNomUrl(1) . ""; @@ -562,7 +561,7 @@ if (empty($action) || $action == 'view') { $accountingaccount->fetch(null, $k, true); if ($mt) { - print ""; + print ''; print ""; print "" . $date . ""; print "" . $invoicestatic->getNomUrl(1) . ""; @@ -585,7 +584,7 @@ if (empty($action) || $action == 'view') { // VAT foreach ( $tabtva[$key] as $k => $mt ) { if ($mt) { - print ""; + print ''; print ""; print "" . $date . ""; print "" . $invoicestatic->getNomUrl(1) . ""; @@ -604,8 +603,6 @@ if (empty($action) || $action == 'view') { print ""; } } - - $var = ! $var; } print ""; diff --git a/htdocs/accountancy/report/result.php b/htdocs/accountancy/report/result.php index 317b7193ff3..a487cb641ff 100644 --- a/htdocs/accountancy/report/result.php +++ b/htdocs/accountancy/report/result.php @@ -127,7 +127,6 @@ if (!empty($cats)) $position = -1; $code = -1; foreach($cpts as $i => $cpt){ - $var = ! $var; $position = $cpt['position']; $code = $cpt['code']; @@ -149,7 +148,7 @@ if (!empty($cats)) } $sommes[$code]['NP'] += $resultNP; $sommes[$code]['N'] += $resultN; - print ''; + print ''; print '' . $cpt['account_number'] . ''; print '' . $cpt['name_cpt'] . ''; print '' . price($resultNP) . ''; diff --git a/htdocs/accountancy/supplier/index.php b/htdocs/accountancy/supplier/index.php index a747342a508..2d36399c9b5 100644 --- a/htdocs/accountancy/supplier/index.php +++ b/htdocs/accountancy/supplier/index.php @@ -215,8 +215,7 @@ if ($resql) { while ( $row = $db->fetch_row($resql)) { - $var = ! $var; - print '' . length_accountg($row[0]) . ''; + print '' . length_accountg($row[0]) . ''; print '' . $row[1] . ''; for($i = 2; $i <= 12; $i ++) { print '' . price($row[$i]) . ''; @@ -270,8 +269,7 @@ if ($resql) { while ( $row = $db->fetch_row($resql)) { - $var = ! $var; - print '' . length_accountg($row[0]) . ''; + print '' . length_accountg($row[0]) . ''; print '' . $row[1] . ''; for($i = 2; $i <= 12; $i ++) { print '' . price($row[$i]) . ''; diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index 9b42337852c..beae148c01b 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -313,7 +313,6 @@ if ($result) { $var = true; while ( $i < min($num_lines, $limit) ) { $objp = $db->fetch_object($result); - $var = ! $var; // product_type: 0 = service ? 1 = product // if product does not exist we use the value of product_type provided in facturedet to define if this is a product or service @@ -355,7 +354,7 @@ if ($result) { // $objp->code_buy_p is now code of product/service // $objp->code_buy_l is now default code of product/service - print ''; + print ''; // Line id print '' . $objp->rowid . ''; From 06c91cdaf20f19baf5fcd86c0fab8b0cb804622d Mon Sep 17 00:00:00 2001 From: philippe grand Date: Tue, 11 Apr 2017 14:47:11 +0200 Subject: [PATCH 2/8] ref column was missing for specimen and some update --- htdocs/comm/propal/class/propal.class.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 3489860e1dd..9aad218e66f 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -7,7 +7,7 @@ * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2008 Raphael Bertrand * Copyright (C) 2010-2014 Juanjo Menent - * Copyright (C) 2010-2016 Philippe Grand + * Copyright (C) 2010-2017 Philippe Grand * Copyright (C) 2012-2014 Christophe Battarel * Copyright (C) 2012 Cedric Salvador * Copyright (C) 2013 Florian Henry @@ -3113,21 +3113,21 @@ class Propal extends CommonObject $line->qty=1; $line->subprice=100; $line->price=100; - $line->tva_tx=19.6; + $line->tva_tx=20; $line->localtax1_tx=0; $line->localtax2_tx=0; if ($xnbp == 2) { $line->total_ht=50; - $line->total_ttc=59.8; - $line->total_tva=9.8; + $line->total_ttc=60; + $line->total_tva=10; $line->remise_percent=50; } else { $line->total_ht=100; - $line->total_ttc=119.6; - $line->total_tva=19.6; + $line->total_ttc=120; + $line->total_tva=20; $line->remise_percent=00; } @@ -3135,6 +3135,7 @@ class Propal extends CommonObject { $prodid = mt_rand(1, $num_prods); $line->fk_product=$prodids[$prodid]; + $line->product_ref='SPECIMEN'; } $this->lines[$xnbp]=$line; From c3387cb4e64704e958d39320d27e76ddecea287e Mon Sep 17 00:00:00 2001 From: philippe grand Date: Tue, 11 Apr 2017 14:54:34 +0200 Subject: [PATCH 3/8] ref column was missing for specimen and some update --- htdocs/commande/class/commande.class.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index e87923beb8c..bf1f993bcdc 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3541,25 +3541,26 @@ class Commande extends CommonOrder $line->qty=1; $line->subprice=100; $line->price=100; - $line->tva_tx=19.6; + $line->tva_tx=20; if ($xnbp == 2) { $line->total_ht=50; - $line->total_ttc=59.8; - $line->total_tva=9.8; + $line->total_ttc=60; + $line->total_tva=10; $line->remise_percent=50; } else { $line->total_ht=100; - $line->total_ttc=119.6; - $line->total_tva=19.6; + $line->total_ttc=120; + $line->total_tva=20; $line->remise_percent=0; } if ($num_prods > 0) { $prodid = mt_rand(1, $num_prods); $line->fk_product=$prodids[$prodid]; + $line->product_ref='SPECIMEN'; } $this->lines[$xnbp]=$line; From b0f2d2310b106454fce2cc06a899df78c078c425 Mon Sep 17 00:00:00 2001 From: philippe grand Date: Wed, 12 Apr 2017 10:28:05 +0200 Subject: [PATCH 4/8] Update code using new css class --- htdocs/adherents/admin/adherent.php | 19 ++++++------------- htdocs/adherents/admin/public.php | 19 ++++++------------- htdocs/adherents/index.php | 17 ++++------------- htdocs/adherents/stats/byproperties.php | 4 +--- htdocs/adherents/stats/geo.php | 4 +--- htdocs/adherents/stats/index.php | 7 ++----- htdocs/adherents/subscription.php | 4 +--- htdocs/adherents/type.php | 8 ++------ 8 files changed, 23 insertions(+), 59 deletions(-) diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index 8e265eb70f7..2754c2d3690 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -125,15 +125,13 @@ print ''.$langs->trans("Description").''; print ''.$langs->trans("Value").''; print ''.$langs->trans("Action").''; print "\n"; -$var=true; // Login/Pass required for members -$var=!$var; print '
'; print ''; print ''; print ''; -print ''.$langs->trans("AdherentLoginRequired").''; +print ''.$langs->trans("AdherentLoginRequired").''; print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)?0:1),1); print ''; print ''; @@ -141,12 +139,11 @@ print "\n"; print '
'; // Mail required for members -$var=!$var; print '
'; print ''; print ''; print ''; -print ''.$langs->trans("AdherentMailRequired").''; +print ''.$langs->trans("AdherentMailRequired").''; print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_MAIL_REQUIRED)?$conf->global->ADHERENT_MAIL_REQUIRED:0),1); print ''; print ''; @@ -154,12 +151,11 @@ print "\n"; print '
'; // Send mail information is on by default -$var=!$var; print '
'; print ''; print ''; print ''; -print ''.$langs->trans("MemberSendInformationByMailByDefault").''; +print ''.$langs->trans("MemberSendInformationByMailByDefault").''; print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?$conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL:0),1); print ''; print ''; @@ -167,12 +163,11 @@ print "\n"; print '
'; // Insert subscription into bank account -$var=!$var; print '
'; print ''; print ''; print ''; -print ''.$langs->trans("MoreActionsOnSubscription").''; +print ''.$langs->trans("MoreActionsOnSubscription").''; $arraychoices=array('0'=>$langs->trans("None")); if (! empty($conf->banque->enabled)) $arraychoices['bankdirect']=$langs->trans("MoreActionBankDirect"); if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $arraychoices['invoiceonly']=$langs->trans("MoreActionInvoiceOnly"); @@ -188,12 +183,11 @@ print '
'; // Use vat for invoice creation if ($conf->facture->enabled) { - $var=!$var; print '
'; print ''; print ''; print ''; - print ''.$langs->trans("VATToUseForSubscriptions").''; + print ''.$langs->trans("VATToUseForSubscriptions").''; if (! empty($conf->banque->enabled)) { print ''; @@ -213,12 +207,11 @@ if ($conf->facture->enabled) if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { - $var=!$var; print ''; print ''; print ''; print ''; - print ''.$langs->trans("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS").''; + print ''.$langs->trans("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS").''; print ''; $form->select_produits($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS, 'constvalue_ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS'); print ''; diff --git a/htdocs/adherents/admin/public.php b/htdocs/adherents/admin/public.php index 47ad7a00a97..5c16a34793c 100644 --- a/htdocs/adherents/admin/public.php +++ b/htdocs/adherents/admin/public.php @@ -145,22 +145,19 @@ print ''; print ''.$langs->trans("Parameter").''; print ''.$langs->trans("Value").''; print "\n"; -$var=true; // Allow public form -$var=! $var; print ''; -print ''; +print ''; print $langs->trans("EnablePublicSubscriptionForm"); print ''; print $form->selectyesno("MEMBER_ENABLE_PUBLIC",(! empty($conf->global->MEMBER_ENABLE_PUBLIC)?$conf->global->MEMBER_ENABLE_PUBLIC:0),1); print "\n"; // Force Type -$var=! $var; $adht = new AdherentType($db); print ''; -print ''; +print ''; print $langs->trans("ForceMemberType"); print ''; $listofval = array(-1 => $langs->trans("Undefined")); @@ -170,18 +167,16 @@ print $form->selectarray("MEMBER_NEWFORM_FORCETYPE", $listofval, $forcetype, cou print "\n"; // Amount -$var=! $var; print ''; -print ''; +print ''; print $langs->trans("DefaultAmount"); print ''; print ''; print "\n"; // Can edit -$var=! $var; print ''; -print ''; +print ''; print $langs->trans("CanEditAmount"); print ''; print $form->selectyesno("MEMBER_NEWFORM_EDITAMOUNT",(! empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)?$conf->global->MEMBER_NEWFORM_EDITAMOUNT:0),1); @@ -190,8 +185,7 @@ print "\n"; if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled)) { // Jump to an online payment page - $var=! $var; - print ''; + print ''; print $langs->trans("MEMBER_NEWFORM_PAYONLINE"); print ''; $listofval=array(); @@ -204,8 +198,7 @@ if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled)) if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled)) { // Jump to an online payment page - $var=! $var; - print ''; + print ''; print $langs->trans("MEMBER_PAYONLINE_SENDEMAIL"); print ''; print ''; diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 9c1b0bb01e1..76368fc5673 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -246,8 +246,7 @@ $var=true; krsort($Total); foreach ($Total as $key=>$value) { - $var=!$var; - print ""; + print ''; print "$key"; print "".$Number[$key].""; print "".price($value).""; @@ -267,9 +266,6 @@ print "
\n"; print '
'; - -$var=true; - /* * Last modified members */ @@ -295,12 +291,10 @@ if ($resql) if ($num) { $i = 0; - $var = True; while ($i < $num) { - $var=!$var; $obj = $db->fetch_object($resql); - print ""; + print ''; $staticmember->id=$obj->rowid; $staticmember->lastname=$obj->lastname; $staticmember->firstname=$obj->firstname; @@ -358,12 +352,10 @@ if ($resql) if ($num) { $i = 0; - $var = True; while ($i < $num) { - $var=!$var; $obj = $db->fetch_object($resql); - print ""; + print ''; $subscriptionstatic->id=$obj->cid; $subscriptionstatic->ref=$obj->cid; $staticmember->id=$obj->rowid; @@ -407,8 +399,7 @@ print "\n"; foreach ($AdherentType as $key => $adhtype) { - $var=!$var; - print ""; + print ''; print ''.$adhtype->getNomUrl(1, dol_size(32)).''; print ''.(isset($MemberToValidate[$key]) && $MemberToValidate[$key] > 0?$MemberToValidate[$key]:'').' '.$staticmember->LibStatut(-1,$adhtype->subscription,0,3).''; print ''.(isset($MembersValidated[$key]) && ($MembersValidated[$key]-(isset($MemberUpToDate[$key])?$MemberUpToDate[$key]:0) > 0) ? $MembersValidated[$key]-(isset($MemberUpToDate[$key])?$MemberUpToDate[$key]:0):'').' '.$staticmember->LibStatut(1,$adhtype->subscription,0,3).''; diff --git a/htdocs/adherents/stats/byproperties.php b/htdocs/adherents/stats/byproperties.php index c717d20be84..6f896e186bb 100644 --- a/htdocs/adherents/stats/byproperties.php +++ b/htdocs/adherents/stats/byproperties.php @@ -127,12 +127,10 @@ if (! $foundphy) $data[]=array('label'=>'phy','nb'=>'0','lastdate'=>''); if (! $foundmor) $data[]=array('label'=>'mor','nb'=>'0','lastdate'=>''); $oldyear=0; -$var=true; foreach ($data as $val) { $year = $val['year']; - $var=!$var; - print ''; + print ''; print ''.$memberstatic->getmorphylib($val['label']).''; print ''.$val['nb'].''; print ''.dol_print_date($val['lastdate'],'dayhour').''; diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php index ae128d940e8..8e3d0862490 100644 --- a/htdocs/adherents/stats/geo.php +++ b/htdocs/adherents/stats/geo.php @@ -291,12 +291,10 @@ if ($mode) print ''; $oldyear=0; - $var=true; foreach ($data as $val) { $year = $val['year']; - $var=!$var; - print ''; + print ''; print ''.$val['label'].''; if ($label2) print ''.$val['label2'].''; print ''.$val['nb'].''; diff --git a/htdocs/adherents/stats/index.php b/htdocs/adherents/stats/index.php index aec8cd588f6..4126fc6e68c 100644 --- a/htdocs/adherents/stats/index.php +++ b/htdocs/adherents/stats/index.php @@ -176,15 +176,13 @@ print ''.$langs->trans("AmountAverage").''; print ''; $oldyear=0; -$var=true; foreach ($data as $val) { $year = $val['year']; while ($oldyear > $year+1) { // If we have empty year $oldyear--; - $var=!$var; - print ''; + print ''; print ''; print ''; print $oldyear; @@ -195,8 +193,7 @@ foreach ($data as $val) print '0'; print ''; } - $var=!$var; - print ''; + print ''; print ''; //print ''; print $year; diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 0c9c8467f1f..dc66e080f48 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -821,12 +821,10 @@ if ($rowid > 0) } print "\n"; - $var=True; while ($i < $num) { $objp = $db->fetch_object($result); - $var=!$var; - print ""; + print ''; $subscriptionstatic->ref=$objp->crowid; $subscriptionstatic->id=$objp->crowid; print ''.$subscriptionstatic->getNomUrl(1).''; diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 846b0dab7a9..ab6bfcc0704 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -206,12 +206,10 @@ if (! $rowid && $action != 'create' && $action != 'edit') print ' '; print "\n"; - $var=True; while ($i < $num) { $objp = $db->fetch_object($result); - $var=!$var; - print ""; + print ''; print ''.img_object($langs->trans("ShowType"),'group').' '.$objp->rowid.''; print ''.dol_escape_htmltag($objp->libelle).''; print ''.yn($objp->subscription).''; @@ -518,7 +516,6 @@ if ($rowid > 0) print "\n"; - $var=True; while ($i < $num && $i < $conf->liste_limit) { $objp = $db->fetch_object($resql); @@ -530,8 +527,7 @@ if ($rowid > 0) $adh->firstname=$objp->firstname; // Lastname - $var=!$var; - print ''; + print ''; if ($objp->societe != '') { print ''.img_object($langs->trans("ShowMember"),"user").' '.$adh->getFullName($langs,0,-1,20).' / '.dol_trunc($objp->societe,12).''."\n"; From edaa3ae67213b9bb41114756ee54c4a8daebb48c Mon Sep 17 00:00:00 2001 From: philippe grand Date: Wed, 12 Apr 2017 17:44:01 +0200 Subject: [PATCH 5/8] Update code using new css class --- htdocs/admin/menus/other.php | 4 +- htdocs/admin/system/browser.php | 28 +++---- htdocs/admin/system/constall.php | 7 +- htdocs/admin/system/database-tables.php | 12 +-- htdocs/admin/system/database.php | 4 +- htdocs/admin/system/dbtable.php | 4 +- htdocs/admin/system/dolibarr.php | 101 ++++++++---------------- 7 files changed, 49 insertions(+), 111 deletions(-) diff --git a/htdocs/admin/menus/other.php b/htdocs/admin/menus/other.php index 0a3cb6b99bc..7789c3fb21c 100644 --- a/htdocs/admin/menus/other.php +++ b/htdocs/admin/menus/other.php @@ -81,7 +81,6 @@ dol_fiche_head($head, 'misc', $langs->trans("Menus"), -1); // Other Options -$var=true; print ''; print ''; @@ -90,8 +89,7 @@ print ''; print ''; // Hide unauthorized menu -$var=!$var; -print ""; +print ''; print ''; print '"; + print ''; if ($newkey == 'separator') { print ''; @@ -233,14 +232,12 @@ if ($resql) { $num = $db->num_rows($resql); $i = 0; - $var=True; while ($i < $num) { $obj = $db->fetch_object($resql); - $var=!$var; - print ''; + print ''; print ''."\n"; print ''."\n"; if (empty($conf->multicompany->enabled) || !$user->entity) print ''."\n"; // If superadmin or multicompany disabled diff --git a/htdocs/admin/system/database-tables.php b/htdocs/admin/system/database-tables.php index 6e528c73094..b625b69d8ff 100644 --- a/htdocs/admin/system/database-tables.php +++ b/htdocs/admin/system/database-tables.php @@ -103,13 +103,11 @@ else if ($resql) { $num = $db->num_rows($resql); - $var=True; $i=0; while ($i < $num) { $obj = $db->fetch_object($resql); - $var=!$var; - print ""; + print ''; print ''; print ''; @@ -158,13 +156,10 @@ else if ($resql) { $num = $db->num_rows($resql); - $var=True; $i=0; while ($i < $num) { - $row = $db->fetch_row($resql); - $var=!$var; - print ""; + print ''; print ''; print ''; print ''; @@ -194,7 +189,6 @@ else if ($resql) { - $var=True; while ($row = $db->fetch_row($resql)) { $rescount = $db->query("SELECT COUNT(*) FROM " . $row[0]); @@ -205,7 +199,7 @@ else $count = '?'; } - print ""; + print ''; print ''; print ''; print ''; diff --git a/htdocs/admin/system/database.php b/htdocs/admin/system/database.php index c50e6ca9e4c..45ce3c087e6 100644 --- a/htdocs/admin/system/database.php +++ b/htdocs/admin/system/database.php @@ -100,11 +100,9 @@ else if ($listname == 'listofvars') $listtouse=$listofvars; if ($listname == 'listofstatus') $listtouse=$listofstatus; - $var=true; foreach($listtouse as $param => $paramval) { - $var=!$var; - print ''; + print ''; print ''; diff --git a/htdocs/admin/system/dbtable.php b/htdocs/admin/system/dbtable.php index 3fc10bb0f3f..2e7d5b3f8aa 100644 --- a/htdocs/admin/system/dbtable.php +++ b/htdocs/admin/system/dbtable.php @@ -106,13 +106,11 @@ else if ($resql) { $num = $db->num_rows($resql); - $var=True; $i=0; while ($i < $num) { $row = $db->fetch_row($resql); - $var=!$var; - print ""; + print ''; print ""; print ""; diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index 6a5384da69a..36260c0a228 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -68,12 +68,10 @@ llxHeader('', $title); print load_fiche_titre($title,'','title_setup'); // Version -$var=true; print '
'; print '
'.$langs->trans("Status").'
'.$langs->trans("HideUnauthorizedMenu").''; if (empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED)) diff --git a/htdocs/admin/system/browser.php b/htdocs/admin/system/browser.php index b2b5499d298..32d342df121 100644 --- a/htdocs/admin/system/browser.php +++ b/htdocs/admin/system/browser.php @@ -47,28 +47,18 @@ print load_fiche_titre($langs->trans("InfoBrowser"),'','title_setup'); $tmp=getBrowserInfo($_SERVER["HTTP_USER_AGENT"]); // Browser -$var=true; print '
'; print ''; print ''."\n"; -$var=!$var; -print ''."\n"; -$var=!$var; -print ''."\n"; -$var=!$var; -print ''."\n"; -$var=!$var; -print ''."\n"; -$var=!$var; -print ''."\n"; -$var=!$var; -print ''."\n"; -$var=!$var; -print ''."\n"; -$var=!$var; -print ''."\n"; -$var=!$var; -print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("UserAgent").''.$_SERVER['HTTP_USER_AGENT'].'
'.$langs->trans("BrowserName").''.$tmp['browsername'].'
'.$langs->trans("BrowserOS").''.$tmp['browseros'].'
'.$langs->trans("Version").''.$tmp['browserversion'].'
'.$langs->trans("Layout").' (phone/tablet/classic)'.$tmp['layout'].'
'.$langs->trans("IPAddress").''.$_SERVER['REMOTE_ADDR'].'
'.$langs->trans("SessionName").''.session_name().'
'.$langs->trans("SessionId").''.session_id().'
'.$langs->trans("Screen").''; +print '
'.$langs->trans("UserAgent").''.$_SERVER['HTTP_USER_AGENT'].'
'.$langs->trans("BrowserName").''.$tmp['browsername'].'
'.$langs->trans("BrowserOS").''.$tmp['browseros'].'
'.$langs->trans("Version").''.$tmp['browserversion'].'
'.$langs->trans("Layout").' (phone/tablet/classic)'.$tmp['layout'].'
'.$langs->trans("IPAddress").''.$_SERVER['REMOTE_ADDR'].'
'.$langs->trans("SessionName").''.session_name().'
'.$langs->trans("SessionId").''.session_id().'
'.$langs->trans("Screen").''; print $_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight']; print '
'; diff --git a/htdocs/admin/system/constall.php b/htdocs/admin/system/constall.php index 0fb3a6c9a7b..c7c7542ccaa 100644 --- a/htdocs/admin/system/constall.php +++ b/htdocs/admin/system/constall.php @@ -170,8 +170,7 @@ foreach($configfileparameters as $key) continue; } - $var=!$var; - print "
 
'.$obj->name.''.$obj->value.''.$obj->entity.'
'.$obj->Name.''.$obj->Engine.'
'.$row[0].''.$row[1].''.$row[2].'
'.$row[0].''.$count.'
'; print $param; print '
$row[0]$row[1]
'; print ''."\n"; -$var=!$var; -print ''."\n"; -$var=!$var; -print ''."\n"; -$var=!$var; -print ''."\n"; +print ''."\n"; +print ''."\n"; print '
'.$langs->trans("Version").''.$langs->trans("Value").'
'.$langs->trans("CurrentVersion").' ('.$langs->trans("Programs").')'.DOL_VERSION; +print '
'.$langs->trans("CurrentVersion").' ('.$langs->trans("Programs").')'.DOL_VERSION; // If current version differs from last upgrade if (empty($conf->global->MAIN_VERSION_LAST_UPGRADE)) { @@ -123,42 +121,31 @@ if (function_exists('curl_init')) } print '
'.$langs->trans("VersionLastUpgrade").' ('.$langs->trans("Database").')'.$conf->global->MAIN_VERSION_LAST_UPGRADE.'
'.$langs->trans("VersionLastInstall").''.$conf->global->MAIN_VERSION_LAST_INSTALL.'
'.$langs->trans("VersionLastUpgrade").' ('.$langs->trans("Database").')'.$conf->global->MAIN_VERSION_LAST_UPGRADE.'
'.$langs->trans("VersionLastInstall").''.$conf->global->MAIN_VERSION_LAST_INSTALL.'
'; print '
'; print '
'; // Session -$var=true; print '
'; print ''; print ''."\n"; -$var=!$var; -print ''."\n"; -$var=!$var; -print ''."\n"; -$var=!$var; -print ''."\n"; -$var=!$var; -print ''."\n"; +print ''."\n"; +print ''."\n"; +print '\n"; -$var=!$var; -print ''."\n"; -$var=!$var; -print ''."\n"; +print ''."\n"; -$var=!$var; -print ''."\n"; -$var=!$var; -print '"; + print ''; if (strpos($newkey, 'separator') !== false) { print ''; @@ -463,14 +428,12 @@ if ($resql) { $num = $db->num_rows($resql); $i = 0; - $var=True; while ($i < $num) { $obj = $db->fetch_object($resql); - $var=!$var; - print ''; + print ''; print ''."\n"; print ''."\n"; if (empty($conf->multicompany->enabled) || !$user->entity) print ''."\n"; // If superadmin or multicompany disabled From 1d546462dd31a558bd6f767eef9f48f48eab6267 Mon Sep 17 00:00:00 2001 From: philippe grand Date: Thu, 13 Apr 2017 15:59:51 +0200 Subject: [PATCH 6/8] Update code using new css class --- htdocs/admin/system/filecheck.php | 34 ++++++++++--------------------- htdocs/admin/system/modules.php | 3 +-- htdocs/admin/system/phpinfo.php | 9 +++----- 3 files changed, 15 insertions(+), 31 deletions(-) diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php index 62d0999170f..4d32e10b174 100644 --- a/htdocs/admin/system/filecheck.php +++ b/htdocs/admin/system/filecheck.php @@ -46,15 +46,11 @@ print load_fiche_titre($langs->trans("FileCheckDolibarr"),'','title_setup'); print $langs->trans("FileCheckDesc").'

'; // Version -$var = true; print '
'.$langs->trans("Session").''.$langs->trans("Value").'
'.$langs->trans("SessionSavePath").''.session_save_path().'
'.$langs->trans("SessionName").''.session_name().'
'.$langs->trans("SessionId").''.session_id().'
'.$langs->trans("CurrentSessionTimeOut").''.ini_get('session.gc_maxlifetime').' '.$langs->trans("seconds"); +print '
'.$langs->trans("SessionSavePath").''.session_save_path().'
'.$langs->trans("SessionName").''.session_name().'
'.$langs->trans("SessionId").''.session_id().'
'.$langs->trans("CurrentSessionTimeOut").''.ini_get('session.gc_maxlifetime').' '.$langs->trans("seconds"); print ''; print $form->textwithpicto('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor"))); print "
'.$langs->trans("CurrentTheme").''.$conf->theme.'
'.$langs->trans("CurrentMenuHandler").''; +print '
'.$langs->trans("CurrentTheme").''.$conf->theme.'
'.$langs->trans("CurrentMenuHandler").''; print $conf->standard_menu; print '
'.$langs->trans("Screen").''; +print '
'.$langs->trans("Screen").''; print $_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight']; print '
'.$langs->trans("Session").''; +print '
'.$langs->trans("Session").''; $i=0; foreach($_SESSION as $key => $val) { @@ -177,7 +164,6 @@ if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_S { $shmoparray=dol_listshmop(); - $var=true; print '
'; print ''; print ''; @@ -188,8 +174,7 @@ if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_S foreach($shmoparray as $key => $val) { - $var=!$var; - print ''; + print ''; print ''; print ''; print ''."\n"; @@ -202,44 +187,34 @@ if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_S // Localisation -$var=true; print '
'; print '
'.$key.'
'.$key.''.count($val).''.dol_getshmopaddress($key).'
'; print ''."\n"; -$var=!$var; -print ''."\n"; -$var=!$var; -print ''."\n"; +print ''."\n"; +print ''."\n"; // Thousands -$var=!$var; $thousand=$langs->transnoentitiesnoconv("SeparatorThousand"); if ($thousand == 'SeparatorThousand') $thousand=' '; // ' ' does not work on trans method if ($thousand == 'None') $thousand=''; -print ''."\n"; +print ''."\n"; // Decimals -$var=!$var; $dec=$langs->transnoentitiesnoconv("SeparatorDecimal"); -print ''."\n"; +print ''."\n"; // Show results of functions to see if everything works -$var=!$var; -print ''."\n"; -$var=!$var; -print "\n"; +print ''."\n"; +print '\n"; if (($thousand != ',' && $thousand != '.') || ($thousand != ' ')) { - $var=!$var; - print ""; + print '"; print "\n"; } -$var=!$var; -print ''."\n"; +print ''."\n"; // Timezone $txt =$langs->trans("OSTZ").' (variable system TZ): '.(! empty($_ENV["TZ"])?$_ENV["TZ"]:$langs->trans("NotDefined")).'
'."\n"; $txt.=$langs->trans("PHPTZ").' (php.ini date.timezone): '.(ini_get("date.timezone")?ini_get("date.timezone"):$langs->trans("NotDefined")).''."
\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php $txt.=$langs->trans("Dolibarr constant MAIN_SERVER_TZ").': '.(empty($conf->global->MAIN_SERVER_TZ)?$langs->trans("NotDefined"):$conf->global->MAIN_SERVER_TZ); //$txt.=$langs->trans("YouCanEditPHPTZ"); // deprecated -$var=!$var; -print ''."\n"; // value defined in http://fr3.php.net/manual/en/timezones.europe.php -$var=!$var; -print ''."\n"; -$var=!$var; -print ''; -$var=!$var; -print ''; -$var=!$var; -print ''; +print ''."\n"; +print ''; +print ''; +print ''; // Database timezone if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli') { - $var=!$var; - print ''."\n"; } // Client -$var=!$var; $tz=(int) $_SESSION['dol_tz'] + (int) $_SESSION['dol_dst']; -print ''."\n"; print ''."\n"; -$var=!$var; -print ''."\n"; +print ''."\n"; -$var=!$var; $filesystemencoding=ini_get("unicode.filesystem_encoding"); // Disponible avec PHP 6.0 -print ''."\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php +print ''."\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php -$var=!$var; $tmp=ini_get("unicode.filesystem_encoding"); // Disponible avec PHP 6.0 if (empty($tmp) && ! empty($_SERVER["WINDIR"])) $tmp='iso-8859-1'; // By default for windows if (empty($tmp)) $tmp='utf-8'; // By default for other if (! empty($conf->global->MAIN_FILESYSTEM_ENCODING)) $tmp=$conf->global->MAIN_FILESYSTEM_ENCODING; -print ''."\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php +print ''."\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php print '
'.$langs->trans("LocalisationDolibarrParameters").''.$langs->trans("Value").'
'.$langs->trans("LanguageBrowserParameter","HTTP_ACCEPT_LANGUAGE").''.$_SERVER["HTTP_ACCEPT_LANGUAGE"].'
'.$langs->trans("CurrentUserLanguage").''.$langs->getDefaultLang().'
'.$langs->trans("LanguageBrowserParameter","HTTP_ACCEPT_LANGUAGE").''.$_SERVER["HTTP_ACCEPT_LANGUAGE"].'
'.$langs->trans("CurrentUserLanguage").''.$langs->getDefaultLang().'
'.$langs->trans("CurrentValueSeparatorThousand").''.($thousand==' '?$langs->transnoentitiesnoconv("Space"):$thousand).'
'.$langs->trans("CurrentValueSeparatorThousand").''.($thousand==' '?$langs->transnoentitiesnoconv("Space"):$thousand).'
'.$langs->trans("CurrentValueSeparatorDecimal").''.$dec.'
'.$langs->trans("CurrentValueSeparatorDecimal").''.$dec.'
  => price2num(1233.56+1)'.price2num(1233.56+1,'2').'
  => price2num('."'1".$thousand."234".$dec."56')".price2num("1".$thousand."234".$dec."56",'2')."
  => price2num(1233.56+1)'.price2num(1233.56+1,'2').'
  => price2num('."'1".$thousand."234".$dec."56')".price2num("1".$thousand."234".$dec."56",'2')."
  => price2num('."'1 234.56')".price2num("1 234.56",'2')."
  => price2num('."'1 234.56')".price2num("1 234.56",'2')."
  => price(1234.56)'.price(1234.56).'
  => price(1234.56)'.price(1234.56).'
'.$langs->trans("CurrentTimeZone").''; // Timezone server PHP +print '
'.$langs->trans("CurrentTimeZone").''; // Timezone server PHP $a=getServerTimeZoneInt('now'); $b=getServerTimeZoneInt('winter'); $c=getServerTimeZoneInt('summer'); @@ -251,19 +226,14 @@ $val.='       '.getServerTimeZoneString(); $val.='       '.$langs->trans("DaylingSavingTime").': '.($daylight==='unknown'?'unknown':($a==$c?yn($daylight):yn(0).($daylight?'     ('.$langs->trans('YesInSummer').')':''))); print $form->textwithtooltip($val,$txt,2,1,img_info('')); print '
  => '.$langs->trans("CurrentHour").''.dol_print_date(dol_now(),'dayhour','tzserver').'
  => dol_print_date(0,"dayhourtext")'.dol_print_date(0,"dayhourtext").'
  => dol_get_first_day(1970,1,false)'.dol_get_first_day(1970,1,false).'     (=> dol_print_date() or idate() of this value = '.dol_print_date(dol_get_first_day(1970,1,false),'dayhour').')
  => dol_get_first_day(1970,1,true)'.dol_get_first_day(1970,1,true).'     (=> dol_print_date() or idate() of this value = '.dol_print_date(dol_get_first_day(1970,1,true),'dayhour').')
  => '.$langs->trans("CurrentHour").''.dol_print_date(dol_now(),'dayhour','tzserver').'
  => dol_print_date(0,"dayhourtext")'.dol_print_date(0,"dayhourtext").'
  => dol_get_first_day(1970,1,false)'.dol_get_first_day(1970,1,false).'     (=> dol_print_date() or idate() of this value = '.dol_print_date(dol_get_first_day(1970,1,false),'dayhour').')
  => dol_get_first_day(1970,1,true)'.dol_get_first_day(1970,1,true).'     (=> dol_print_date() or idate() of this value = '.dol_print_date(dol_get_first_day(1970,1,true),'dayhour').')
'.$langs->trans("MySQLTimeZone").' (database)'; // Timezone server base + print '
'.$langs->trans("MySQLTimeZone").' (database)'; // Timezone server base $sql="SHOW VARIABLES where variable_name = 'system_time_zone'"; $resql = $db->query($sql); if ($resql) @@ -274,9 +244,8 @@ if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli') print '
'.$langs->trans("ClientTZ").''.($tz?($tz>=0?'+':'').$tz:'').' ('.($tz>=0?'+':'').($tz*60*60).')'; +print '
'.$langs->trans("ClientTZ").''.($tz?($tz>=0?'+':'').$tz:'').' ('.($tz>=0?'+':'').($tz*60*60).')'; print '       '.$_SESSION['dol_tz_string']; print '       '.$langs->trans("DaylingSavingTime").': '; if ($_SESSION['dol_dst']>0) print yn(1); @@ -284,19 +253,16 @@ else print yn(0); if (! empty($_SESSION['dol_dst_first'])) print '     ('.dol_print_date(dol_stringtotime($_SESSION['dol_dst_first']),'dayhour','gmt').' - '.dol_print_date(dol_stringtotime($_SESSION['dol_dst_second']),'dayhour','gmt').')'; print '
  => '.$langs->trans("ClientHour").''.dol_print_date(dol_now(),'dayhour','tzuser').'
  => '.$langs->trans("ClientHour").''.dol_print_date(dol_now(),'dayhour','tzuser').'
'.$langs->trans("File encoding").' (php.ini unicode.filesystem_encoding)'.$filesystemencoding.'
'.$langs->trans("File encoding").' (php.ini unicode.filesystem_encoding)'.$filesystemencoding.'
  => '.$langs->trans("File encoding").''.$tmp.'
  => '.$langs->trans("File encoding").''.$tmp.'
'; print '
'; @@ -384,8 +350,7 @@ foreach($configfileparameters as $key => $value) } if (strpos($newkey, 'separator') !== false && $lastkeyshown == 'separator') continue; - $var=!$var; - print "
 
'.$obj->name.''.$obj->value.''.$obj->entity.'
'; print ''."\n"; -$var = ! $var; -print ''."\n"; -$var = ! $var; -print ''."\n"; -$var = ! $var; -print ''."\n"; +print ''."\n"; +print ''; $out.=''; $out.=''."\n"; - $var = true; $i = 0; foreach ($xml->dolibarr_constants[0]->constant as $constant) // $constant is a simpleXMLElement @@ -188,8 +183,7 @@ if ($xml) $checksumconcat[]=$valueforchecksum; $i++; - $var = !$var; - $out.=''; + $out.=''; $out.='' . "\n"; $out.='' . "\n"; $out.='' . "\n"; @@ -199,7 +193,7 @@ if ($xml) if ($i==0) { - $out.=''; + $out.=''; } $out.='
'.$langs->trans("Version").''.$langs->trans("Value").'
'.$langs->trans("VersionLastInstall").''.$conf->global->MAIN_VERSION_LAST_INSTALL.'
'.$langs->trans("VersionLastUpgrade").''.$conf->global->MAIN_VERSION_LAST_UPGRADE.'
'.$langs->trans("VersionProgram").''.DOL_VERSION; +print '
'.$langs->trans("VersionLastInstall").''.$conf->global->MAIN_VERSION_LAST_INSTALL.'
'.$langs->trans("VersionLastUpgrade").''.$conf->global->MAIN_VERSION_LAST_UPGRADE.'
'.$langs->trans("VersionProgram").''.DOL_VERSION; // If current version differs from last upgrade if (empty($conf->global->MAIN_VERSION_LAST_UPGRADE)) { // Compare version with last install database version (upgrades never occured) @@ -172,7 +168,6 @@ if ($xml) $out.='' . $langs->trans("ExpectedValue") . '' . $langs->trans("Value") . '
'.$i.''.$constname.''.$constvalue.'
'.$langs->trans("None").'
'.$langs->trans("None").'
'; @@ -239,7 +233,6 @@ if ($xml) $out.='' . $langs->trans("Filename") . ''; $out.='' . $langs->trans("ExpectedChecksum") . ''; $out.=''."\n"; - $var = true; $tmpfilelist = dol_sort_array($file_list['missing'], 'filename'); if (is_array($tmpfilelist) && count($tmpfilelist)) { @@ -247,8 +240,7 @@ if ($xml) foreach ($tmpfilelist as $file) { $i++; - $var = !$var; - $out.=''; + $out.=''; $out.=''.$i.'' . "\n"; $out.=''.$file['filename'].'' . "\n"; $out.=''.$file['expectedmd5'].'' . "\n"; @@ -257,7 +249,7 @@ if ($xml) } else { - $out.=''.$langs->trans("None").''; + $out.=''.$langs->trans("None").''; } $out.=''; @@ -276,7 +268,6 @@ if ($xml) $out.='' . $langs->trans("Size") . ''; $out.='' . $langs->trans("DateModification") . ''; $out.=''."\n"; - $var = true; $tmpfilelist2 = dol_sort_array($file_list['updated'], 'filename'); if (is_array($tmpfilelist2) && count($tmpfilelist2)) { @@ -284,8 +275,7 @@ if ($xml) foreach ($tmpfilelist2 as $file) { $i++; - $var = !$var; - $out.=''; + $out.=''; $out.=''.$i.'' . "\n"; $out.=''.$file['filename'].'' . "\n"; $out.=''.$file['expectedmd5'].'' . "\n"; @@ -307,7 +297,7 @@ if ($xml) } else { - $out.=''.$langs->trans("None").''; + $out.=''.$langs->trans("None").''; } $out.=''; @@ -326,7 +316,6 @@ if ($xml) $out.='' . $langs->trans("Size") . ''; $out.='' . $langs->trans("DateModification") . ''; $out.=''."\n"; - $var = true; $tmpfilelist3 = dol_sort_array($file_list['added'], 'filename'); if (is_array($tmpfilelist3) && count($tmpfilelist3)) { @@ -334,8 +323,7 @@ if ($xml) foreach ($tmpfilelist3 as $file) { $i++; - $var = !$var; - $out.=''; + $out.=''; $out.=''.$i.'' . "\n"; $out.=''.$file['filename'].'' . "\n"; $out.=''.$file['expectedmd5'].'' . "\n"; @@ -357,7 +345,7 @@ if ($xml) } else { - $out.=''.$langs->trans("None").''; + $out.=''.$langs->trans("None").''; } $out.=''; diff --git a/htdocs/admin/system/modules.php b/htdocs/admin/system/modules.php index 706e0215059..4a6967089e2 100644 --- a/htdocs/admin/system/modules.php +++ b/htdocs/admin/system/modules.php @@ -118,9 +118,8 @@ $rights_ids = array(); foreach($sortorder as $numero=>$name) { $idperms=""; - $var=!$var; // Module - print "'; + print ''; $alt=$name.' - '.$modules_files[$numero]; if (! empty($picto[$numero])) { diff --git a/htdocs/admin/system/phpinfo.php b/htdocs/admin/system/phpinfo.php index 3e9ccbc895f..8664a28b28a 100644 --- a/htdocs/admin/system/phpinfo.php +++ b/htdocs/admin/system/phpinfo.php @@ -57,7 +57,7 @@ $var=false; // Recupere la version de PHP $phpversion=version_php(); -print "'.$langs->trans("Version")."".$phpversion."\n"; +print ''.$langs->trans("Version")."".$phpversion."\n"; print ''; print '
'; @@ -76,14 +76,12 @@ foreach($phparray as $key => $value) print ''.$langs->trans("Value").''; print "\n"; - $var=true; //var_dump($value); foreach($value as $keyparam => $keyvalue) { if (! is_array($keyvalue)) { - $var=!$var; - print ''; + print ''; print ''.$keyparam.''; $valtoshow=$keyvalue; if ($keyparam == 'X-ChromePhp-Data') $valtoshow=dol_trunc($keyvalue,80); @@ -97,8 +95,7 @@ foreach($phparray as $key => $value) } else { - $var=!$var; - print ''; + print ''; print ''.$keyparam.''; $i=0; foreach($keyvalue as $keyparam2 => $keyvalue2) From 04e119d7a67e9b679a9fedbb6977e405a4e00964 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Tue, 18 Apr 2017 07:03:57 +0200 Subject: [PATCH 7/8] New : Add search of accountancy code in main thirdparty search --- htdocs/societe/list.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 1799fadf9bd..ef162beb750 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -118,7 +118,9 @@ $fieldstosearchall = array( 's.nom'=>"ThirdPartyName", 's.name_alias'=>"AliasNameShort", 's.code_client'=>"CustomerCode", - "s.code_fournisseur"=>"SupplierCode", + 's.code_fournisseur'=>"SupplierCode", + 's.code_compta'=>"CustomerAccountancyCodeShort", + 's.code_compta_fournisseur'=>"SupplierAccountancyCodeShort", 's.email'=>"EMail", 's.url'=>"URL", 's.tva_intra'=>"VATIntra", From 529ae1fa92b4da7f3baae2cc3a13bfdb4f8f1dc4 Mon Sep 17 00:00:00 2001 From: Philippe Grand Date: Wed, 19 Apr 2017 10:01:43 +0200 Subject: [PATCH 8/8] Update propal.class.php --- htdocs/comm/propal/class/propal.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 9aad218e66f..46c6a55cf2f 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -3135,7 +3135,7 @@ class Propal extends CommonObject { $prodid = mt_rand(1, $num_prods); $line->fk_product=$prodids[$prodid]; - $line->product_ref='SPECIMEN'; + $line->product_ref='SPECIMEN'; } $this->lines[$xnbp]=$line;