diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 9073c9e238c..02a3cb07ffa 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -207,7 +207,7 @@ $tabsql[8] = "SELECT t.id as rowid, t.code as code, t.libelle, t.fk_country as $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.code, 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, t.element, t.source, t.code, t.libelle, t.position, t.active FROM ".MAIN_DB_PREFIX."c_type_contact AS t"; -$tabsql[12] = "SELECT c.rowid as rowid, c.code, c.libelle, c.libelle_facture, c.nbjour, c.type_cdr, c.decalage, c.active, c.sortorder, c.entity FROM ".MAIN_DB_PREFIX."c_payment_term AS c WHERE c.entity = ".getEntity($tabname[12]); +$tabsql[12] = "SELECT c.rowid as rowid, c.code, c.libelle, c.libelle_facture, c.deposit_percent, c.nbjour, c.type_cdr, c.decalage, c.active, c.sortorder, c.entity FROM ".MAIN_DB_PREFIX."c_payment_term AS c WHERE c.entity = ".getEntity($tabname[12]); $tabsql[13] = "SELECT c.id as rowid, c.code, c.libelle, c.type, c.active, c.entity FROM ".MAIN_DB_PREFIX."c_paiement AS c WHERE c.entity = ".getEntity($tabname[13]); $tabsql[14] = "SELECT e.rowid as rowid, e.code as code, e.label, 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"; @@ -299,7 +299,7 @@ $tabfield[8] = "code,libelle,country_id,country".(!empty($conf->global->SOCIETE_ $tabfield[9] = "code,label,unicode"; $tabfield[10] = "country_id,country,code,taux,localtax1_type,localtax1,localtax2_type,localtax2,recuperableonly,accountancy_code_sell,accountancy_code_buy,note"; $tabfield[11] = "element,source,code,libelle,position"; -$tabfield[12] = "code,libelle,libelle_facture,nbjour,type_cdr,decalage,sortorder,entity"; +$tabfield[12] = "code,libelle,libelle_facture,deposit_percent,nbjour,type_cdr,decalage,sortorder,entity"; $tabfield[13] = "code,libelle,type,entity"; $tabfield[14] = "code,label,price,organization,country"; $tabfield[15] = "code,libelle,width,height,unit"; @@ -345,7 +345,7 @@ $tabfieldvalue[8] = "code,libelle,country".(!empty($conf->global->SOCIETE_SORT_O $tabfieldvalue[9] = "code,label,unicode"; $tabfieldvalue[10] = "country,code,taux,localtax1_type,localtax1,localtax2_type,localtax2,recuperableonly,accountancy_code_sell,accountancy_code_buy,note"; $tabfieldvalue[11] = "element,source,code,libelle,position"; -$tabfieldvalue[12] = "code,libelle,libelle_facture,nbjour,type_cdr,decalage,sortorder"; +$tabfieldvalue[12] = "code,libelle,libelle_facture,deposit_percent,nbjour,type_cdr,decalage,sortorder"; $tabfieldvalue[13] = "code,libelle,type"; $tabfieldvalue[14] = "code,label,price,organization,country"; $tabfieldvalue[15] = "code,libelle,width,height,unit"; @@ -391,7 +391,7 @@ $tabfieldinsert[8] = "code,libelle,fk_country".(!empty($conf->global->SOCIETE_SO $tabfieldinsert[9] = "code_iso,label,unicode"; $tabfieldinsert[10] = "fk_pays,code,taux,localtax1_type,localtax1,localtax2_type,localtax2,recuperableonly,accountancy_code_sell,accountancy_code_buy,note"; $tabfieldinsert[11] = "element,source,code,libelle,position"; -$tabfieldinsert[12] = "code,libelle,libelle_facture,nbjour,type_cdr,decalage,sortorder,entity"; +$tabfieldinsert[12] = "code,libelle,libelle_facture,deposit_percent,nbjour,type_cdr,decalage,sortorder,entity"; $tabfieldinsert[13] = "code,libelle,type,entity"; $tabfieldinsert[14] = "code,label,price,organization,fk_pays"; $tabfieldinsert[15] = "code,label,width,height,unit"; @@ -738,6 +738,9 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) { if ($fieldnamekey == 'libelle_facture') { $fieldnamekey = 'LabelOnDocuments'; } + if ($fieldnamekey == 'deposit_percent') { + $fieldnamekey = 'DepositPercent'; + } if ($fieldnamekey == 'nbjour') { $fieldnamekey = 'NbOfDays'; } @@ -1284,6 +1287,10 @@ if ($id) { if ($value == 'libelle_facture') { $valuetoshow = $form->textwithtooltip($langs->trans("LabelOnDocuments"), $langs->trans("LabelUsedByDefault"), 2, 1, img_help(1, '')); } + if ($value == 'deposit_percent') { + $valuetoshow = $langs->trans('DepositPercent'); + $class = 'right'; + } if ($value == 'country') { if (in_array('region_id', $fieldlist)) { print ' '; continue; @@ -1635,6 +1642,10 @@ if ($id) { if ($value == 'libelle_facture') { $valuetoshow = $langs->trans("LabelOnDocuments"); } + if ($value == 'deposit_percent') { + $valuetoshow = $langs->trans('DepositPercent'); + $cssprefix = 'right '; + } if ($value == 'country') { $valuetoshow = $langs->trans("Country"); } @@ -1995,7 +2006,7 @@ if ($id) { if ($value == 'tracking') { $class .= ' tdoverflowauto'; } - if (in_array($value, array('pos', 'position'))) { + if (in_array($value, array('pos', 'position', 'deposit_percent'))) { $class .= ' right'; } if (in_array($value, array('localtax1_type', 'localtax2_type'))) { @@ -2380,7 +2391,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') if ($fieldlist[$field] == 'code') { $class = 'maxwidth100'; } - if (in_array($fieldlist[$field], array('pos', 'position'))) { + if (in_array($fieldlist[$field], array('pos', 'position', 'deposit_percent'))) { $classtd = 'right'; $class = 'maxwidth50 right'; } if (in_array($fieldlist[$field], array('dayrule', 'day', 'month', 'year', 'use_default', 'affect', 'delay', 'public', 'sortorder', 'sens', 'category_type', 'fk_parent'))) { diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index e475a815ac9..86344105168 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -424,6 +424,7 @@ FixAmount=Fixed amount - 1 line with label '%s' VarAmount=Variable amount (%% tot.) VarAmountOneLine=Variable amount (%% tot.) - 1 line with label '%s' VarAmountAllLines=Variable amount (%% tot.) - all lines from origin +DepositPercent=Deposit %% # PaymentType PaymentTypeVIR=Bank transfer PaymentTypeShortVIR=Bank transfer