diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 9ff928cfb01..d28384bd748 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -834,7 +834,9 @@ if ($id > 0) print ''; print ''; - print '
'.$langs->trans("LastContracts",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllContracts").' '.$num.'
'; + print ''.$langs->trans("AllContracts").' '.$num.''; + //print ''.img_picto($langs->trans("Statistics"),'stats').''; + print ''; print ''; } $i = 0; @@ -895,7 +897,9 @@ if ($id > 0) print ''; print ''; - print ''; + print ''; print ''; $var=!$var; } @@ -1065,7 +1069,15 @@ if ($id > 0) if (! empty($conf->facture->enabled)) { - if ($user->rights->facture->creer && $object->status==1) + if (empty($user->rights->facture->creer)) + { + print '
'.$langs->trans("AddBill").'
'; + } + else if ($object->status != 1) + { + print '
'.$langs->trans("AddBill").'
'; + } + else { $langs->load("bills"); $langs->load("orders"); @@ -1080,10 +1092,6 @@ if ($id > 0) else print '
'.$langs->trans("AddBill").'
'; } - else - { - print '
'.$langs->trans("AddBill").'
'; - } } } diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 91267578197..16fdc406db9 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3736,6 +3736,8 @@ else if ($id > 0 || ! empty($ref)) } else // Credit note { + $cssforamountpaymentcomplete=''; + // Total already paid back print ''; - print ''; + print ''; print ''; // Sold credit note diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index 30ea6639196..05cf0b4c3cb 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -233,7 +233,7 @@ abstract class CommonInvoice extends CommonObject * @param int $status Id status * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto * @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) - * @param int $type Type facture + * @param int $type Type invoice * @return string Libelle du statut */ function LibStatut($paye,$status,$mode=0,$alreadypaid=-1,$type=0) @@ -255,8 +255,8 @@ abstract class CommonInvoice extends CommonObject } else { - if ($type == 2) return $langs->trans('Bill'.$prefix.'StatusPaidBackOrConverted'); - elseif ($type == 3) return $langs->trans('Bill'.$prefix.'StatusConverted'); + if ($type == 2) return $langs->trans('Bill'.$prefix.'StatusPaidBackOrConverted'); // credit note + elseif ($type == 3) return $langs->trans('Bill'.$prefix.'StatusConverted'); // deposit invoice else return $langs->trans('Bill'.$prefix.'StatusPaid'); } } @@ -340,7 +340,11 @@ abstract class CommonInvoice extends CommonObject if ($status == 0) return ''.$langs->trans('Bill'.$prefix.'StatusDraft').' '.img_picto($langs->trans('BillStatusDraft'),'statut0'); if (($status == 3 || $status == 2) && $alreadypaid <= 0) return ''.$langs->trans('Bill'.$prefix.'StatusCanceled').' '.img_picto($langs->trans('BillStatusCanceled'),'statut5'); if (($status == 3 || $status == 2) && $alreadypaid > 0) return ''.$langs->trans('Bill'.$prefix.'StatusClosedPaidPartially').' '.img_picto($langs->trans('BillStatusClosedPaidPartially'),'statut7'); - if ($alreadypaid <= 0) return ''.$langs->trans('Bill'.$prefix.'StatusNotPaid').' '.img_picto($langs->trans('BillStatusNotPaid'),'statut1'); + if ($alreadypaid <= 0) + { + if ($type == 2) return ''.$langs->trans('Bill'.$prefix.'StatusNotRefunded').' '.img_picto($langs->trans('StatusNotRefunded'),'statut1'); + return ''.$langs->trans('Bill'.$prefix.'StatusNotPaid').' '.img_picto($langs->trans('BillStatusNotPaid'),'statut1'); + } return ''.$langs->trans('Bill'.$prefix.'StatusStarted').' '.img_picto($langs->trans('BillStatusStarted'),'statut3'); } else diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index f16fdf25413..ae5b3a3be1e 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -113,22 +113,24 @@ BillStatus=Invoice status StatusOfGeneratedInvoices=Status of generated invoices BillStatusDraft=Draft (needs to be validated) BillStatusPaid=Paid -BillStatusPaidBackOrConverted=Paid or converted into discount +BillStatusPaidBackOrConverted=Refund or converted into discount BillStatusConverted=Paid (ready for final invoice) BillStatusCanceled=Abandoned BillStatusValidated=Validated (needs to be paid) BillStatusStarted=Started BillStatusNotPaid=Not paid +BillStatusNotRefunded=Not refunded BillStatusClosedUnpaid=Closed (unpaid) BillStatusClosedPaidPartially=Paid (partially) BillShortStatusDraft=Draft BillShortStatusPaid=Paid -BillShortStatusPaidBackOrConverted=Processed +BillShortStatusPaidBackOrConverted=Refund or converted BillShortStatusConverted=Processed BillShortStatusCanceled=Abandoned BillShortStatusValidated=Validated BillShortStatusStarted=Started BillShortStatusNotPaid=Not paid +BillShortStatusNotRefunded=Not refunded BillShortStatusClosedUnpaid=Closed BillShortStatusClosedPaidPartially=Paid (partially) PaymentStatusToValidShort=To validate @@ -203,7 +205,7 @@ AlreadyPaidNoCreditNotesNoDeposits=Already paid (without credit notes and deposi Abandoned=Abandoned RemainderToPay=Remaining unpaid RemainderToTake=Remaining amount to take -RemainderToPayBack=Remaining amount to pay back +RemainderToPayBack=Remaining amount to refund Rest=Pending AmountExpected=Amount claimed ExcessReceived=Excess received diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index 85a6bba3955..838f538a273 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -391,6 +391,7 @@ LastModifiedThirdParties=Latest %s modified third parties UniqueThirdParties=Total of unique third parties InActivity=Open ActivityCeased=Closed +ThirdPartyIsClosed=Third party is closed ProductsIntoElements=List of products/services into %s CurrentOutstandingBill=Current outstanding bill OutstandingBill=Max. for outstanding bill diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index a48672699e9..ce6bceb6412 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -607,6 +607,9 @@ div.myavailability { color: #880000; font-weight: bold; } +.amountremaintopayback { + font-weight: bold; +} .savingdocmask { margin-top: 6px; margin-bottom: 12px; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 523ac5213ea..552385ab80b 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -584,6 +584,9 @@ div.myavailability { color: #880000; font-weight: bold; } +.amountremaintopayback { + font-weight: bold; +} .savingdocmask { margin-top: 6px; margin-bottom: 12px;
'.$langs->trans("LastInterventions",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllInterventions").' '.$num.'
'; + print ''; + print '
'.$langs->trans("LastInterventions",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllInterventions").' '.$num.''.img_picto($langs->trans("Statistics"),'stats').'
'; print $langs->trans('AlreadyPaidBack'); @@ -3751,7 +3753,7 @@ else if ($id > 0 || ! empty($ref)) else print $langs->trans('ExcessPaydBack'); print ' :' . price($sign * $resteapayeraffiche) . '' . price($sign * $resteapayeraffiche) . '