diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 809f279756c..ac735c59e0d 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -603,7 +603,7 @@ if ($nboftargetok) { if ($target eq 'TGZ') { $NEWDESTI=$DESTI; - if ($NEWPUBLISH =~ /stable/) + if ($NEWDESTI =~ /stable/) { mkdir($DESTI.'/standard'); if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; } @@ -635,7 +635,7 @@ if ($nboftargetok) { if ($target eq 'XZ') { $NEWDESTI=$DESTI; - if ($NEWPUBLISH =~ /stable/) + if ($NEWDESTI =~ /stable/) { mkdir($DESTI.'/standard'); if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; } @@ -672,7 +672,7 @@ if ($nboftargetok) { if ($target eq 'ZIP') { $NEWDESTI=$DESTI; - if ($NEWPUBLISH =~ /stable/) + if ($NEWDESTI =~ /stable/) { mkdir($DESTI.'/standard'); if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; } @@ -713,7 +713,7 @@ if ($nboftargetok) { if ($target =~ /FEDO/i) { $subdir="package_rpm_redhat-fedora"; } if ($target =~ /MAND/i) { $subdir="package_rpm_mandriva"; } if ($target =~ /OPEN/i) { $subdir="package_rpm_opensuse"; } - if ($NEWPUBLISH =~ /stable/) + if ($NEWDESTI =~ /stable/) { mkdir($DESTI.'/'.$subdir); if (-d $DESTI.'/'.$subdir) { $NEWDESTI=$DESTI.'/'.$subdir; } @@ -799,7 +799,7 @@ if ($nboftargetok) { if ($target eq 'DEB') { $NEWDESTI=$DESTI; - if ($NEWPUBLISH =~ /stable/) + if ($NEWDESTI =~ /stable/) { mkdir($DESTI.'/package_debian-ubuntu'); if (-d $DESTI.'/package_debian-ubuntu') { $NEWDESTI=$DESTI.'/package_debian-ubuntu'; } @@ -1002,7 +1002,7 @@ if ($nboftargetok) { if ($target eq 'APS') { $NEWDESTI=$DESTI; - if ($NEWPUBLISH =~ /stable/) + if ($NEWDESTI =~ /stable/) { mkdir($DESTI.'/package_aps'); if (-d $DESTI.'/package_aps') { $NEWDESTI=$DESTI.'/package_aps'; } @@ -1088,7 +1088,7 @@ if ($nboftargetok) { if ($target eq 'EXEDOLIWAMP') { $NEWDESTI=$DESTI; - if ($NEWPUBLISH =~ /stable/) + if ($NEWDESTI =~ /stable/) { mkdir($DESTI.'/package_windows'); if (-d $DESTI.'/package_windows') { $NEWDESTI=$DESTI.'/package_windows'; } diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index 1a021996163..0e82681c686 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -48,11 +48,11 @@ if ($action == "set") $id=GETPOST('PRELEVEMENT_ID_BANKACCOUNT','int'); $account = new Account($db); - if($account->fetch($id)>0) { $res = dolibarr_set_const($db, "PRELEVEMENT_ID_BANKACCOUNT", $id,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; + /* $res = dolibarr_set_const($db, "PRELEVEMENT_CODE_BANQUE", $account->code_banque,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; $res = dolibarr_set_const($db, "PRELEVEMENT_CODE_GUICHET", $account->code_guichet,'chaine',0,'',$conf->entity); @@ -67,6 +67,7 @@ if ($action == "set") if (! $res > 0) $error++; $res = dolibarr_set_const($db, "PRELEVEMENT_RAISON_SOCIALE", $account->proprio,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; + */ } else $error++; diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php index 715547c3311..d746ac93218 100644 --- a/htdocs/categories/edit.php +++ b/htdocs/categories/edit.php @@ -1,6 +1,6 @@ - * Copyright (C) 2006-2010 Laurent Destailleur + * Copyright (C) 2006-2016 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2007 Patrick Raguin * @@ -147,7 +147,7 @@ dol_fiche_head(''); print ''; // Ref -print ''; print ''; diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php index 28917aca957..33e98f304c8 100644 --- a/htdocs/compta/bank/search.php +++ b/htdocs/compta/bank/search.php @@ -211,8 +211,8 @@ if ($resql) print_liste_field_titre($langs->trans("Numero"),$_SERVER['PHP_SELF'],'b.num_releve','',$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Description"),$_SERVER['PHP_SELF'],'','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER['PHP_SELF'],'bu.label','',$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Debit"),$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Credit"),$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Debit"),$_SERVER['PHP_SELF'],'b.amount','',$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Credit"),$_SERVER['PHP_SELF'],'b.amount','',$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Account"),$_SERVER['PHP_SELF'],'ba.ref','',$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre(''); print "\n"; diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 3e2fd7447f0..b6b9ca87ac5 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -1002,7 +1002,7 @@ else if ($action == 'ask_deleteline') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 'no', 1); } - + print $formconfirm; $author = new User($db); @@ -1160,7 +1160,7 @@ else print '
'; +print '
'; print $langs->trans("Ref").''; print '
'; // if "frequency" is empty or = 0, the reccurence is disabled - print '
'; + print '
'; print ''; @@ -1263,7 +1263,7 @@ else print '
'; print $langs->trans('Frequency'); print '
'; // Nb of generation already done - print ''; + print ''; print ''; @@ -1643,7 +1643,7 @@ else $i++; } } - else print ''; + else print ''; print "
'.$langs->trans("NbOfGenerationDone").'
'.$langs->trans("NbOfGenerationDone").''; print $object->nb_gen_done?$object->nb_gen_done:'0'; print '
'.$langs->trans("NoneF").'
'.$langs->trans("NoneF").'
"; $db->free($resql); diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 800cd8492c9..a49b5f5f7c6 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -27,6 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; @@ -1015,15 +1016,21 @@ class BonPrelevement extends CommonObject $this->date_echeance = $datetimeprev; $this->reference_remise = $ref; - $this->raison_sociale = $conf->global->PRELEVEMENT_RAISON_SOCIALE; + $id=$conf->global->PRELEVEMENT_ID_BANKACCOUNT; + $account = new Account($this->db); + if ($account->fetch($id)>0) + { + $this->emetteur_code_banque = $account->code_banque; + $this->emetteur_code_guichet = $account->code_guichet; + $this->emetteur_numero_compte = $account->number; + $this->emetteur_number_key = $account->cle_rib; + $this->emetteur_iban = $account->iban; + $this->emetteur_bic = $account->bic; - $this->emetteur_code_banque = $conf->global->PRELEVEMENT_CODE_BANQUE; - $this->emetteur_code_guichet = $conf->global->PRELEVEMENT_CODE_GUICHET; - $this->emetteur_numero_compte = $conf->global->PRELEVEMENT_NUMERO_COMPTE; - $this->emetteur_number_key = $conf->global->PRELEVEMENT_NUMBER_KEY; - $this->emetteur_iban = $conf->global->PRELEVEMENT_IBAN; - $this->emetteur_bic = $conf->global->PRELEVEMENT_BIC; - $this->emetteur_ics = $conf->global->PRELEVEMENT_ICS; // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456"; + $this->emetteur_ics = $conf->global->PRELEVEMENT_ICS; // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456"; + + $this->raison_sociale = $account->proprio; + } $this->factures = $factures_prev_id; @@ -1680,6 +1687,23 @@ class BonPrelevement extends CommonObject $dateTime_ETAD = dol_print_date($ladate, '%Y-%m-%d'); $dateTime_YMDHMS = dol_print_date($ladate, '%Y-%m-%dT%H:%M:%S'); + // Get data of bank account + $id=$configuration->global->PRELEVEMENT_ID_BANKACCOUNT; + $account = new Account($this->db); + if ($account->fetch($id)>0) + { + $this->emetteur_code_banque = $account->code_banque; + $this->emetteur_code_guichet = $account->code_guichet; + $this->emetteur_numero_compte = $account->number; + $this->emetteur_number_key = $account->cle_rib; + $this->emetteur_iban = $account->iban; + $this->emetteur_bic = $account->bic; + + $this->emetteur_ics = $conf->global->PRELEVEMENT_ICS; // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456"; + + $this->raison_sociale = $account->proprio; + } + // Récupération info demandeur $sql = "SELECT rowid, ref"; $sql.= " FROM"; @@ -1714,7 +1738,7 @@ class BonPrelevement extends CommonObject $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$dateTime_ETAD.''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.strtoupper(dol_string_unaccent($configuration->global->PRELEVEMENT_RAISON_SOCIALE)).''.$CrLf; + $XML_SEPA_INFO .= ' '.strtoupper(dol_string_unaccent($this->raison_sociale)).''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$country[1].''.$CrLf; $XML_SEPA_INFO .= ' '.strtoupper(dol_string_unaccent($configuration->global->MAIN_INFO_SOCIETE_ADDRESS)).''.$CrLf; @@ -1723,16 +1747,16 @@ class BonPrelevement extends CommonObject $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.preg_replace('/\s/', '', $configuration->global->PRELEVEMENT_IBAN).''.$CrLf; + $XML_SEPA_INFO .= ' '.preg_replace('/\s/', '', $this->emetteur_iban).''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$configuration->global->PRELEVEMENT_BIC.''.$CrLf; + $XML_SEPA_INFO .= ' '.$this->emetteur_bic.''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; /* $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$configuration->global->PRELEVEMENT_RAISON_SOCIALE.''.$CrLf; + $XML_SEPA_INFO .= ' '.$this->raison_sociale.''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$country[1].''.$CrLf; $XML_SEPA_INFO .= ' '.$conf->global->MAIN_INFO_SOCIETE_ADDRESS.''.$CrLf; @@ -1744,7 +1768,7 @@ class BonPrelevement extends CommonObject $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$configuration->global->PRELEVEMENT_ICS.''.$CrLf; + $XML_SEPA_INFO .= ' '.$this->emetteur_ics.''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' SEPA'.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; diff --git a/htdocs/compta/salaries/card.php b/htdocs/compta/salaries/card.php index f39fd0780ad..ea0070ef50b 100644 --- a/htdocs/compta/salaries/card.php +++ b/htdocs/compta/salaries/card.php @@ -415,7 +415,7 @@ if ($id) } else { - print ''.$langs->trans("Delete").''; + print ''.$langs->trans("Delete").''; } print ""; } diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index dade07fd0e3..08eb5c001de 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -34,6 +34,8 @@ require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; $langs->load("companies"); $langs->load("categories"); +$langs->load("bills"); +$langs->load("compta"); // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES') $modecompta = $conf->global->ACCOUNTING_MODE; diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index fb2edc5c4d1..17bcd80757c 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -365,8 +365,8 @@ if ($id) /* - * Boutons d'actions - */ + * Action buttons + */ print "
\n"; if ($object->rappro == 0) { @@ -381,7 +381,7 @@ if ($id) } else { - print ''.$langs->trans("Delete").''; + print ''.$langs->trans("Delete").''; } print "
"; } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 66175d60ecd..f9eb5ff07d1 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5063,8 +5063,8 @@ class Form
'.img_picto('','list').' - +
diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php index b234499cee1..d15215a4f99 100644 --- a/htdocs/core/modules/modFacture.class.php +++ b/htdocs/core/modules/modFacture.class.php @@ -192,9 +192,10 @@ class modFacture extends DolibarrModules $this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_icon[$r]='bill'; $this->export_permission[$r]=array(array("facture","facture","export","other")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_private'=>"NotePrivate",'f.note_public'=>"NotePublic",'f.fk_user_author'=>'CreatedById','uc.login'=>'CreatedByLogin','f.fk_user_valid'=>'ValidatedById','uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'fd.rowid'=>'LineId','fd.label'=>"Label",'fd.description'=>"LineDescription",'fd.subprice'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.special_code'=>'SpecialCode','fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel','p.accountancy_code_sell'=>'ProductAccountancySellCode'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_private'=>"NotePrivate",'f.note_public'=>"NotePublic",'f.fk_user_author'=>'CreatedById','uc.login'=>'CreatedByLogin','f.fk_user_valid'=>'ValidatedById','uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.subprice'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.special_code'=>'SpecialCode','fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel','p.accountancy_code_sell'=>'ProductAccountancySellCode'); + //Add 'fd.label'=>"Label" to export_fields_array if you use it. Not used by dolibarr currently. //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text'); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text", 'pj.ref'=>'Text', 'fd.description'=>"Text",'fd.subprice'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.special_code'=>'Numeric','fd.product_type'=>"Numeric",'fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text','p.accountancy_code_sell'=>'Text'); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text", 'pj.ref'=>'Text', 'fd.label'=>'Text', 'fd.description'=>"Text",'fd.subprice'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.special_code'=>'Numeric','fd.product_type'=>"Numeric",'fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text','p.accountancy_code_sell'=>'Text'); $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_private'=>"invoice",'f.note_public'=>"invoice", 'pj.ref'=>'project', 'fd.rowid'=>'invoice_line','fd.label'=>"invoice_line",'fd.description'=>"invoice_line",'fd.subprice'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.special_code'=>'invoice_line','fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product','p.accountancy_code_sell'=>'product','f.fk_user_author'=>'user','uc.login'=>'user','f.fk_user_valid'=>'user','uv.login'=>'user'); $this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $keyforselect='facture'; $keyforelement='invoice'; $keyforaliasextra='extra'; diff --git a/htdocs/core/search_page.php b/htdocs/core/search_page.php index ae1b29a5c48..e3cca7a73c7 100644 --- a/htdocs/core/search_page.php +++ b/htdocs/core/search_page.php @@ -67,51 +67,58 @@ $hookmanager->initHooks(array('searchform')); // Define $searchform $searchform = ''; -// TODO Mutualize code here with function left_menu into main.inc.php page -if ($conf->use_javascript_ajax && 1 == 2) +if ($conf->use_javascript_ajax && 1 == 2) // select2 is ko with jmobile { if (! is_object($form)) $form=new Form($db); $selected=-1; - $searchform.=$form->selectArrayAjax('searchselectcombo', DOL_URL_ROOT.'/core/ajax/selectsearchbox.php', $selected, 'data-role="none"', '', 0, 1, 'vmenusearchselectcombo', 1, $langs->trans("Search"), 0); + $searchform.='

'.$form->selectArrayAjax('searchselectcombo', DOL_URL_ROOT.'/core/ajax/selectsearchbox.php', $selected, 'data-role="none"', '', 0, 1, 'minwidth300', 1, $langs->trans("Search"), 0); } else { + $conf->global->MAIN_HTML5_PLACEHOLDER = 1; + // Define $searchform if ((( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)) && $user->rights->societe->lire) { $langs->load("companies"); - $searchform.=printSearchForm(DOL_URL_ROOT.'/societe/list.php', DOL_URL_ROOT.'/societe/list.php', $langs->trans("ThirdParties"), 'soc', 'sall', 'T', 'searchleftt', img_object('','company')); + $searchform.=printSearchForm(DOL_URL_ROOT.'/societe/list.php', DOL_URL_ROOT.'/societe/list.php', $langs->trans("ThirdParties"), 'soc', 'sall', 'T', 'searchleftt', img_picto('','object_company','', 0, 1)); + //$searchform.=printSearchForm(DOL_URL_ROOT.'/societe/list.php', DOL_URL_ROOT.'/societe/list.php', $langs->trans("ThirdParties"), 'soc', 'sall', 'T', 'searchleftt', 'notitle'); } if (! empty($conf->societe->enabled) && $user->rights->societe->lire) { $langs->load("companies"); - $searchform.=printSearchForm(DOL_URL_ROOT.'/contact/list.php', DOL_URL_ROOT.'/contact/list.php', $langs->trans("Contacts"), 'contact', 'sall', 'A', 'searchleftc', img_object('','contact')); + $searchform.=printSearchForm(DOL_URL_ROOT.'/contact/list.php', DOL_URL_ROOT.'/contact/list.php', $langs->trans("Contacts"), 'contact', 'sall', 'A', 'searchleftc', img_picto('','object_contact','', 0, 1)); + //$searchform.=printSearchForm(DOL_URL_ROOT.'/contact/list.php', DOL_URL_ROOT.'/contact/list.php', $langs->trans("Contacts"), 'contact', 'sall', 'A', 'searchleftc', 'notitle'); } if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire)) ) { $langs->load("products"); - $searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', $langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall', 'P', 'searchleftp', img_object('','product')); + $searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', $langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall', 'P', 'searchleftp', img_picto('','object_product','', 0, 1)); + //$searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', $langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall', 'P', 'searchleftp', 'notitle'); } if (! empty($conf->projet->enabled) && $user->rights->projet->lire) { $langs->load("projects"); - $searchform.=printSearchForm(DOL_URL_ROOT.'/projet/list.php', DOL_URL_ROOT.'/projet/list.php', $langs->trans("Projects"), 'project', 'search_all', 'Q', 'searchleftproj', img_object('','projectpub')); + $searchform.=printSearchForm(DOL_URL_ROOT.'/projet/list.php', DOL_URL_ROOT.'/projet/list.php', $langs->trans("Projects"), 'project', 'search_all', 'Q', 'searchleftproj', img_picto('','object_projectpub','', 0, 1)); + //$searchform.=printSearchForm(DOL_URL_ROOT.'/projet/list.php', DOL_URL_ROOT.'/projet/list.php', $langs->trans("Projects"), 'project', 'search_all', 'Q', 'searchleftproj', 'notitle'); } if (! empty($conf->adherent->enabled) && $user->rights->adherent->lire) { $langs->load("members"); - $searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', $langs->trans("Members"), 'member', 'sall', 'M', 'searchleftm', img_object('','user')); + $searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', $langs->trans("Members"), 'member', 'sall', 'M', 'searchleftm', img_picto('','object_user','', 0, 1)); + //$searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', $langs->trans("Members"), 'member', 'sall', 'M', 'searchleftm', 'notitle'); } if (! empty($conf->user->enabled) && $user->rights->user->user->lire) { $langs->load("users"); - $searchform.=printSearchForm(DOL_URL_ROOT.'/user/index.php', DOL_URL_ROOT.'/user/index.php', $langs->trans("Users"), 'user', 'sall', 'M', 'searchleftuser', img_object('','user')); + $searchform.=printSearchForm(DOL_URL_ROOT.'/user/index.php', DOL_URL_ROOT.'/user/index.php', $langs->trans("Users"), 'user', 'sall', 'M', 'searchleftuser', img_picto('','object_user','', 0, 1)); + //$searchform.=printSearchForm(DOL_URL_ROOT.'/user/index.php', DOL_URL_ROOT.'/user/index.php', $langs->trans("Users"), 'user', 'sall', 'M', 'searchleftuser', 'notitle'); } } diff --git a/htdocs/langs/en_US/banks.lang b/htdocs/langs/en_US/banks.lang index 819664dfdc4..b0b7af4076f 100644 --- a/htdocs/langs/en_US/banks.lang +++ b/htdocs/langs/en_US/banks.lang @@ -78,6 +78,7 @@ AccountToCredit=Account to credit AccountToDebit=Account to debit DisableConciliation=Disable reconciliation feature for this account ConciliationDisabled=Reconciliation feature disabled +LinkedToAConciliatedTransaction=Linked to a conciliated transaction StatusAccountOpened=Open StatusAccountClosed=Closed AccountIdShort=Number diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 095817015c1..26c2b9ed489 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -986,13 +986,14 @@ function top_httphead() * * @param string $head Optionnal head lines * @param string $title HTML title - * @param int $disablejs More content into html header - * @param int $disablehead More content into html header + * @param int $disablejs Disable js output + * @param int $disablehead Disable head output * @param array $arrayofjs Array of complementary js files * @param array $arrayofcss Array of complementary css files + * @param int $disablejmobile Disable jmobile * @return void */ -function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='') +function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $disablejmobile=0) { global $user, $conf, $langs, $db; @@ -1065,7 +1066,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs print ''."\n"; } // jQuery jMobile - if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || ! empty($conf->dol_use_jmobile)) + if (! $disablejmobile && (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || ! empty($conf->dol_use_jmobile))) { print ''."\n"; } @@ -1237,7 +1238,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs print ''."\n"; } // jQuery jMobile - if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || (! empty($conf->dol_use_jmobile) && $conf->dol_use_jmobile > 0)) + if (! $disablejmobile && (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || (! empty($conf->dol_use_jmobile) && $conf->dol_use_jmobile > 0))) { // We must force not using ajax because cache of jquery does not load js of other pages. // This also increase seriously speed onto mobile device where complex js code is very slow and memory very low. @@ -1841,20 +1842,24 @@ function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch,$htmlinput $ret=''; $ret.='
'; - $ret.=''; + if (empty($conf->global->MAIN_HTML5_PLACEHOLDER)) + { + $ret.=''; + } $ret.=''; $ret.=''; $ret.=''; $ret.='global->MAIN_HTML5_PLACEHOLDER)) $ret.=' style="text-indent: 22px; background-image: url(\''.$img.'\'); background-repeat: no-repeat; background-position: 3px;"'; $ret.=($accesskey?' accesskey="'.$accesskey.'"':''); if (! empty($conf->global->MAIN_HTML5_PLACEHOLDER)) $ret.=' placeholder="'.strip_tags($title).'"'; // Will work only if MAIN_HTML5_PLACEHOLDER is set to 1 else $ret.=' title="'.$langs->trans("SearchOf").''.strip_tags($title).'"'; diff --git a/htdocs/product/card.php b/htdocs/product/card.php index e5417ef6bd7..ca52892f518 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1528,6 +1528,7 @@ else print ''; print ''; print ' '; + print '
'; } else { diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index f3f58c17119..6689f966c15 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -194,7 +194,7 @@ if ($id > 0 || ! empty($ref)) print ''; // Ref - print '
'; + print '
'; print $langs->trans("Ref"); print ''; // Define a complementary filter for search of next/prev ref. @@ -255,7 +255,7 @@ if ($id > 0 || ! empty($ref)) $linkback=GETPOST('withproject')?''.$langs->trans("BackToList").'':''; // Ref - print '
'.$langs->trans('Ref').''; + print '
'.$langs->trans('Ref').''; if (! GETPOST('withproject') || empty($projectstatic->id)) { $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,1); diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php index 07fda131407..c9a69fc81a4 100644 --- a/htdocs/projet/tasks/document.php +++ b/htdocs/projet/tasks/document.php @@ -137,7 +137,7 @@ if ($object->id > 0) print ''; // Ref - print '
'; + print '
'; print $langs->trans("Ref"); print ''; // Define a complementary filter for search of next/prev ref. @@ -198,7 +198,7 @@ if ($object->id > 0) print ''; // Ref - print '
'; + print '
'; print $langs->trans("Ref"); print ''; if (empty($withproject) || empty($projectstatic->id)) diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php index e62e58df58b..5d5cb38dbe5 100644 --- a/htdocs/projet/tasks/note.php +++ b/htdocs/projet/tasks/note.php @@ -117,7 +117,7 @@ if ($object->id > 0) print ''; // Ref - print ''; - // Budget - print ''; - - // Other options - $parameters=array(); - $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook - if (empty($reshook) && ! empty($extrafields_project->attribute_label)) + if (! $id && ! $ref) // Not a dedicated task { - print $object->showOptionals($extrafields_project); - } - + // Budget + print ''; + + // Other options + $parameters=array(); + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$projectstatic,$action); // Note that $action and $object may have been modified by hook + if (empty($reshook) && ! empty($extrafields_project->attribute_label)) + { + print $projectstatic->showOptionals($extrafields_project); + } + } + print '
'; + print '
'; print $langs->trans("Ref"); print ''; // Define a complementary filter for search of next/prev ref. @@ -172,7 +172,7 @@ if ($object->id > 0) $linkback=GETPOST('withproject')?''.$langs->trans("BackToList").'':''; // Ref - print '
'.$langs->trans("Ref").''; + print '
'.$langs->trans("Ref").''; if (empty($withproject) || empty($projectstatic->id)) { $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,1); diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 6c9b964ead9..5418a4c8f48 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -34,6 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; $langs->load('projects'); $id=GETPOST('id','int'); +$projectid=GETPOST('projectid','int'); $ref=GETPOST('ref','alpha'); $action=GETPOST('action','alpha'); $confirm=GETPOST('confirm','alpha'); @@ -65,8 +66,20 @@ $pagenext = $page + 1; if (! $sortfield) $sortfield='t.task_date,t.task_datehour,t.rowid'; if (! $sortorder) $sortorder='DESC'; +// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array +$hookmanager->initHooks(array('projecttaskcard','globalcard')); + $object = new Task($db); $projectstatic = new Project($db); +$extrafields_project = new ExtraFields($db); +$extrafields_task = new ExtraFields($db); + +if ($projectid > 0 || ! empty($ref)) +{ + // fetch optionals attributes and labels + $extralabels_projet=$extrafields_project->fetch_name_optionals_label($projectstatic->table_element); +} +$extralabels_task=$extrafields_task->fetch_name_optionals_label($object->table_element); /* @@ -264,12 +277,14 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) { $result=$projectstatic->fetch($projectidforalltimes); if (! empty($projectstatic->socid)) $projectstatic->fetch_thirdparty(); + $res=$projectstatic->fetch_optionals($object->id,$extralabels_projet); } elseif ($object->fetch($id, $ref) >= 0) { $result=$projectstatic->fetch($object->fk_project); if (! empty($projectstatic->socid)) $projectstatic->fetch_thirdparty(); - + $res=$projectstatic->fetch_optionals($object->id,$extralabels_projet); + $object->project = clone $projectstatic; } @@ -332,19 +347,22 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) print dol_print_date($projectstatic->date_end,'day'); print '
'.$langs->trans("Budget").''; - if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,0,0,0,$conf->currency); - print '
'.$langs->trans("Budget").''; + if (strcmp($projectstatic->budget_amount, '')) print price($projectstatic->budget_amount,'',$langs,0,0,0,$conf->currency); + print '
'; dol_fiche_end(); @@ -353,7 +371,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) /* * Actions */ - if (empty($id)) + if (empty($id) && empty($ref)) { print '
'; @@ -394,7 +412,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) $linkback=$withproject?''.$langs->trans("BackToList").'':''; // Ref - print '
'; + print '
'; print $langs->trans("Ref"); print ''; if (! GETPOST('withproject') || empty($projectstatic->id)) @@ -533,18 +551,26 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) if ($projectstatic->id > 0) { + if ($action == 'deleteline') + { + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id.'&lineid='.$_GET["lineid"].($withproject?'&withproject=1':''),$langs->trans("DeleteATimeSpent"),$langs->trans("ConfirmDeleteATimeSpent"),"confirm_delete",'','',1); + } + // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array $hookmanager->initHooks(array('tasktimelist')); $extrafields = new ExtraFields($db); // Definition of fields for list - $arrayfields=array( - 't.task_date'=>array('label'=>$langs->trans("Date"), 'checked'=>1), - 'author'=>array('label'=>$langs->trans("By"), 'checked'=>1), - 't.note'=>array('label'=>$langs->trans("Note"), 'checked'=>1), - 't.task_duration'=>array('label'=>$langs->trans("Duration"), 'checked'=>1), - 'value'=>array('label'=>$langs->trans("Value"), 'checked'=>1, 'enabled'=>$conf->salaries->enabled), - ); + $arrayfields=array(); + $arrayfields['t.task_date']=array('label'=>$langs->trans("Date"), 'checked'=>1); + if (! $id && ! $ref) // Not a dedicated task + { + $arrayfields['t.task_ref']=array('label'=>$langs->trans("Task"), 'checked'=>1); + } + $arrayfields['author']=array('label'=>$langs->trans("By"), 'checked'=>1); + $arrayfields['t.note']=array('label'=>$langs->trans("Note"), 'checked'=>1); + $arrayfields['t.task_duration']=array('label'=>$langs->trans("Duration"), 'checked'=>1); + $arrayfields['value']=array('label'=>$langs->trans("Value"), 'checked'=>1, 'enabled'=>$conf->salaries->enabled); // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { @@ -553,19 +579,17 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>$extrafields->attribute_list[$key], 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>$extrafields->attribute_perms[$key]); } } - - /* * List of time spent */ $tasks = array(); - $sql = "SELECT t.rowid, t.fk_task, t.task_date, t.task_datehour, t.task_date_withhour, t.task_duration, t.fk_user, t.note, t.thm"; - $sql.= ", u.lastname, u.firstname"; - $sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t"; - $sql .= " , ".MAIN_DB_PREFIX."user as u"; - $sql .= " WHERE t.fk_user = u.rowid"; + $sql = "SELECT t.rowid, t.fk_task, t.task_date, t.task_datehour, t.task_date_withhour, t.task_duration, t.fk_user, t.note, t.thm,"; + $sql .= " pt.ref, pt.label,"; + $sql .= " u.lastname, u.firstname"; + $sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t, ".MAIN_DB_PREFIX."projet_task as pt, ".MAIN_DB_PREFIX."user as u"; + $sql .= " WHERE t.fk_user = u.rowid AND t.fk_task = pt.rowid"; if (empty($projectidforalltimes)) $sql .= " AND t.fk_task =".$object->id; if ($search_ref) $sql .= natural_search('c.ref', $search_ref); @@ -601,7 +625,6 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) } - $arrayofselected=is_array($toselect)?$toselect:array(); $params=''; @@ -631,7 +654,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) - print '
'; + print ''; if ($optioncss != '') print ''; print ''; print ''; @@ -639,7 +662,8 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) print ''; print ''; - print ''; + print ''; + print ''; print ''; $moreforfilter = ''; @@ -662,8 +686,11 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) print ''."\n"; print ''; - if (! empty($arrayfields['t.task_date']['checked'])) print_liste_field_titre($arrayfields['t.task_date']['label'],$_SERVER['PHP_SELF'],'t.task_date,t.task_datehour,t.rowid','',$params,'',$sortfield,$sortorder); - if (! empty($arrayfields['t.task_datehour']['checked'])) print_liste_field_titre($arrayfields['t.task_datehour']['label'],$_SERVER['PHP_SELF'],'t.task_date,t.task_datehour,t.rowid','',$params,'',$sortfield,$sortorder); + if (! empty($arrayfields['t.task_date']['checked'])) print_liste_field_titre($arrayfields['t.task_date']['label'],$_SERVER['PHP_SELF'],'t.task_date,t.task_datehour,t.rowid','',$params,'',$sortfield,$sortorder); + if (! $id && ! $ref) // Not a dedicated task + { + if (! empty($arrayfields['t.task_ref']['checked'])) print_liste_field_titre($arrayfields['t.task_ref']['label'],$_SERVER['PHP_SELF'],'pt.ref','',$params,'',$sortfield,$sortorder); + } if (! empty($arrayfields['author']['checked'])) print_liste_field_titre($arrayfields['author']['label'],$_SERVER['PHP_SELF'],'','',$params,'',$sortfield,$sortorder); if (! empty($arrayfields['t.note']['checked'])) print_liste_field_titre($arrayfields['t.note']['label'],$_SERVER['PHP_SELF'],'t.note','',$params,'',$sortfield,$sortorder); if (! empty($arrayfields['t.task_duration']['checked'])) print_liste_field_titre($arrayfields['t.task_duration']['label'],$_SERVER['PHP_SELF'],'t.task_duration','',$params,'align="right"',$sortfield,$sortorder); @@ -692,8 +719,11 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) print ''; // LIST_OF_TD_TITLE_SEARCH if (! empty($arrayfields['t.task_date']['checked'])) print ''; - if (! empty($arrayfields['t.task_datehour']['checked'])) print ''; - if (! empty($arrayfields['author']['checked'])) print ''; + if (! $id && ! $ref) // Not a dedicated task + { + if (! empty($arrayfields['t.task_ref']['checked'])) print ''; + } + if (! empty($arrayfields['author']['checked'])) print ''; if (! empty($arrayfields['t.note']['checked'])) print ''; if (! empty($arrayfields['t.task_duration']['checked'])) print ''; if (! empty($arrayfields['value']['checked'])) print ''; @@ -731,6 +761,8 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) print $searchpitco; print ''; print ''."\n"; + + $tasktmp = new Task($db); $total = 0; $totalvalue = 0; @@ -756,13 +788,29 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) } print ''; } + + // Task + if (! empty($arrayfields['t.task_ref']['checked'])) + { + if (! $id && ! $ref) // Not a dedicated task + { + print ''; + } + } + // User if (! empty($arrayfields['author']['checked'])) { print '
'; + $tasktmp->id = $task_time->fk_task; + $tasktmp->ref = $task_time->ref; + $tasktmp->label = $task_time->label; + print $tasktmp->getNomUrl(1, 'withproject', 'time'); + print ''; if ($_GET['action'] == 'editline' && $_GET['lineid'] == $task_time->rowid) { - $contactsoftask=$object->getListContactId('internal'); + if (empty($object->id)) $object->fetch($id); + $contactsoftask=$object->getListContactId('internal'); if (!in_array($task_time->fk_user,$contactsoftask)) { $contactsoftask[]=$task_time->fk_user; } diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index e4e67ba7eab..af840283223 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -159,7 +159,8 @@ $arrayfields=array( 's.idprof4'=>array('label'=>$langs->trans("ProfId4Short"), 'checked'=>$checkedprofid4), 's.idprof5'=>array('label'=>$langs->trans("ProfId5Short"), 'checked'=>$checkedprofid5), 's.idprof6'=>array('label'=>$langs->trans("ProfId6Short"), 'checked'=>$checkedprofid6), - 's.fk_prospectlevel'=>array('label'=>$langs->trans("ProspectLevelShort"), 'checked'=>$checkprospectlevel), + 'customerorsupplier'=>array('label'=>'Nature', 'checked'=>1), + 's.fk_prospectlevel'=>array('label'=>$langs->trans("ProspectLevelShort"), 'checked'=>$checkprospectlevel), 's.fk_stcomm'=>array('label'=>$langs->trans("StatusProsp"), 'checked'=>$checkstcomm), 's.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), 's.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), @@ -567,6 +568,8 @@ if (! empty($moreforfilter)) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +if (empty($arrayfields['customerorsupplier']['checked'])) print ''; + print ''; print ''; @@ -587,7 +590,7 @@ if (! empty($arrayfields['s.ape']['checked'])) print_liste_field_titr if (! empty($arrayfields['s.idprof4']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId4Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof4","",$param,'class="nowrap"',$sortfield,$sortorder); if (! empty($arrayfields['s.idprof5']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId5Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof5","",$param,'class="nowrap"',$sortfield,$sortorder); if (! empty($arrayfields['s.idprof6']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId6Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof6","",$param,'class="nowrap"',$sortfield,$sortorder); -print_liste_field_titre(''); // type of customer +if (! empty($arrayfields['customerorsupplier']['checked'])) print_liste_field_titre(''); // type of customer if (! empty($arrayfields['s.fk_prospectlevel']['checked'])) print_liste_field_titre($arrayfields['s.fk_prospectlevel']['label'],$_SERVER["PHP_SELF"],"s.fk_prospectlevel","",$param,'align="center"',$sortfield,$sortorder); if (! empty($arrayfields['s.fk_stcomm']['checked'])) print_liste_field_titre($arrayfields['s.fk_stcomm']['label'],$_SERVER["PHP_SELF"],"s.fk_stcomm","",$param,'align="center"',$sortfield,$sortorder); // Extra fields @@ -735,17 +738,19 @@ if (! empty($arrayfields['s.idprof6']['checked'])) } // Type (customer/prospect/supplier) -print ''; - +if (! empty($arrayfields['customerorsupplier']['checked'])) +{ + print ''; +} if (! empty($arrayfields['s.fk_prospectlevel']['checked'])) { // Prospect level @@ -946,30 +951,33 @@ while ($i < min($num, $limit)) print "\n"; } // Type - print ''; + if (! empty($arrayfields['customerorsupplier']['checked'])) + { + print ''; + } if (! empty($arrayfields['s.fk_prospectlevel']['checked'])) { // Prospect level diff --git a/htdocs/societe/notify/card.php b/htdocs/societe/notify/card.php index 11c62f7ccfc..c56687dc834 100644 --- a/htdocs/societe/notify/card.php +++ b/htdocs/societe/notify/card.php @@ -52,7 +52,7 @@ $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; if (! $sortorder) $sortorder="DESC"; -if (! $sortfield) $sortfield="a.daten"; +if (! $sortfield) $sortfield="n.daten"; $now=dol_now(); @@ -221,9 +221,9 @@ if ($result > 0) // Line with titles print '
'; -if ($type != '') print ''; -print ''; + if ($type != '') print ''; + print '".$obj->idprof6."'; - $s=''; - if (($obj->client==1 || $obj->client==3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) - { - $companystatic->name=$langs->trans("Customer"); - $companystatic->name_alias=''; - $s.=$companystatic->getNomUrl(0,'customer'); - } - if (($obj->client==2 || $obj->client==3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) - { - if ($s) $s.=" / "; - $companystatic->name=$langs->trans("Prospect"); - $companystatic->name_alias=''; - $s.=$companystatic->getNomUrl(0,'prospect'); - } - if (! empty($conf->fournisseur->enabled) && $obj->fournisseur) - { - if ($s) $s.=" / "; - $companystatic->name=$langs->trans("Supplier"); - $companystatic->name_alias=''; - $s.=$companystatic->getNomUrl(0,'supplier'); - } - print $s; - print ''; + $s=''; + if (($obj->client==1 || $obj->client==3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) + { + $companystatic->name=$langs->trans("Customer"); + $companystatic->name_alias=''; + $s.=$companystatic->getNomUrl(0,'customer'); + } + if (($obj->client==2 || $obj->client==3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) + { + if ($s) $s.=" / "; + $companystatic->name=$langs->trans("Prospect"); + $companystatic->name_alias=''; + $s.=$companystatic->getNomUrl(0,'prospect'); + } + if (! empty($conf->fournisseur->enabled) && $obj->fournisseur) + { + if ($s) $s.=" / "; + $companystatic->name=$langs->trans("Supplier"); + $companystatic->name_alias=''; + $s.=$companystatic->getNomUrl(0,'supplier'); + } + print $s; + print '
'; print ''; - print_liste_field_titre($langs->trans("Target"),$_SERVER["PHP_SELF"],"c.lastname",'',$param,'"width="45%"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"a.titre",'',$param,'"width="35%"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"",'',$param,'"width="10%"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Target"),$_SERVER["PHP_SELF"],"c.lastname,c.firstname",'',$param,'"width="45%"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"",'',$param,'"width="35%"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"n.type",'',$param,'"width="10%"',$sortfield,$sortorder); print_liste_field_titre(''); print "\n"; @@ -268,22 +268,7 @@ if ($result > 0) print ''; print '
'; - // List of active notifications - print load_fiche_titre($langs->trans("ListOfActiveNotifications"),'',''); - $var=true; - - // Line with titles - print '
'; - print ''; - print_liste_field_titre($langs->trans("Target"),$_SERVER["PHP_SELF"],"c.lastname",'',$param,'"width="45%"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"a.titre",'',$param,'"width="35%"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"",'',$param,'"width="10%"',$sortfield,$sortorder); - print_liste_field_titre('','',''); - print ''; - - $langs->load("errors"); - $langs->load("other"); - + // List of notifications enabled for contacts $sql = "SELECT n.rowid, n.type,"; $sql.= " a.code, a.label,"; @@ -294,11 +279,35 @@ if ($result > 0) $sql.= " WHERE a.rowid = n.fk_action"; $sql.= " AND c.rowid = n.fk_contact"; $sql.= " AND c.fk_soc = ".$object->id; - + $resql=$db->query($sql); if ($resql) { $num = $db->num_rows($resql); + } + else + { + dol_print_error($db); + } + + // List of active notifications + print load_fiche_titre($langs->trans("ListOfActiveNotifications").' ('.$num.')','',''); + $var=true; + + // Line with titles + print '
'; + print ''; + print_liste_field_titre($langs->trans("Target"),$_SERVER["PHP_SELF"],"c.lastname,c.firstname",'',$param,'"width="45%"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"",'',$param,'"width="35%"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"n.type",'',$param,'"width="10%"',$sortfield,$sortorder); + print_liste_field_titre('','',''); + print ''; + + $langs->load("errors"); + $langs->load("other"); + + if ($num) + { $i = 0; $contactstatic=new Contact($db); @@ -340,10 +349,6 @@ if ($result > 0) } $db->free($resql); } - else - { - dol_print_error($db); - } // List of notifications enabled for fixed email /* @@ -401,20 +406,6 @@ if ($result > 0) print '

'."\n"; - // List of notifications done - print load_fiche_titre($langs->trans("ListOfNotificationsDone"),'',''); - $var=true; - - // Line with titles - print '
'; - print ''; - print_liste_field_titre($langs->trans("Target"),$_SERVER["PHP_SELF"],"c.lastname",'',$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"a.titre",'',$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"",'',$param,'',$sortfield,$sortorder); - //print_liste_field_titre($langs->trans("Object"),$_SERVER["PHP_SELF"],"",'',$param,'"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"a.daten",'',$param,'align="right"',$sortfield,$sortorder); - print ''; - // List $sql = "SELECT n.rowid, n.daten, n.email, n.objet_type as object_type, n.objet_id as object_id, n.type,"; $sql.= " c.rowid as id, c.lastname, c.firstname, c.email as contactemail,"; @@ -424,11 +415,34 @@ if ($result > 0) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as c ON n.fk_contact = c.rowid"; $sql.= " WHERE a.rowid = n.fk_action"; $sql.= " AND n.fk_soc = ".$object->id; + $sql.= $db->order($sortfield, $sortorder); $resql=$db->query($sql); if ($resql) { $num = $db->num_rows($resql); + } + else + { + dol_print_error($db); + } + + // List of notifications done + print load_fiche_titre($langs->trans("ListOfNotificationsDone").' ('.$num.')','',''); + $var=true; + + // Line with titles + print '
'; + print ''; + print_liste_field_titre($langs->trans("Target"),$_SERVER["PHP_SELF"],"c.lastname,c.firstname",'',$param,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"",'',$param,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"n.type",'',$param,'',$sortfield,$sortorder); + //print_liste_field_titre($langs->trans("Object"),$_SERVER["PHP_SELF"],"",'',$param,'"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"n.daten",'',$param,'align="right"',$sortfield,$sortorder); + print ''; + + if ($num > 0) + { $i = 0; $contactstatic=new Contact($db); @@ -477,10 +491,6 @@ if ($result > 0) } $db->free($resql); } - else - { - dol_print_error($db); - } print '
'; } diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 8e982f2d69c..06012250051 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -3796,9 +3796,9 @@ div.ecmjqft { /* use or not ? */ div.jnotify-background { opacity : 0.95 !important; - -moz-box-shadow: 3px 3px 4px #888 !important; - -webkit-box-shadow: 3px 3px 4px #888 !important; - box-shadow: 3px 3px 4px #888 !important; + -moz-box-shadow: 2px 2px 4px #888 !important; + -webkit-box-shadow: 2px 2px 4px #888 !important; + box-shadow: 2px 2px 4px #888 !important; } /* ============================================================================== */ diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 09a8bc80a65..475257e6d1c 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -3696,9 +3696,9 @@ div.ecmjqft { /* use or not ? */ div.jnotify-background { opacity : 0.95 !important; - -moz-box-shadow: 3px 3px 4px #888 !important; - -webkit-box-shadow: 3px 3px 4px #888 !important; - box-shadow: 3px 3px 4px #888 !important; + -moz-box-shadow: 2px 2px 4px #888 !important; + -webkit-box-shadow: 2px 2px 4px #888 !important; + box-shadow: 2px 2px 4px #888 !important; } /* ============================================================================== */ diff --git a/scripts/withdrawals/build_withdrawal_file.php b/scripts/withdrawals/build_withdrawal_file.php index 1a8c673c5f9..d381c32676a 100755 --- a/scripts/withdrawals/build_withdrawal_file.php +++ b/scripts/withdrawals/build_withdrawal_file.php @@ -70,6 +70,7 @@ if (! isset($argv[1])) { // Check parameters $withdrawreceipt=new BonPrelevement($db); +// $conf->global->PRELEVEMENT_CODE_BANQUE and $conf->global->PRELEVEMENT_CODE_GUICHET should be empty $result=$withdrawreceipt->create($conf->global->PRELEVEMENT_CODE_BANQUE,$conf->global->PRELEVEMENT_CODE_GUICHET,$argv[1]);