diff --git a/build/makepack-howto.txt b/build/makepack-howto.txt index 173c01c6f8b..813db9bb4b8 100644 --- a/build/makepack-howto.txt +++ b/build/makepack-howto.txt @@ -10,13 +10,12 @@ beta version of Dolibarr, step by step. - Check all files are commited. - Update version/info in ChangeLog. To generate a changelog, you can do "git log `git merge-base 3.7.0 origin/develop`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa" - Update version number with x.y.z-w in htdocs/filefunc.inc.php -- Update version number with x.y.z-w in build/debian/changelog - Commit all changes. -- Add a Tag (x.y.z-beta) and push it: git push --tags -- Create a branch (x.y). - Run makepack-dolibarr.pl to generate all packages. +- Create a branch (x.y), if version seems stable enough. + - Move build files into www.dolibarr.org web site (/home/dolibarr/wwwroot/files/lastbuild). @@ -31,7 +30,6 @@ complete release of Dolibarr, step by step. - Check all files are commited. - Update version/info in ChangeLog. To generate a changelog, you can do "git log `git merge-base 3.7.0 origin/develop`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa" - Update version number with x.y.z in htdocs/filefunc.inc.php -- Update version number with x.y.z in build/debian/changelog - Commit all changes. - Run makepack-dolibarr.pl to generate all packages. diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index e2b378f5aa2..eb78ead387b 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -414,9 +414,9 @@ if ($action == 'edit' || $action == 'updateedit') // Forme juridique $var=!$var; - print ''; + print ''; if ($mysoc->country_code) { - print $formcompany->select_juridicalstatus($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE, $mysoc->country_code, '', 'legal_form'); + print $formcompany->select_juridicalstatus($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE, $mysoc->country_code, '', 'forme_juridique_code'); } else { print $countrynotdefined; } diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index b5af472a6cf..e2f4b03754c 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -151,7 +151,7 @@ $tabsql[8] = "SELECT t.id as rowid, t.code as code, t.libelle, t.fk_country a $tabsql[9] = "SELECT c.code_iso as code, c.label, c.unicode, c.active FROM ".MAIN_DB_PREFIX."c_currencies AS c"; $tabsql[10]= "SELECT t.rowid, t.taux, t.localtax1_type, t.localtax1, t.localtax2_type, t.localtax2, c.label as country, c.code as country_code, t.fk_pays as country_id, t.recuperableonly, t.note, t.active, t.accountancy_code_sell, t.accountancy_code_buy FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_country as c WHERE t.fk_pays=c.rowid"; $tabsql[11]= "SELECT t.rowid as rowid, element, source, code, libelle, active FROM ".MAIN_DB_PREFIX."c_type_contact AS t"; -$tabsql[12]= "SELECT c.rowid as rowid, c.code, c.sortorder, c.libelle, c.libelle_facture, nbjour, fdm, decalage, active FROM ".MAIN_DB_PREFIX.'c_payment_term AS c'; +$tabsql[12]= "SELECT c.rowid as rowid, c.code, c.libelle, c.libelle_facture, c.nbjour, c.fdm, c.decalage, c.active, c.sortorder FROM ".MAIN_DB_PREFIX.'c_payment_term AS c'; $tabsql[13]= "SELECT c.id as rowid, c.code, c.libelle, c.type, c.active, c.accountancy_code FROM ".MAIN_DB_PREFIX."c_paiement AS c"; $tabsql[14]= "SELECT e.rowid as rowid, e.code as code, e.libelle, e.price, e.organization, e.fk_pays as country_id, c.code as country_code, c.label as country, e.active FROM ".MAIN_DB_PREFIX."c_ecotaxe AS e, ".MAIN_DB_PREFIX."c_country as c WHERE e.fk_pays=c.rowid and c.active=1"; $tabsql[15]= "SELECT rowid as rowid, code, label as libelle, width, height, unit, active FROM ".MAIN_DB_PREFIX."c_paper_format"; @@ -215,7 +215,7 @@ $tabfield[8] = "code,libelle,country_id,country"; $tabfield[9] = "code,label,unicode"; $tabfield[10]= "country_id,country,taux,recuperableonly,localtax1_type,localtax1,localtax2_type,localtax2,accountancy_code_sell,accountancy_code_buy,note"; $tabfield[11]= "element,source,code,libelle"; -$tabfield[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage"; +$tabfield[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage,sortorder"; $tabfield[13]= "code,libelle,type,accountancy_code"; $tabfield[14]= "code,libelle,price,organization,country_id,country"; $tabfield[15]= "code,libelle,width,height,unit"; @@ -247,7 +247,7 @@ $tabfieldvalue[8] = "code,libelle,country"; $tabfieldvalue[9] = "code,label,unicode"; $tabfieldvalue[10]= "country,taux,recuperableonly,localtax1_type,localtax1,localtax2_type,localtax2,accountancy_code_sell,accountancy_code_buy,note"; $tabfieldvalue[11]= "element,source,code,libelle"; -$tabfieldvalue[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage"; +$tabfieldvalue[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage,sortorder"; $tabfieldvalue[13]= "code,libelle,type,accountancy_code"; $tabfieldvalue[14]= "code,libelle,price,organization,country"; $tabfieldvalue[15]= "code,libelle,width,height,unit"; @@ -279,7 +279,7 @@ $tabfieldinsert[8] = "code,libelle,fk_country"; $tabfieldinsert[9] = "code_iso,label,unicode"; $tabfieldinsert[10]= "fk_pays,taux,recuperableonly,localtax1_type,localtax1,localtax2_type,localtax2,accountancy_code_sell,accountancy_code_buy,note"; $tabfieldinsert[11]= "element,source,code,libelle"; -$tabfieldinsert[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage"; +$tabfieldinsert[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage,sortorder"; $tabfieldinsert[13]= "code,libelle,type,accountancy_code"; $tabfieldinsert[14]= "code,libelle,price,organization,fk_pays"; $tabfieldinsert[15]= "code,label,width,height,unit"; @@ -1595,6 +1595,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='') if ($fieldlist[$field]=='accountancy_code') $size='size="10" '; if ($fieldlist[$field]=='accountancy_code_sell') $size='size="10" '; if ($fieldlist[$field]=='accountancy_code_buy') $size='size="10" '; + if ($fieldlist[$field]=='sortorder') $size='size="2" '; print ''; print ''; } diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index b573d02bf16..aca45c5ca52 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -419,7 +419,7 @@ else if ($id || $ref) // Ref print ''.$langs->trans("Ref").''; print ''; - print $form->showrefnav($member,'id','','1','rowid','ref','','&type=3'); + print $form->showrefnav($member,'id','','1','rowid','ref','','&type='.$type); print ''; // Login diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index bcb53f8a0f5..845313c5d36 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -228,6 +228,8 @@ class Categorie extends CommonObject $error=0; + dol_syslog(get_class($this).'::create', LOG_DEBUG); + // Clean parameters $this->label = trim($this->label); $this->description = trim($this->description); @@ -246,7 +248,6 @@ class Categorie extends CommonObject $this->db->begin(); - dol_syslog(get_class($this).'::create', LOG_DEBUG); $sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie ("; $sql.= "fk_parent,"; $sql.= " label,"; @@ -275,7 +276,6 @@ class Categorie extends CommonObject $sql.= $conf->entity; $sql.= ")"; - dol_syslog(get_class($this).'::create', LOG_DEBUG); $res = $this->db->query($sql); if ($res) { diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 6b3384b92dd..58159b59b75 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -1210,7 +1210,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa // We decide to choose color of owner of event (event->userownerid is user id of owner, event->userassigned contains all users assigned to event) if (! empty($cacheusers[$event->userownerid]->color)) $color=$cacheusers[$event->userownerid]->color; } - else if ($event->type_code == 'ICALEVENT') + else if ($event->type_code == 'ICALEVENT') // Event come from external ical file { $numical++; if (! empty($event->icalname)) { @@ -1220,7 +1220,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa $numicals[dol_string_nospecial($event->icalname)]++; } $color=$event->icalcolor; - $cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other unmovable'); + $cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other'); } else if ($event->type_code == 'BIRTHDAY') { @@ -1266,6 +1266,10 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa { $cssclass.= " unmovable"; } + else if ($event->type_code == 'ICALEVENT') + { + $cssclass.= " unmovable"; + } else if ($event->date_end_in_calendar && date('Ymd',$event->date_start_in_calendar) != date('Ymd',$event->date_end_in_calendar)) { $tmpyearend = date('Y',$event->date_end_in_calendar); diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index e8f374c3b8d..e05c5a63dd9 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -2121,18 +2121,20 @@ if ($action == 'create') if ($action != 'statut' && $action != 'editline') { // Validate - if ($object->statut == Propal::STATUS_DRAFT && $object->total_ttc >= 0 && count($object->lines) > 0 && - ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->propal->creer)) + if ($object->statut == Propal::STATUS_DRAFT && $object->total_ttc >= 0 && count($object->lines) > 0) + { + if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->propal->creer)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->propal->propal_advance->validate))) - ) { - if (count($object->lines) > 0) + { print '
' . $langs->trans('Validate') . '
'; - // else print ''.$langs->trans('Validate').''; + } + else + print '
' . $langs->trans('Validate') . '
'; } // Create event if ($conf->agenda->enabled && ! empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) // Add hidden condition because this is not a "workflow" action so should appears somewhere else on page. { - print '' . $langs->trans("AddAction") . ''; + print '
' . $langs->trans("AddAction") . '
'; } // Edit if ($object->statut == Propal::STATUS_VALIDATED && $user->rights->propal->creer) { diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 1c2f34c0931..7b431ff1944 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -338,7 +338,7 @@ if ($resql) print ''; print ''; $liststatus=array('0'=>$langs->trans("StatusOrderDraftShort"), '1'=>$langs->trans("StatusOrderValidated"), '2'=>$langs->trans("StatusOrderSentShort"), '3'=>$langs->trans("StatusOrderToBill"), '4'=>$langs->trans("StatusOrderProcessed"), '-1'=>$langs->trans("StatusOrderCanceledShort")); - print $form->selectarray('viewstatut', $liststatus, $viewstatut, 1); + print $form->selectarray('viewstatut', $liststatus, $viewstatut, -4); print ''; print ''; print ''; diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php index b2a2d6b2638..b57b0d050d7 100644 --- a/htdocs/compta/tva/clients.php +++ b/htdocs/compta/tva/clients.php @@ -100,6 +100,10 @@ if ($user->societe_id) { } $result = restrictedArea($user, 'tax', '', '', 'charges'); +// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES') +$modecompta = $conf->global->ACCOUNTING_MODE; +if (GETPOST("modecompta")) $modecompta=GETPOST("modecompta"); + /* @@ -292,7 +296,14 @@ if (is_array($coll_list)) { } else { $langs->load("errors"); if ($coll_list == -1) { - print '' . $langs->trans("ErrorNoAccountancyModuleLoaded") . ''; + if ($modecompta == 'CREANCES-DETTES') + { + print '' . $langs->trans("ErrorNoAccountancyModuleLoaded") . ''; + } + else + { + print '' . $langs->trans("FeatureNotYetAvailable") . ''; + } } else if ($coll_list == -2) { print '' . $langs->trans("FeatureNotYetAvailable") . ''; } else { @@ -377,7 +388,14 @@ if (is_array($coll_list)) { } else { $langs->load("errors"); if ($coll_list == -1) { - print '' . $langs->trans("ErrorNoAccountancyModuleLoaded") . ''; + if ($modecompta == 'CREANCES-DETTES') + { + print '' . $langs->trans("ErrorNoAccountancyModuleLoaded") . ''; + } + else + { + print '' . $langs->trans("FeatureNotYetAvailable") . ''; + } } else if ($coll_list == -2) { print '' . $langs->trans("FeatureNotYetAvailable") . ''; } else { @@ -457,7 +475,14 @@ if ($special_report) { } else { $langs->load("errors"); if ($coll_list == -1) { - print '' . $langs->trans("ErrorNoAccountancyModuleLoaded") . ''; + if ($modecompta == 'CREANCES-DETTES') + { + print '' . $langs->trans("ErrorNoAccountancyModuleLoaded") . ''; + } + else + { + print '' . $langs->trans("FeatureNotYetAvailable") . ''; + } } else { if ($coll_list == -2) { print '' . $langs->trans("FeatureNotYetAvailable") . ''; @@ -530,7 +555,14 @@ if ($special_report) { } else { $langs->load("errors"); if ($coll_list == -1) { - print '' . $langs->trans("ErrorNoAccountancyModuleLoaded") . ''; + if ($modecompta == 'CREANCES-DETTES') + { + print '' . $langs->trans("ErrorNoAccountancyModuleLoaded") . ''; + } + else + { + print '' . $langs->trans("FeatureNotYetAvailable") . ''; + } } else { if ($coll_list == -2) { print '' . $langs->trans("FeatureNotYetAvailable") . ''; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index fbef4168743..38848b6788d 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1084,18 +1084,18 @@ abstract class CommonObject function getValueFrom($table, $id, $field) { $result=false; - - $sql = "SELECT ".$field." FROM ".MAIN_DB_PREFIX.$table; - $sql.= " WHERE rowid = ".$id; - - dol_syslog(get_class($this).'::getValueFrom', LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - $row = $this->db->fetch_row($resql); - $result = $row[0]; - } - + if (!empty($id) && !empty($field) && !empty($table)) { + $sql = "SELECT ".$field." FROM ".MAIN_DB_PREFIX.$table; + $sql.= " WHERE rowid = ".$id; + + dol_syslog(get_class($this).'::getValueFrom', LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) + { + $row = $this->db->fetch_row($resql); + $result = $row[0]; + } + } return $result; } diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index a84c4548706..150dd2cadf5 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -94,7 +94,7 @@ function societe_prepare_head(Societe $object) }*/ // Tab to link resources - if ($conf->resource->enabled && ! empty($conf->global->RESOURCE_ON_THIRDPARTIES)) + if (! empty($conf->resource->enabled) && ! empty($conf->global->RESOURCE_ON_THIRDPARTIES)) { $head[$h][0] = DOL_URL_ROOT.'/resource/element_resource.php?element=societe&element_id='.$object->id; $head[$h][1] = $langs->trans("Resources"); diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 0ab44fb927b..630492fd5e9 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -1808,7 +1808,7 @@ function pdf_getLinkedObjects($object,$outputlangs) else // We show both info of order and shipment { $linkedobjects[$objecttype]['ref_title'] = $outputlangs->transnoentities("RefOrder") . ' / ' . $outputlangs->transnoentities("RefSending"); - $linkedobjects[$objecttype]['ref_value'] = $outputlangs->transnoentities($order->ref) . ($order->ref_client ? ' ('.$order->ref_client.')' : ''); + $linkedobjects[$objecttype]['ref_value'] = $outputlangs->convToOutputCharset($order->ref) . ($order->ref_client ? ' ('.$order->ref_client.')' : ''); $linkedobjects[$objecttype]['ref_value'].= ' / ' . $outputlangs->transnoentities($elementobject->ref); $linkedobjects[$objecttype]['date_title'] = $outputlangs->transnoentities("OrderDate") . ' / ' . $outputlangs->transnoentities("DateSending"); $linkedobjects[$objecttype]['date_value'] = dol_print_date($order->date,'day','',$outputlangs); diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php index b2b99d34d3b..2387332e670 100644 --- a/htdocs/core/lib/tax.lib.php +++ b/htdocs/core/lib/tax.lib.php @@ -79,7 +79,7 @@ function tax_prepare_head(ChargeSociales $object) * @param int $y Year * @param string $date_start Start date * @param string $date_end End date - * @param int $modetax 0 or 1 (option vat on debit) + * @param int $modetax 0 or 1 (option vat on debit, 1 => $modecompta = 'CREANCES-DETTES') * @param string $direction 'sell' or 'buy' * @param int $m Month * @return array List of customers third parties with vat, -1 if no accountancy module, -2 if not yet developped, -3 if error diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 96bd7b49b92..0716519457c 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -771,9 +771,10 @@ class pdf_einstein extends ModelePDFCommandes // If payment mode not forced or forced to VIR, show payment with BAN if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { - if (! empty($object->fk_bank) || ! empty($conf->global->FACTURE_RIB_NUMBER)) + if (! empty($object->fk_account) || ! empty($object->fk_bank) || ! empty($conf->global->FACTURE_RIB_NUMBER)) { - $bankid=(empty($object->fk_bank)?$conf->global->FACTURE_RIB_NUMBER:$object->fk_bank); + $bankid=(empty($object->fk_account)?$conf->global->FACTURE_RIB_NUMBER:$object->fk_account); + if (! empty($object->fk_bank)) $bankid=$object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank $account = new Account($this->db); $account->fetch($bankid); diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 48be2c907c8..ecedfd2092a 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -958,9 +958,10 @@ class pdf_crabe extends ModelePDFFactures // If payment mode not forced or forced to VIR, show payment with BAN if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { - if (! empty($object->fk_account) || ! empty($conf->global->FACTURE_RIB_NUMBER)) + if (! empty($object->fk_account) || ! empty($object->fk_bank) || ! empty($conf->global->FACTURE_RIB_NUMBER)) { $bankid=(empty($object->fk_account)?$conf->global->FACTURE_RIB_NUMBER:$object->fk_account); + if (! empty($object->fk_bank)) $bankid=$object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank $account = new Account($this->db); $account->fetch($bankid); diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index 59a882b0df5..c2594f767ba 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -114,7 +114,23 @@ class modProjet extends DolibarrModules $this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/tasks"; $this->const[$r][3] = ""; $this->const[$r][4] = 0; - + $r++; + + $this->const[$r][0] = "PROJECT_USE_OPPORTUNIES"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "1"; + $this->const[$r][3] = ""; + $this->const[$r][4] = 0; + $r++; + + /* not required (0 = not present) + $this->const[$r][0] = "PROJECT_HIDE_TASKS"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "0"; + $this->const[$r][3] = ""; + $this->const[$r][4] = 0; + */ + // Boxes $this->boxes = array(); $r=0; diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index d54b175750c..7fb02fe0514 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -917,9 +917,10 @@ class pdf_azur extends ModelePDFPropales // If payment mode not forced or forced to VIR, show payment with BAN if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { - if (! empty($object->fk_bank) || ! empty($conf->global->FACTURE_RIB_NUMBER)) + if (! empty($object->fk_account) || ! empty($object->fk_bank) || ! empty($conf->global->FACTURE_RIB_NUMBER)) { - $bankid=(empty($object->fk_bank)?$conf->global->FACTURE_RIB_NUMBER:$object->fk_bank); + $bankid=(empty($object->fk_account)?$conf->global->FACTURE_RIB_NUMBER:$object->fk_account); + if (! empty($object->fk_bank)) $bankid=$object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank $account = new Account($this->db); $account->fetch($bankid); diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php index 8cf659c9b89..a4905c30075 100644 --- a/htdocs/product/class/productcustomerprice.class.php +++ b/htdocs/product/class/productcustomerprice.class.php @@ -302,8 +302,8 @@ class Productcustomerprice extends CommonObject { global $langs; - if (! empty($sortfield)) $sortfield = "t.rowid"; - if (! empty($sortorder)) $sortorder = "DESC"; + if ( empty($sortfield)) $sortfield = "t.rowid"; + if ( empty($sortorder)) $sortorder = "DESC"; $sql = "SELECT"; $sql .= " t.rowid,"; @@ -346,8 +346,9 @@ class Productcustomerprice extends CommonObject } } } - - $sql.= $this->db->order($sortfield, $sortorder); + if (!empty($sortfield)) { + $sql.= $this->db->order($sortfield, $sortorder); + } if (! empty($limit)) $sql .= ' ' . $this->db->plimit($limit + 1, $offset); dol_syslog(get_class($this) . "::fetch_all", LOG_DEBUG); diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index e8866493833..f3baf46ae63 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -466,6 +466,7 @@ if ($action == 'create' && $user->rights->projet->creer) print $form->textwithtooltip($text.' '.img_help(),$texthelp,1); } else print $text; + print ' '.$langs->trans("AddThirdParty").''; print ''; // Status diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 8cebfb3f470..d9730aeb8d3 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1158,11 +1158,11 @@ else print ''; // Legal Form - print ''.fieldLabel('JuridicalStatus','legal_form').''; + print ''.fieldLabel('JuridicalStatus','forme_juridique_code').''; print ''; if ($object->country_id) { - print $formcompany->select_juridicalstatus($object->forme_juridique_code, $object->country_code, '', 'legal_form'); + print $formcompany->select_juridicalstatus($object->forme_juridique_code, $object->country_code, '', 'forme_juridique_code'); } else { @@ -1741,8 +1741,8 @@ else print ''; // Juridical type - print ''.fieldLabel('JuridicalStatus','legal_form').''; - print $formcompany->select_juridicalstatus($object->forme_juridique_code, $object->country_code, '', 'legal_form'); + print ''.fieldLabel('JuridicalStatus','forme_juridique_code').''; + print $formcompany->select_juridicalstatus($object->forme_juridique_code, $object->country_code, '', 'forme_juridique_code'); print ''; // Capital diff --git a/htdocs/theme/amarok/style.css.php b/htdocs/theme/amarok/style.css.php index 80f64e41561..591feac5fca 100644 --- a/htdocs/theme/amarok/style.css.php +++ b/htdocs/theme/amarok/style.css.php @@ -320,6 +320,7 @@ th .button { } .center { text-align: center; + margin: 0px auto; } .left { text-align: ; @@ -458,6 +459,10 @@ div.tmenu ul li a.tmenusel {/* texte du menu principal sélectionné */ body.body center { color:white; margin-top: 100px; } +.login_vertical_align { + padding: 10px; +} + form#login { border:solid 1px rgba(0,0,0,.4); border-top:solid 1px #ffffff; @@ -515,6 +520,10 @@ form#login table.login_table { background:none !important; } +.login_main_message { + text-align: center; +} + div#login_left, div#login_right { display: inline-block; min-width: 220px; @@ -522,7 +531,7 @@ div#login_left, div#login_right { vertical-align: middle; } -table.login_table { background-color: red !important;} +table.login_table { margin: 0px auto; background-color: red !important;} table.login_table tr td {vertical-align:middle;} table.login_table tr.vmenu td {font-size:18px;} table.login_table tr td a {color:#333333 !important;} diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index d1dd0ab4091..5e2af9e2eb2 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -226,6 +226,7 @@ div.floatright } .center { text-align: center; + margin: 0px auto; } .left { text-align: ; @@ -542,7 +543,9 @@ foreach($mainmenuusedarray as $val) /* Login */ - +.login_vertical_align { + padding: 10px; +} form#login { margin-top: px; margin-bottom: 30px; @@ -557,9 +560,8 @@ form#login { text-shadow: 1px 1px 1px #FFF; } .login_table { - padding:12px; - margin-left: 10px; - margin-right: 10px; + padding: 12px; + margin: 0px auto; /* Center */ max-width: 540px; border: 1px solid #C0C0C0; background-color: #E0E0E0; diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php index eee7afcb9c0..f74326d908d 100644 --- a/htdocs/theme/bureau2crea/style.css.php +++ b/htdocs/theme/bureau2crea/style.css.php @@ -251,6 +251,7 @@ div.floatright } .center { text-align: center; + margin: 0px auto; } .left { text-align: ; @@ -566,15 +567,19 @@ li.tmenu a.tmenudisabled { /* Login */ - +.login_vertical_align { + padding: 10px; +} +.login_main_message { + text-align: center; +} form#login { margin-top: px; margin-bottom: 30px; font-size: 13px; } .login_table_title { - margin-left: 10px; - margin-right: 10px; + margin: 0px auto; max-width: 540px; color: #888888; text-shadow: 1px 1px 1px #FFF; @@ -583,8 +588,7 @@ form#login { text-shadow: 1px 1px 1px #FFF; } .login_table { - margin-left: 10px; - margin-right: 10px; + margin: 0px auto; /* Center */ padding:12px; max-width: 540px; border: 1px solid #C0C0C0; diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php index 4b8955953bd..0fcecf98e32 100644 --- a/htdocs/theme/cameleo/style.css.php +++ b/htdocs/theme/cameleo/style.css.php @@ -227,6 +227,7 @@ div.floatright } .center { text-align: center; + margin: 0px auto; } .left { text-align: ; @@ -637,7 +638,12 @@ foreach($mainmenuusedarray as $val) /* Login */ - +.login_vertical_align { + padding: 10px; +} +.login_main_message { + text-align: center; +} form#login { margin-top: px; margin-bottom: 30px; @@ -652,8 +658,7 @@ form#login { text-shadow: 1px 1px 1px #FFF; } .login_table { - margin-left: 10px; - margin-right: 10px; + margin: 0px auto; /* Center */ padding:12px; max-width: 540px; border: 1px solid #C0C0C0; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 81b01f02aa9..d7dc79716d7 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1180,7 +1180,7 @@ div.blockvmenusearch padding-top: 3px; padding-bottom: 3px; margin: 1px 0px 8px 2px; - background: rgb(); + background: rgb(); border-left: 1px solid #AAA; border-right: 1px solid #BBB; diff --git a/htdocs/theme/md_exp/style.css.php b/htdocs/theme/md_exp/style.css.php index e92ea9f2423..c9787b7524f 100644 --- a/htdocs/theme/md_exp/style.css.php +++ b/htdocs/theme/md_exp/style.css.php @@ -646,8 +646,8 @@ div.ficheaddleft { else print "margin-top: 10px;\n"; ?> } .containercenter { -display : table; -margin : 0px auto; + display : table; + margin : 0px auto; } #pictotitle {