|
@@ -185,18 +185,18 @@ if ($id > 0 || $ref) {
|
|
|
print '</tr>';
|
|
|
*/
|
|
|
|
|
|
- if ($object->date_trans <> 0) {
|
|
|
+ if (!empty($object->date_trans)) {
|
|
|
$muser = new User($db);
|
|
|
$muser->fetch($object->user_trans);
|
|
|
|
|
|
print '<tr><td>'.$langs->trans("TransData").'</td><td>';
|
|
|
print dol_print_date($object->date_trans, 'day');
|
|
|
- print ' <span class="opacitymedium">'.$langs->trans("By").'</span> '.$muser->getNomUrl(-1).'</td></tr>';
|
|
|
+ print ' <span class="opacitymedium">'.$langs->trans("By").'</span> '.$muser->getNomUrl(-1).'</td></tr>';
|
|
|
print '<tr><td>'.$langs->trans("TransMetod").'</td><td>';
|
|
|
print $object->methodes_trans[$object->method_trans];
|
|
|
print '</td></tr>';
|
|
|
}
|
|
|
- if ($object->date_credit <> 0) {
|
|
|
+ if (!empty($object->date_credit)) {
|
|
|
print '<tr><td>'.$langs->trans('CreditDate').'</td><td>';
|
|
|
print dol_print_date($object->date_credit, 'day');
|
|
|
print '</td></tr>';
|
|
@@ -290,7 +290,7 @@ if ($id > 0 || $ref) {
|
|
|
print '<br>';
|
|
|
}
|
|
|
|
|
|
- if (!empty($object->date_trans) && $object->date_credit == 0 && $user->rights->prelevement->bons->credit && $action == 'setcredited') {
|
|
|
+ if (!empty($object->date_trans) && empty($object->date_credit) && $user->rights->prelevement->bons->credit && $action == 'setcredited') {
|
|
|
$btnLabel = ($object->type == 'bank-transfer') ? $langs->trans("ClassDebited") : $langs->trans("ClassCredited");
|
|
|
print '<form name="infocredit" method="post" action="card.php?id='.$object->id.'">';
|
|
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
|
@@ -318,8 +318,7 @@ if ($id > 0 || $ref) {
|
|
|
if ($object->type == 'bank-transfer') print dolGetButtonAction($langs->trans("SetToStatusSent"), '', 'default', 'card.php?action=settransmitted&token='.newToken().'&id='.$object->id, '', $user->rights->paymentbybanktransfer->send);
|
|
|
else print dolGetButtonAction($langs->trans("SetToStatusSent"), '', 'default', 'card.php?action=settransmitted&token='.newToken().'&id='.$object->id, '', $user->rights->prelevement->bons->send);
|
|
|
}
|
|
|
-
|
|
|
- if (!empty($object->date_trans) && $object->date_credit == 0) {
|
|
|
+ if (!empty($object->date_trans) && empty($object->date_credit)) {
|
|
|
if ($object->type == 'bank-transfer') print dolGetButtonAction($langs->trans("ClassDebited"), '', 'default', 'card.php?action=setcredited&token='.newToken().'&id='.$object->id, '', $user->rights->paymentbybanktransfer->debit);
|
|
|
else print dolGetButtonAction($langs->trans("ClassCredited"), '', 'default', 'card.php?action=setcredited&token='.newToken().'&id='.$object->id, '', $user->rights->prelevement->bons->credit);
|
|
|
}
|