diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index b8acb7adc63..6fc0efbd6e0 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -2272,11 +2272,11 @@ class AccountLine extends CommonObject /** - * Return clicable name (with picto eventually) + * Return clickable name (with picto eventually) * * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @param int $maxlen Longueur max libelle - * @param string $option Option ('showall') + * @param string $option Option ('', 'showall', 'showconciliated', 'showconciliatedandaccounted'). Options may be slow. * @param int $notooltip 1=Disable tooltip * @return string Chaine avec URL */ @@ -2294,7 +2294,7 @@ class AccountLine extends CommonObject if ($withpicto != 2) $result .= ($this->ref ? $this->ref : $this->rowid); $result .= $linkend; - if ($option == 'showall' || $option == 'showconciliated') $result .= ' ('; + if ($option == 'showall' || $option == 'showconciliated' || $option == 'showconciliatedandaccounted') $result .= ' ('; if ($option == 'showall') { $result .= $langs->trans("BankAccount").': '; @@ -2304,12 +2304,25 @@ class AccountLine extends CommonObject $accountstatic->label = $this->bank_account_label; $result .= $accountstatic->getNomUrl(0).', '; } - if ($option == 'showall' || $option == 'showconciliated') + if ($option == 'showall' || $option == 'showconciliated' || $option == 'showconciliatedandaccounted') { $result .= $langs->trans("BankLineConciliated").': '; $result .= yn($this->rappro); } - if ($option == 'showall' || $option == 'showconciliated') $result .= ')'; + if ($option == 'showall' || $option == 'showconciliatedandaccounted') + { + $sql = "SELECT COUNT(rowid) as nb FROM ".MAIN_DB_PREFIX."accounting_bookkeeping WHERE doc_type = 'bank' AND fk_doc = ".$this->id; + $resql = $this->db->query($sql); + if ($resql) { + $obj = $this->db->fetch_object($resql); + if ($obj && $obj->nb) { + $result .= ' - '.$langs->trans("Accounted").': '.yn(1); + } else { + $result .= ' - '.$langs->trans("Accounted").': '.yn(0); + } + } + } + if ($option == 'showall' || $option == 'showconciliated' || $option == 'showconciliatedandaccounted') $result .= ')'; return $result; } diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index edc76de0698..887fe2ec570 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -222,7 +222,7 @@ print ''; // Payment type (VIR, LIQ, ...) $labeltype = $langs->trans("PaymentType".$object->type_code) != ("PaymentType".$object->type_code) ? $langs->trans("PaymentType".$object->type_code) : $object->type_label; print '