Fix debited instead of credited for bank transfer sepa status
This commit is contained in:
parent
739d8e1c6b
commit
6e4fb8dd8b
@ -200,7 +200,8 @@ if ($id > 0 || $ref) {
|
||||
|
||||
//print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>'.$object->getNomUrl(1).'</td></tr>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Date").'</td><td>'.dol_print_date($object->datec, 'day').'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Amount").'</td><td>'.price($object->amount).'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Amount").'</td><td><span class="amount">'.price($object->amount).'</span></td></tr>';
|
||||
|
||||
// Status
|
||||
/*
|
||||
|
||||
@ -82,7 +82,8 @@ class BonPrelevement extends CommonObject
|
||||
|
||||
const STATUS_DRAFT = 0;
|
||||
const STATUS_TRANSFERED = 1;
|
||||
const STATUS_CREDITED = 2;
|
||||
const STATUS_CREDITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type
|
||||
const STATUS_DEBITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type
|
||||
|
||||
|
||||
/**
|
||||
@ -2343,17 +2344,22 @@ class BonPrelevement extends CommonObject
|
||||
//$langs->load("mymodule");
|
||||
$this->labelStatus[self::STATUS_DRAFT] = $langs->trans('StatusWaiting');
|
||||
$this->labelStatus[self::STATUS_TRANSFERED] = $langs->trans('StatusTrans');
|
||||
$this->labelStatus[self::STATUS_CREDITED] = $langs->trans('StatusCredited');
|
||||
$this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('StatusWaiting');
|
||||
$this->labelStatusShort[self::STATUS_TRANSFERED] = $langs->trans('StatusTrans');
|
||||
$this->labelStatusShort[self::STATUS_CREDITED] = $langs->trans('StatusCredited');
|
||||
if ($this->type == 'bank-transfer') {
|
||||
$this->labelStatus[self::STATUS_DEBITED] = $langs->trans('StatusDebited');
|
||||
$this->labelStatusShort[self::STATUS_DEBITED] = $langs->trans('StatusDebited');
|
||||
} else {
|
||||
$this->labelStatus[self::STATUS_CREDITED] = $langs->trans('StatusCredited');
|
||||
$this->labelStatusShort[self::STATUS_CREDITED] = $langs->trans('StatusCredited');
|
||||
}
|
||||
}
|
||||
|
||||
$statusType = 'status1';
|
||||
if ($status == self::STATUS_TRANSFERED) {
|
||||
$statusType = 'status3';
|
||||
}
|
||||
if ($status == self::STATUS_CREDITED) {
|
||||
if ($status == self::STATUS_CREDITED || $status == self::STATUS_DEBITED) {
|
||||
$statusType = 'status6';
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user