';
// Ref customer
- $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
- $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
+ $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_customer, $object, 0, 'string', '', 0, 1);
+ $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_customer, $object, 0, 'string', '', null, null, '', 1);
// Thirdparty
$morehtmlref .= '
'.$object->thirdparty->getNomUrl(1);
// Project
diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php
index 412dd620392..01c09973951 100644
--- a/htdocs/compta/facture/card-rec.php
+++ b/htdocs/compta/facture/card-rec.php
@@ -1254,8 +1254,8 @@ if ($action == 'create') {
$morehtmlref .= '
';
// Ref customer
- //$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $user->hasRight('facture', 'creer'), 'string', '', 0, 1);
- //$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->hasRight('facture', 'creer'), 'string', '', null, null, '', 1);
+ //$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_customer, $object, $user->hasRight('facture', 'creer'), 'string', '', 0, 1);
+ //$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_customer, $object, $user->hasRight('facture', 'creer'), 'string', '', null, null, '', 1);
// Thirdparty
$morehtmlref .= $object->thirdparty->getNomUrl(1, 'customer');
// Project
diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php
index 069de0018b1..175782180a5 100644
--- a/htdocs/compta/facture/card.php
+++ b/htdocs/compta/facture/card.php
@@ -171,7 +171,7 @@ if (!empty($conf->global->INVOICE_USE_RETAINED_WARRANTY)) {
if ($user->socid) {
$socid = $user->socid;
}
-$isdraft = (($object->statut == Facture::STATUS_DRAFT) ? 1 : 0);
+$isdraft = (($object->status == Facture::STATUS_DRAFT) ? 1 : 0);
$result = restrictedArea($user, 'facture', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
@@ -234,7 +234,7 @@ if (empty($reshook)) {
} elseif ($action == 'reopen' && $usercanreopen) {
$result = $object->fetch($id);
- if ($object->statut == Facture::STATUS_CLOSED || ($object->statut == Facture::STATUS_ABANDONED && ($object->close_code != 'replaced' || $object->getIdReplacingInvoice() == 0)) || ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 1)) { // ($object->statut == 1 && $object->paye == 1) should not happened but can be found when data are corrupted
+ if ($object->status == Facture::STATUS_CLOSED || ($object->status == Facture::STATUS_ABANDONED && ($object->close_code != 'replaced' || $object->getIdReplacingInvoice() == 0)) || ($object->status == Facture::STATUS_VALIDATED && $object->paye == 1)) { // ($object->status == 1 && $object->paye == 1) should not happened but can be found when data are corrupted
$result = $object->setUnpaid($user);
if ($result > 0) {
header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id);
@@ -978,7 +978,7 @@ if (empty($reshook)) {
} elseif ($action == 'confirm_delete_paiement' && $confirm == 'yes' && $usercanissuepayment) {
// Delete payment
$object->fetch($id);
- if ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 0) {
+ if ($object->status == Facture::STATUS_VALIDATED && $object->paye == 0) {
$paiement = new Paiement($db);
$result = $paiement->fetch(GETPOST('paiement_id', 'int'));
if ($result > 0) {
@@ -2768,7 +2768,7 @@ if (empty($reshook)) {
// Outing situation invoice from cycle
$object->fetch($id, '', '', '', true);
- if (in_array($object->statut, array(Facture::STATUS_CLOSED, Facture::STATUS_VALIDATED))
+ if (in_array($object->status, array(Facture::STATUS_CLOSED, Facture::STATUS_VALIDATED))
&& $object->type == Facture::TYPE_SITUATION
&& $usercancreate
&& !$objectidnext
@@ -2866,7 +2866,7 @@ if (empty($reshook)) {
}
} elseif ($action == 'import_lines_from_object'
&& $usercancreate
- && $object->statut == Facture::STATUS_DRAFT
+ && $object->status == Facture::STATUS_DRAFT
&& ($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA || $object->type == Facture::TYPE_SITUATION)) {
// add lines from objectlinked
$fromElement = GETPOST('fromelement');
@@ -4184,7 +4184,7 @@ if ($action == 'create') {
$text = $langs->trans('ConfirmDeleteBill', $object->ref);
$formquestion = array();
- if ($object->type != Facture::TYPE_DEPOSIT && !empty($conf->global->STOCK_CALCULATE_ON_BILL) && $object->statut >= 1) {
+ if ($object->type != Facture::TYPE_DEPOSIT && !empty($conf->global->STOCK_CALCULATE_ON_BILL) && $object->status >= 1) {
$qualified_for_stock_change = 0;
if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
$qualified_for_stock_change = $object->hasProductsOrServices(2);
@@ -4222,7 +4222,7 @@ if ($action == 'create') {
$label = $langs->trans("ConfirmOuting");
$formquestion = array();
// remove situation from cycle
- if (in_array($object->statut, array(Facture::STATUS_CLOSED, Facture::STATUS_VALIDATED))
+ if (in_array($object->status, array(Facture::STATUS_CLOSED, Facture::STATUS_VALIDATED))
&& $usercancreate
&& !$objectidnext
&& $object->is_last_in_cycle()
@@ -4752,7 +4752,7 @@ if ($action == 'create') {
$form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$object->id, $object->multicurrency_tx, ($usercancreate ? 'multicurrency_tx' : 'none'), $object->multicurrency_code);
} else {
$form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code);
- if ($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) {
+ if ($object->status == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) {
print '
';
@@ -4818,13 +4818,13 @@ if ($action == 'create') {
print '
| ';
print $langs->trans('RetainedWarranty');
print ' | ';
- if ($action != 'editretainedwarranty' && $user->hasRight('facture', 'creer') && $object->statut == Facture::STATUS_DRAFT) {
+ if ($action != 'editretainedwarranty' && $user->hasRight('facture', 'creer') && $object->status == Facture::STATUS_DRAFT) {
print 'id.'">'.img_edit($langs->trans('setretainedwarranty'), 1).' | ';
}
print '
';
print '
';
- if ($action == 'editretainedwarranty' && $object->statut == Facture::STATUS_DRAFT) {
+ if ($action == 'editretainedwarranty' && $object->status == Facture::STATUS_DRAFT) {
print ' |