diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index 3f794491566..4813d742ad5 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -32,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php' require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/paymentsocialcontribution.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->load("compta"); $langs->load("bills"); @@ -45,6 +46,8 @@ $year=GETPOST("year",'int'); $filtre=GETPOST("filtre",'alpha'); if (! $year && $mode != 'sconly') { $year=date("Y", time()); } +$search_account = GETPOST('search_account','int'); + $limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); @@ -65,6 +68,7 @@ $tva_static = new Tva($db); $socialcontrib=new ChargeSociales($db); $payment_sc_static=new PaymentSocialContribution($db); $sal_static = new PaymentSalary($db); +$accountstatic = new Account($db); llxHeader('',$langs->trans("SpecialExpensesArea")); @@ -122,17 +126,21 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) print_liste_field_titre($langs->trans("RefPayment"),$_SERVER["PHP_SELF"],"pc.rowid","",$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DatePayment"),$_SERVER["PHP_SELF"],"pc.datep","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"pct.code","",$param,'',$sortfield,$sortorder); + if (! empty($conf->banque->enabled)) print_liste_field_titre($langs->trans("Account"),$_SERVER["PHP_SELF"],"ba.label","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("PayedByThisPayment"),$_SERVER["PHP_SELF"],"pc.amount","",$param,'align="right"',$sortfield,$sortorder); print "\n"; $sql = "SELECT c.id, c.libelle as lib,"; $sql.= " cs.rowid, cs.libelle, cs.fk_type as type, cs.periode, cs.date_ech, cs.amount as total,"; - $sql.= " pc.rowid as pid, pc.datep, pc.amount as totalpaye, pc.num_paiement as num_payment,"; - $sql.= " pct.code as payment_code"; + $sql.= " pc.rowid as pid, pc.datep, pc.amount as totalpaye, pc.num_paiement as num_payment, pc.fk_bank,"; + $sql.= " pct.code as payment_code,"; + $sql.= " ba.rowid as bid, ba.label as blabel"; $sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c,"; $sql.= " ".MAIN_DB_PREFIX."chargesociales as cs"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiementcharge as pc ON pc.fk_charge = cs.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pct ON pc.fk_typepaiement = pct.id"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON pc.fk_bank = b.rowid"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid"; $sql.= " WHERE cs.fk_type = c.id"; $sql.= " AND cs.entity = ".$conf->entity; if ($year > 0) @@ -189,6 +197,20 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) print ''; if ($obj->payment_code) print $langs->trans("PaymentTypeShort".$obj->payment_code).' '; print $obj->num_payment.''; + // Account + if (! empty($conf->banque->enabled)) + { + print ''; + if ($obj->fk_bank > 0) + { + //$accountstatic->fetch($obj->fk_bank); + $accountstatic->id=$obj->bid; + $accountstatic->label=$obj->blabel; + print $accountstatic->getNomUrl(1); + } + else print ' '; + print ''; + } // Paid print ''; if ($obj->totalpaye) print price($obj->totalpaye); @@ -205,6 +227,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) print ' '; print ' '; print ' '; + if (! empty($conf->banque->enabled)) print ''; print ''.price($totalpaye).""; print ""; } diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index e230d91e6ae..17882e76a6a 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -229,7 +229,10 @@ if ($resql) print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"c.libelle","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Numero"),$_SERVER["PHP_SELF"],"p.num_paiement","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Account"),$_SERVER["PHP_SELF"],"ba.label","",$param,"",$sortfield,$sortorder); + if (! empty($conf->banque->enabled)) + { + print_liste_field_titre($langs->trans("Account"),$_SERVER["PHP_SELF"],"ba.label","",$param,"",$sortfield,$sortorder); + } print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"p.amount","",$param,'align="right"',$sortfield,$sortorder); //print_liste_field_titre($langs->trans("Invoices"),"","","",$param,'align="left"',$sortfield,$sortorder); @@ -260,9 +263,12 @@ if ($resql) print ''; print ''; print ''; - print ''; - $form->select_comptes($search_account,'search_account',0,'',1); - print ''; + if (! empty($conf->banque->enabled)) + { + print ''; + $form->select_comptes($search_account,'search_account',0,'',1); + print ''; + } print ''; print ''; print ''; @@ -309,16 +315,21 @@ if ($resql) // Payment number print ''.$objp->num_paiement.''; - - print ''; - if ($objp->bid) - { - $accountstatic->id=$objp->bid; - $accountstatic->label=$objp->label; - print $accountstatic->getNomUrl(1); - } - else print ' '; - print ''; + + // Account + if (! empty($conf->banque->enabled)) + { + print ''; + if ($objp->bid) + { + $accountstatic->id=$objp->bid; + $accountstatic->label=$objp->label; + print $accountstatic->getNomUrl(1); + } + else print ' '; + print ''; + } + // Amount print ''.price($objp->amount).''; if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) diff --git a/htdocs/compta/payment_sc/card.php b/htdocs/compta/payment_sc/card.php index ad59687b43c..aa0c89aa3ba 100644 --- a/htdocs/compta/payment_sc/card.php +++ b/htdocs/compta/payment_sc/card.php @@ -162,25 +162,25 @@ if ($action == 'valide') print ''; // Ref -print ''; +print ''; print ''; // Date -print ''; +print ''; // Mode -print ''; +print ''; // Numero -print ''; +print ''; // Montant -print ''; +print ''; // Note -print ''; +print ''; // Bank account if (! empty($conf->banque->enabled)) @@ -278,7 +278,7 @@ else dol_print_error($db); } -print ''; +dol_fiche_end(); /* diff --git a/htdocs/compta/salaries/index.php b/htdocs/compta/salaries/index.php index f279e97b478..d01954002c4 100644 --- a/htdocs/compta/salaries/index.php +++ b/htdocs/compta/salaries/index.php @@ -25,6 +25,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->load("compta"); $langs->load("salaries"); @@ -40,6 +41,8 @@ $search_ref = GETPOST('search_ref','int'); $search_user = GETPOST('search_user','alpha'); $search_label = GETPOST('search_label','alpha'); $search_amount = GETPOST('search_amount','alpha'); +$search_account = GETPOST('search_account','int'); + $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); @@ -68,11 +71,12 @@ else $typeid=$_REQUEST['typeid']; } -if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers { $search_ref=""; $search_label=""; $search_amount=""; + $search_account=''; $typeid=""; } @@ -85,12 +89,16 @@ llxHeader(); $form = new Form($db); $salstatic = new PaymentSalary($db); $userstatic = new User($db); +$accountstatic = new Account($db); $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.admin, u.salary as current_salary, u.fk_soc as fk_soc,"; -$sql.= " s.rowid, s.fk_user, s.amount, s.salary, s.label, s.datep as datep, s.datev as datev, s.fk_typepayment as type, s.num_payment,"; +$sql.= " s.rowid, s.fk_user, s.amount, s.salary, s.label, s.datep as datep, s.datev as datev, s.fk_typepayment as type, s.num_payment, s.fk_bank,"; +$sql.= " ba.rowid as bid, ba.label as blabel,"; $sql.= " pst.code as payment_code"; $sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as s"; -$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pst ON s.fk_typepayment = pst.id,"; +$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pst ON s.fk_typepayment = pst.id"; +$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON s.fk_bank = b.rowid"; +$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid,"; $sql.= " ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE u.rowid = s.fk_user"; $sql.= " AND s.entity = ".$conf->entity; @@ -100,6 +108,7 @@ if ($search_ref) $sql.=" AND s.rowid=".$search_ref; if ($search_user) $sql.=natural_search(array('u.login', 'u.lastname', 'u.firstname', 'u.email', 'u.note'), $search_user); if ($search_label) $sql.=natural_search(array('s.label'), $search_label); if ($search_amount) $sql.=natural_search("s.amount", $search_amount, 1); +if ($search_account > 0) $sql .=" AND b.fk_account=".$search_account; if ($filtre) { $filtre=str_replace(":","=",$filtre); $sql .= " AND ".$filtre; @@ -150,6 +159,7 @@ if ($result) print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"s.label","",$param,'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DatePayment"),$_SERVER["PHP_SELF"],"s.datep","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("PaymentMode"),$_SERVER["PHP_SELF"],"type","",$param,'align="left"',$sortfield,$sortorder); + if (! empty($conf->banque->enabled)) print_liste_field_titre($langs->trans("Account"),$_SERVER["PHP_SELF"],"ba.label","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("PayedByThisPayment"),$_SERVER["PHP_SELF"],"s.amount","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch '); print "\n"; @@ -173,6 +183,13 @@ if ($result) print ''; + // Account + if (! empty($conf->banque->enabled)) + { + print ''; + } // Amount print ''; @@ -210,7 +227,21 @@ if ($result) print '\n"; // Type print ''; - // Amount + // Account + if (! empty($conf->banque->enabled)) + { + print ''; + } + // Amount print ""; print ""; print "\n"; @@ -220,7 +251,9 @@ if ($result) $i++; } - print ''; + $colspan=6; + if (! empty($conf->banque->enabled)) $colspan++; + print ''; print '"; print ""; diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index eb887054151..fb2edc5c4d1 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2015 Alexandre Spangaro * @@ -266,19 +266,19 @@ if ($action == 'create') print ''; + } - // Type payment - print '\n"; - print ""; - - // Number - print ''."\n"; - } - + // Type payment + print '\n"; + print ""; + + // Number + print ''."\n"; + // Other attributes $parameters=array('colspan' => ' colspan="1"'); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook diff --git a/htdocs/compta/tva/reglement.php b/htdocs/compta/tva/reglement.php index 5484be65a32..d5bcbeeb06a 100644 --- a/htdocs/compta/tva/reglement.php +++ b/htdocs/compta/tva/reglement.php @@ -26,6 +26,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; @@ -40,6 +41,7 @@ $result = restrictedArea($user, 'tax', '', '', 'charges'); $search_ref = GETPOST('search_ref','int'); $search_label = GETPOST('search_label','alpha'); $search_amount = GETPOST('search_amount','alpha'); +$search_account = GETPOST('search_account','int'); $month = GETPOST("month","int"); $year = GETPOST("year","int"); @@ -71,16 +73,18 @@ else $typeid=$_REQUEST['typeid']; } -if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_label=""; $search_amount=""; + $search_account=''; $year=""; $month=""; $typeid=""; } + /* * View */ @@ -90,14 +94,19 @@ llxHeader(); $form = new Form($db); $formother=new FormOther($db); $tva_static = new Tva($db); +$accountstatic = new Account($db); -$sql = "SELECT t.rowid, t.amount, t.label, t.datev as dv, t.datep as dp, t.fk_typepayment as type, t.num_payment, pst.code as payment_code"; +$sql = "SELECT t.rowid, t.amount, t.label, t.datev as dv, t.datep as dp, t.fk_typepayment as type, t.num_payment, t.fk_bank, pst.code as payment_code,"; +$sql.= " ba.rowid as bid, ba.label as blabel"; $sql.= " FROM ".MAIN_DB_PREFIX."tva as t"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pst ON t.fk_typepayment = pst.id"; +$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON t.fk_bank = b.rowid"; +$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid"; $sql.= " WHERE t.entity = ".$conf->entity; if ($search_ref) $sql.=" AND t.rowid=".$search_ref; if ($search_label) $sql.=" AND t.label LIKE '%".$db->escape($search_label)."%'"; if ($search_amount) $sql.=" AND t.amount='".$db->escape(price2num(trim($search_amount)))."'"; +if ($search_account > 0) $sql .=" AND b.fk_account=".$search_account; if ($month > 0) { if ($year > 0) @@ -155,8 +164,9 @@ if ($result) print_liste_field_titre($langs->trans("DateValue"),$_SERVER["PHP_SELF"],"dv","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DatePayment"),$_SERVER["PHP_SELF"],"dp","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"type","",$param,'align="left"',$sortfield,$sortorder); + if (! empty($conf->banque->enabled)) print_liste_field_titre($langs->trans("Account"),$_SERVER["PHP_SELF"],"ba.label","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("PayedByThisPayment"),$_SERVER["PHP_SELF"],"t.amount","",$param,'align="right"',$sortfield,$sortorder); - print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch '); + print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch '); print "\n"; print ''; @@ -172,8 +182,14 @@ if ($result) print ''; + // Account + if (! empty($conf->banque->enabled)) + { + print ''; + } print ''; - print '\n"; // Type print $type; + // Account + if (! empty($conf->banque->enabled)) + { + print ''; + } // Amount $total = $total + $obj->amount; print ""; - print ""; + print ""; print "\n"; $i++; } - print ''; + + $colspan=5; + if (! empty($conf->banque->enabled)) $colspan++; + print ''; print ""; print ""; diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index cd0c934ead2..9e0bf8a022d 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -30,6 +30,7 @@ require ("../main.inc.php"); require_once (DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php"); require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; $langs->load("contracts"); $langs->load("products"); @@ -45,6 +46,9 @@ $socid=GETPOST('socid'); $search_user=GETPOST('search_user','int'); $search_sale=GETPOST('search_sale','int'); $search_product_category=GETPOST('search_product_category','int'); +$day=GETPOST("day","int"); +$year=GETPOST("year","int"); +$month=GETPOST("month","int"); $optioncss = GETPOST('optioncss','alpha'); @@ -117,6 +121,9 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP $sall=""; $search_status=""; $search_array_options=array(); + $day=''; + $month=''; + $year=''; } @@ -154,23 +161,27 @@ $sql.= ' AND c.entity IN ('.getEntity('contract', 1).')'; if ($search_product_category > 0) $sql.=" AND cp.fk_categorie = ".$search_product_category; if ($socid) $sql.= " AND s.rowid = ".$db->escape($socid); if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - -if ($search_name) { - $sql .= natural_search('s.nom', $search_name); +if ($month > 0) +{ + if ($year > 0 && empty($day)) + $sql.= " AND c.date_contrat BETWEEN '".$db->idate(dol_get_first_day($year,$month,false))."' AND '".$db->idate(dol_get_last_day($year,$month,false))."'"; + else if ($year > 0 && ! empty($day)) + $sql.= " AND c.date_contrat BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."'"; + else + $sql.= " AND date_format(c.date_contrat, '%m') = '".$month."'"; } -if ($search_contract) { - $sql .= natural_search(array('c.rowid', 'c.ref'), $search_contract); -} -if (!empty($search_ref_supplier)) { - $sql .= natural_search(array('c.ref_supplier'), $search_ref_supplier); +else if ($year > 0) +{ + $sql.= " AND c.date_contrat BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; } +if ($search_name) $sql .= natural_search('s.nom', $search_name); +if ($search_contract) $sql .= natural_search(array('c.rowid', 'c.ref'), $search_contract); +if (!empty($search_ref_supplier)) $sql .= natural_search(array('c.ref_supplier'), $search_ref_supplier); if ($search_sale > 0) { $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$search_sale; } -if ($sall) { - $sql .= natural_search(array_keys($fieldstosearchall), $sall); -} +if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall); if ($search_user > 0) $sql.= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='contrat' AND tc.source='internal' AND ec.element_id = c.rowid AND ec.fk_socpeople = ".$search_user; $sql.= " GROUP BY c.rowid, c.ref, c.datec, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier, s.nom, s.rowid"; $totalnboflines=0; @@ -292,8 +303,17 @@ if ($resql) print ''; - print ''; - print ''; + print ''; + // Date contract + print ''; + print ''; print ''; - print ''; + print ''; //print ''; print ''; print ''; diff --git a/htdocs/core/boxes/modules_boxes.php b/htdocs/core/boxes/modules_boxes.php index 238aa8ab438..17079618bf0 100644 --- a/htdocs/core/boxes/modules_boxes.php +++ b/htdocs/core/boxes/modules_boxes.php @@ -253,7 +253,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" $out.= ' '; if (! empty($head['sublink'])) $out.= ''; if (! empty($head['subpicto'])) $out.= img_picto($head['subtext'], $head['subpicto'], 'class="'.(empty($head['subclass'])?'':$head['subclass']).'" id="idsubimg'.$this->boxcode.'"'); - if (! empty($head['sublink'])) ''; + if (! empty($head['sublink'])) $out.= ''; if (! empty($conf->use_javascript_ajax)) { $out.= '
'.$langs->trans('Ref').'
'.$langs->trans('Ref').''; print $form->showrefnav($paiement,'id','',1,'rowid','id'); print '
'.$langs->trans('Date').''.dol_print_date($paiement->datep,'day').'
'.$langs->trans('Date').''.dol_print_date($paiement->datep,'day').'
'.$langs->trans('Mode').''.$langs->trans("PaymentType".$paiement->type_code).'
'.$langs->trans('Mode').''.$langs->trans("PaymentType".$paiement->type_code).'
'.$langs->trans('Numero').''.$paiement->num_paiement.'
'.$langs->trans('Numero').''.$paiement->num_paiement.'
'.$langs->trans('Amount').''.price($paiement->amount, 0, $outputlangs, 1, -1, -1, $conf->currency).'
'.$langs->trans('Amount').''.price($paiement->amount, 0, $outputlangs, 1, -1, -1, $conf->currency).'
'.$langs->trans('Note').''.nl2br($paiement->note).'
'.$langs->trans('Note').''.nl2br($paiement->note).'
'; $form->select_types_paiements($typeid,'typeid','',0,0,1,16); print ''; + $form->select_comptes($search_account,'search_account',0,'',1); + print ''.dol_print_date($db->jdate($obj->datep),'day')."'.$langs->trans("PaymentTypeShort".$obj->payment_code).' '.$obj->num_payment.''; + if ($obj->fk_bank > 0) + { + //$accountstatic->fetch($obj->fk_bank); + $accountstatic->id=$obj->bid; + $accountstatic->label=$obj->blabel; + print $accountstatic->getNomUrl(1); + } + else print ' '; + print '".price($obj->amount)."
'.$langs->trans("Total").'
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("Account").''; $form->select_comptes($_POST["accountid"],"accountid",0,"courant=1",1); // Affiche liste des comptes courant print '
'.$langs->trans("PaymentMode").''; - $form->select_types_paiements(GETPOST("type_payment"), "type_payment"); - print "
'.$langs->trans('Numero'); - print ' ('.$langs->trans("ChequeOrTransferNumber").')'; - print '
'.$langs->trans("PaymentMode").''; + $form->select_types_paiements(GETPOST("type_payment"), "type_payment"); + print "
'.$langs->trans('Numero'); + print ' ('.$langs->trans("ChequeOrTransferNumber").')'; + print '
'; $form->select_types_paiements($typeid,'typeid','',0,0,1,16); print ''; + $form->select_comptes($search_account,'search_account',0,'',1); + print ''; $searchpitco=$form->showFilterAndCheckAddButtons(0); print $searchpitco; @@ -204,15 +220,32 @@ if ($result) print ''.dol_print_date($db->jdate($obj->dp),'day')."'; + if ($obj->fk_bank > 0) + { + //$accountstatic->fetch($obj->fk_bank); + $accountstatic->id=$obj->bid; + $accountstatic->label=$obj->blabel; + print $accountstatic->getNomUrl(1); + } + else print ' '; + print '".price($obj->amount)."  
'.$langs->trans("Total").'
'.$langs->trans("Total").'".price($total)." 
'; print ''; print ' '; + //print $langs->trans('Month').': '; + if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; + print ''; + //print ' '.$langs->trans('Year').': '; + $syear = $year; + $formother->select_year($syear,'year',1, 20, 5); + print ''; $searchpitco=$form->showFilterAndCheckAddButtons(0); print $searchpitco; @@ -358,7 +378,7 @@ if ($resql) print ''.dol_print_date($db->jdate($obj->date_contrat)).''.dol_print_date($db->jdate($obj->date_contrat), 'day').''.$staticcontrat->LibStatut($obj->statut,3).''.($obj->nb_initial>0?$obj->nb_initial:'').''.($obj->nb_running>0?$obj->nb_running:'').''; diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 2a1d5f5fdaa..26ddd33f0a2 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -1030,7 +1030,7 @@ class FormOther $selectboxlist.=''; $selectboxlist.=''; $selectboxlist.=''; - $selectboxlist.=Form::selectarray('boxcombo', $arrayboxtoactivatelabel, '', $langs->trans("ChooseBoxToAdd").'...', 0, 0, '', 0, 0, 0, 'ASC', 'maxwidth200onsmartphone', 0, ' disabled hidden selected'); + $selectboxlist.=Form::selectarray('boxcombo', $arrayboxtoactivatelabel, '', $langs->trans("ChooseBoxToAdd").'...', 0, 0, '', 0, 0, 0, 'ASC', 'maxwidth150onsmartphone', 0, ' disabled hidden selected'); if (empty($conf->use_javascript_ajax)) $selectboxlist.=' '; $selectboxlist.=''; } diff --git a/htdocs/core/modules/modHRM.class.php b/htdocs/core/modules/modHRM.class.php index 174158ac7e2..f370c78b25e 100644 --- a/htdocs/core/modules/modHRM.class.php +++ b/htdocs/core/modules/modHRM.class.php @@ -44,13 +44,13 @@ class modHRM extends DolibarrModules $this->family = "hr"; // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) - $this->name = preg_replace ( '/^mod/i', '', get_class ( $this ) ); - $this->description = "Gestion des ressources humaines"; + $this->name = preg_replace( '/^mod/i', '', get_class($this)); + $this->description = "Management of employees carrier and feelings"; // Possible values for version are: 'development', 'experimental', 'dolibarr' or version $this->version = 'development'; - $this->const_name = 'MAIN_MODULE_' . strtoupper ( $this->name ); + $this->const_name = 'MAIN_MODULE_' . strtoupper($this->name); $this->special = 0; // $this->picto = ''; diff --git a/htdocs/core/modules/printing/printgcp.modules.php b/htdocs/core/modules/printing/printgcp.modules.php index 27b0e0f779c..f0e12f33610 100644 --- a/htdocs/core/modules/printing/printgcp.modules.php +++ b/htdocs/core/modules/printing/printgcp.modules.php @@ -57,7 +57,7 @@ class printing_printgcp extends PrintingDriver */ function __construct($db) { - global $conf, $dolibarr_main_url_root; + global $conf, $langs, $dolibarr_main_url_root; // Define $urlwithroot $urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root)); @@ -66,7 +66,7 @@ class printing_printgcp extends PrintingDriver $this->db = $db; if (!$conf->oauth->enabled) { - $this->conf[] = array('varname'=>'PRINTGCP_INFO', 'info'=>'ModuleAuthNotActive', 'type'=>'info'); + $this->conf[] = array('varname'=>'PRINTGCP_INFO', 'info'=>$langs->transnoentitiesnoconv("WarningModuleNotActive", "OAuth"), 'type'=>'info'); } else { $this->google_id = $conf->global->OAUTH_GOOGLE_ID; diff --git a/htdocs/langs/en_US/boxes.lang b/htdocs/langs/en_US/boxes.lang index 2e85ba36f1f..0cd7cac6a6b 100644 --- a/htdocs/langs/en_US/boxes.lang +++ b/htdocs/langs/en_US/boxes.lang @@ -81,4 +81,4 @@ ForCustomersInvoices=Customers invoices ForCustomersOrders=Customers orders ForProposals=Proposals LastXMonthRolling=The latest %s month rolling -ChooseBoxToAdd=Add widget to your dashboard... +ChooseBoxToAdd=Add widget to your dashboard diff --git a/htdocs/langs/en_US/multicurrency.lang b/htdocs/langs/en_US/multicurrency.lang index b75942ebb44..10d84a5edc6 100644 --- a/htdocs/langs/en_US/multicurrency.lang +++ b/htdocs/langs/en_US/multicurrency.lang @@ -1,4 +1,5 @@ -# ADMIN +# Dolibarr language file - Source file is en_US - multicurrency +MultiCurrency=Multi currency ErrorAddRateFail=Error in added rate ErrorAddCurrencyFail=Error in added currency ErrorDeleteCurrencyFail=Error delete fail diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index 1dd8fc461e0..e50193d8d51 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -90,7 +90,7 @@ if (empty($reshook)) 'mailmanspip','notification','oauth','syslog','user','webservices', // Extended modules 'memcached','numberwords','zipautofillfr'); - $alwayshiddenuncheckedmodules=array('ftp','webservicesclient','websites', + $alwayshiddenuncheckedmodules=array('ftp','hrm','webservicesclient','websites', // Extended modules 'awstats','bittorrent','bootstrap','cabinetmed','cmcic','concatpdf','customfield','deplacement','dolicloud','filemanager','lightbox','mantis','monitoring','moretemplates','multicompany','nltechno','numberingpack','openstreetmap', 'ovh','phenix','phpsysinfo','pibarcode','postnuke','selectbank','skincoloreditor','submiteverywhere','survey','thomsonphonebook','topten','tvacerfa','voyage','webcalendar','webmail'); @@ -375,8 +375,11 @@ foreach ($demoprofiles as $profilearray) $listofdisabledmodules=explode(',',$profilearray['disablemodules']); $j=0; $nbcolsmod=empty($conf->dol_optimize_smallscreen)?4:3; - foreach($modules as $val) // Loop on qualified (enabled) modules + //var_dump($modules); + foreach($orders as $index => $key) // Loop on qualified (enabled) modules { + //print $index.' '.$key; + $val = $modules[$index]; $modulekeyname=strtolower($val->name); $modulequalified=1; @@ -454,7 +457,7 @@ if (! empty($conf->google->enabled) && ! empty($conf->global->MAIN_GOOGLE_AD_CLI } else { - print ''."\n"; + print ''."\n"; } } diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 092188f5616..48930bbd9f7 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -650,6 +650,7 @@ div.myavailability { .noenlargeonsmartphone { width : 50px !important; display: inline !important; } .maxwidthonsmartphone { max-width: 100px; } .maxwidth100onsmartphone { max-width: 100px; } + .maxwidth150onsmartphone { max-width: 150px; } .maxwidth200onsmartphone { max-width: 200px; } .maxwidth300onsmartphone { max-width: 300px; } .maxwidth400onsmartphone { max-width: 400px; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 0a54d06b1ac..d9d9d7622af 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -648,6 +648,7 @@ div.myavailability { .noenlargeonsmartphone { width : 50px !important; display: inline !important; } .maxwidthonsmartphone { max-width: 100px; } .maxwidth100onsmartphone { max-width: 100px; } + .maxwidth150onsmartphone { max-width: 150px; } .maxwidth200onsmartphone { max-width: 200px; } .maxwidth300onsmartphone { max-width: 300px; } .maxwidth400onsmartphone { max-width: 400px; }