diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php
index 1d05d5e0afe..6b46468b916 100644
--- a/htdocs/admin/delais.php
+++ b/htdocs/admin/delais.php
@@ -418,7 +418,6 @@ if($action == 'edit') {
print '
';
} else {
- // Boutons d'action
print '
| '.$langs->trans("Type").' | '; print ''.$langs->trans("Ref").' | '; - print ''.$langs->trans("Link").' | '; + print ''.$langs->trans("Document").' | '; print ''.$langs->trans("Paid").' | '; print ''.$langs->trans("Debit").' | '; print ''.$langs->trans("Credit").' | '; @@ -402,12 +402,10 @@ if (!empty($date_start) && !empty($date_stop)) // Balance calculation $balance = 0; foreach($TData as &$data1) { - if ($data1['item']!='Invoice'&& $data1['item']!='Donation' ){ + if ($data1['item']!='Invoice' && $data1['item']!='Donation') + { $data1['amount']=-$data1['amount']; } - if ($data1['amount']>0){ - }else{ - } $balance += $data1['amount']; $data1['balance'] = $balance; } @@ -419,14 +417,19 @@ if (!empty($date_start) && !empty($date_stop)) //if (!empty($data['fk_facture'])) $html_class = 'facid-'.$data['fk_facture']; //elseif (!empty($data['fk_paiement'])) $html_class = 'payid-'.$data['fk_paiement']; print '|
| "; + print " | "; print dol_print_date($data['date'], 'day'); print " | \n"; print ''.$langs->trans($data['item']).' | '; print ''.$data['ref'].' | '; // File link - print '".$data['name']." | \n"; + print ''; + if ($data['link']) + { + print ''.($data['name'] ? $data['name'] : $data['ref']).''; + } + print " | \n"; print ''.$data['paid'].' | '; print ''.(($data['amount'] > 0) ? price(abs($data['amount'])) : '')." | \n"; diff --git a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php index 97f0b876abc..a9fbb5da2eb 100644 --- a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php @@ -38,6 +38,8 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; $langs->load("bills"); +$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc'); + $total=0; $ilink=0; foreach($linkedObjectBlock as $key => $objectlink) { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 63246fb0287..c4aaab27a84 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6480,7 +6480,7 @@ class Form public function showLinkedObjectBlock($object, $morehtmlright = '', $compatibleImportElementsList = false) { global $conf,$langs,$hookmanager; - global $bc; + global $bc, $action; $object->fetchObjectLinked(); @@ -6525,6 +6525,7 @@ class Form $showImportButton=true; } + $regs = array(); if ($objecttype != 'supplier_proposal' && preg_match('/^([^_]+)_([^_]+)/i', $objecttype, $regs)) { $element = $regs[1]; @@ -6628,7 +6629,7 @@ class Form public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excludelinksto = array()) { global $conf, $langs, $hookmanager; - global $bc; + global $bc, $action; $linktoelem=''; $linktoelemlist=''; @@ -6663,8 +6664,6 @@ class Form ); } - global $action; - // Can complete the possiblelink array $hookmanager->initHooks(array('commonobject')); $parameters=array('listofidcompanytoscan' => $listofidcompanytoscan); diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index d2fb93000a9..d1366cb8511 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -908,7 +908,7 @@ class FormCompany $out = '
| '. $langs->trans("CreateSurveyDate") .' | '."\n"; print ' | '; - print $form->select_duration('timespent_duration', ($_POST['timespent_duration']?$_POST['timespent_duration']:''), 0, 'text'); + $durationtouse = ($_POST['timespent_duration']?$_POST['timespent_duration']:''); + if (GETPOSTISSET('timespent_durationhour') || GETPOSTISSET('timespent_durationmin')) + { + $durationtouse = (GETPOST('timespent_durationhour') * 3600 + GETPOST('timespent_durationmin') * 60); + } + print $form->select_duration('timespent_duration', $durationtouse, 0, 'text'); print ' | '; // Progress declared diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index d55ea537297..d7034017691 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -952,10 +952,10 @@ else $object->name = GETPOST('name', 'alpha'); $object->firstname = GETPOST('firstname', 'alpha'); $object->particulier = $private; - $object->prefix_comm = GETPOST('prefix_comm'); - $object->client = GETPOST('client')?GETPOST('client'):$object->client; + $object->prefix_comm = GETPOST('prefix_comm', 'alpha'); + $object->client = GETPOST('client', 'int')?GETPOST('client', 'int'):$object->client; - if(empty($duplicate_code_error)) { + if (empty($duplicate_code_error)) { $object->code_client = GETPOST('customer_code', 'alpha'); $object->fournisseur = GETPOST('fournisseur')?GETPOST('fournisseur'):$object->fournisseur; } @@ -1187,7 +1187,7 @@ else // Prospect/Customer print '
| '.$form->editfieldkey('ProspectCustomer', 'customerprospect', '', $object, 0, 'string', '', 1).' | '; print ''; - $selected=GETPOST('client', 'int')!=''?GETPOST('client', 'int'):$object->client; + $selected=(GETPOSTISSET('client', 'int')?GETPOST('client', 'int'):$object->client); print $formcompany->selectProspectCustomerType($selected); print ' | '; diff --git a/htdocs/theme/eldy/btn.inc.php b/htdocs/theme/eldy/btn.inc.php index c0cd029126d..1d00718401b 100644 --- a/htdocs/theme/eldy/btn.inc.php +++ b/htdocs/theme/eldy/btn.inc.php @@ -5,7 +5,7 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> /* ============================================================================== */ -/* Boutons actions */ +/* Buttons for actions */ /* ============================================================================== */ div.divButAction { diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index e5e68e59c48..9061595dd1d 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -2362,7 +2362,7 @@ span.tabspan { } /* ============================================================================== */ -/* Boutons actions */ +/* Buttons for actions */ /* ============================================================================== */ diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 752f60541d1..8020a490181 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2400,7 +2400,7 @@ div.tabBar table.tableforservicepart2:last-child { } /* ============================================================================== */ -/* Boutons actions */ +/* Buttons for actions */ /* ============================================================================== */ div.divButAction { @@ -2503,7 +2503,7 @@ span.tabspan { } /* ============================================================================== */ -/* Boutons actions */ +/* Buttons for actions */ /* ============================================================================== */ div.divButAction {