forked from Wavyzz/dolibarr
FIX Confusion between 'bank reconciled' and 'accounted'. Show both data
This commit is contained in:
@@ -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 $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
|
||||||
* @param int $maxlen Longueur max libelle
|
* @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
|
* @param int $notooltip 1=Disable tooltip
|
||||||
* @return string Chaine avec URL
|
* @return string Chaine avec URL
|
||||||
*/
|
*/
|
||||||
@@ -2294,7 +2294,7 @@ class AccountLine extends CommonObject
|
|||||||
if ($withpicto != 2) $result .= ($this->ref ? $this->ref : $this->rowid);
|
if ($withpicto != 2) $result .= ($this->ref ? $this->ref : $this->rowid);
|
||||||
$result .= $linkend;
|
$result .= $linkend;
|
||||||
|
|
||||||
if ($option == 'showall' || $option == 'showconciliated') $result .= ' (';
|
if ($option == 'showall' || $option == 'showconciliated' || $option == 'showconciliatedandaccounted') $result .= ' <span class="opacitymedium">(';
|
||||||
if ($option == 'showall')
|
if ($option == 'showall')
|
||||||
{
|
{
|
||||||
$result .= $langs->trans("BankAccount").': ';
|
$result .= $langs->trans("BankAccount").': ';
|
||||||
@@ -2304,12 +2304,25 @@ class AccountLine extends CommonObject
|
|||||||
$accountstatic->label = $this->bank_account_label;
|
$accountstatic->label = $this->bank_account_label;
|
||||||
$result .= $accountstatic->getNomUrl(0).', ';
|
$result .= $accountstatic->getNomUrl(0).', ';
|
||||||
}
|
}
|
||||||
if ($option == 'showall' || $option == 'showconciliated')
|
if ($option == 'showall' || $option == 'showconciliated' || $option == 'showconciliatedandaccounted')
|
||||||
{
|
{
|
||||||
$result .= $langs->trans("BankLineConciliated").': ';
|
$result .= $langs->trans("BankLineConciliated").': ';
|
||||||
$result .= yn($this->rappro);
|
$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 .= ')</span>';
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ print '</td></tr>';
|
|||||||
// Payment type (VIR, LIQ, ...)
|
// Payment type (VIR, LIQ, ...)
|
||||||
$labeltype = $langs->trans("PaymentType".$object->type_code) != ("PaymentType".$object->type_code) ? $langs->trans("PaymentType".$object->type_code) : $object->type_label;
|
$labeltype = $langs->trans("PaymentType".$object->type_code) != ("PaymentType".$object->type_code) ? $langs->trans("PaymentType".$object->type_code) : $object->type_label;
|
||||||
print '<tr><td>'.$langs->trans('PaymentMode').'</td><td>'.$labeltype;
|
print '<tr><td>'.$langs->trans('PaymentMode').'</td><td>'.$labeltype;
|
||||||
print $object->num_paiement ? ' - '.$object->num_paiement : '';
|
print $object->num_payment? ' - '.$object->num_payment : '';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Amount
|
// Amount
|
||||||
@@ -297,7 +297,7 @@ if (!empty($conf->banque->enabled))
|
|||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans('BankTransactionLine').'</td>';
|
print '<td>'.$langs->trans('BankTransactionLine').'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $bankline->getNomUrl(1, 0, 'showconciliated');
|
print $bankline->getNomUrl(1, 0, 'showconciliatedandaccounted');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5345,7 +5345,7 @@ function get_default_localtax($thirdparty_seller, $thirdparty_buyer, $local, $id
|
|||||||
/**
|
/**
|
||||||
* Return yes or no in current language
|
* Return yes or no in current language
|
||||||
*
|
*
|
||||||
* @param string $yesno Value to test (1, 'yes', 'true' or 0, 'no', 'false')
|
* @param string|int $yesno Value to test (1, 'yes', 'true' or 0, 'no', 'false')
|
||||||
* @param integer $case 1=Yes/No, 0=yes/no, 2=Disabled checkbox, 3=Disabled checkbox + Yes/No
|
* @param integer $case 1=Yes/No, 0=yes/no, 2=Disabled checkbox, 3=Disabled checkbox + Yes/No
|
||||||
* @param int $color 0=texte only, 1=Text is formated with a color font style ('ok' or 'error'), 2=Text is formated with 'ok' color.
|
* @param int $color 0=texte only, 1=Text is formated with a color font style ('ok' or 'error'), 2=Text is formated with 'ok' color.
|
||||||
* @return string HTML string
|
* @return string HTML string
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ AddBankRecordLong=Add entry manually
|
|||||||
Conciliated=Reconciled
|
Conciliated=Reconciled
|
||||||
ConciliatedBy=Reconciled by
|
ConciliatedBy=Reconciled by
|
||||||
DateConciliating=Reconcile date
|
DateConciliating=Reconcile date
|
||||||
BankLineConciliated=Entry reconciled
|
BankLineConciliated=Entry reconciled with bank receipt
|
||||||
Reconciled=Reconciled
|
Reconciled=Reconciled
|
||||||
NotReconciled=Not reconciled
|
NotReconciled=Not reconciled
|
||||||
CustomerInvoicePayment=Customer payment
|
CustomerInvoicePayment=Customer payment
|
||||||
|
|||||||
Reference in New Issue
Block a user