diff --git a/htdocs/core/tpl/onlinepaymentlinks.tpl.php b/htdocs/core/tpl/onlinepaymentlinks.tpl.php index 27ba8b994b4..a425055135f 100644 --- a/htdocs/core/tpl/onlinepaymentlinks.tpl.php +++ b/htdocs/core/tpl/onlinepaymentlinks.tpl.php @@ -80,9 +80,9 @@ if (! empty($conf->contrat->enabled)) print ''.getOnlinePaymentUrl(1,'contractline')."
\n"; if (! empty($conf->global->PAYMENT_SECURITY_TOKEN) && ! empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { - $langs->load("contract"); + $langs->load("contracts"); print '
'; - print $langs->trans("EnterRefToBuildUrl",$langs->transnoentitiesnoconv("Contract")).': '; + print $langs->trans("EnterRefToBuildUrl",$langs->transnoentitiesnoconv("ContractLine")).': '; print ''; print ''; if (GETPOST('generate_contract_ref')) diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index d643b755c5f..6a198deb9e0 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -1117,7 +1117,8 @@ if ($source == 'contractline') $text=''.$langs->trans("PaymentRenewContractId",$contract->ref,$contractline->ref).''; if ($contractline->fk_product) { - $text.='
'.$product->ref.($product->label?' - '.$product->label:''); + $contractline->fetch_product(); + $text.='
'.$contractline->product->ref.($contractline->product->label?' - '.$contractline->product->label:''); } if ($contractline->description) $text.='
'.dol_htmlentitiesbr($contractline->description); //if ($contractline->date_fin_validite) { @@ -1148,12 +1149,12 @@ if ($source == 'contractline') $duration=''; if ($contractline->fk_product) { - if ($product->isService() && $product->duration_value > 0) + if ($contractline->product->isService() && $contractline->product->duration_value > 0) { $label=$langs->trans("Duration"); // TODO Put this in a global method - if ($product->duration_value > 1) + if ($contractline->product->duration_value > 1) { $dur=array("h"=>$langs->trans("Hours"),"d"=>$langs->trans("DurationDays"),"w"=>$langs->trans("DurationWeeks"),"m"=>$langs->trans("DurationMonths"),"y"=>$langs->trans("DurationYears")); } @@ -1161,7 +1162,7 @@ if ($source == 'contractline') { $dur=array("h"=>$langs->trans("Hour"),"d"=>$langs->trans("DurationDay"),"w"=>$langs->trans("DurationWeek"),"m"=>$langs->trans("DurationMonth"),"y"=>$langs->trans("DurationYear")); } - $duration=$product->duration_value.' '.$dur[$product->duration_unit]; + $duration=$contractline->product->duration_value.' '.$dur[$contractline->product->duration_unit]; } } print ''.$label.''; diff --git a/htdocs/public/stripe/newpayment.php b/htdocs/public/stripe/newpayment.php index 5357f99dd3d..fcc7acd29ad 100644 --- a/htdocs/public/stripe/newpayment.php +++ b/htdocs/public/stripe/newpayment.php @@ -21,10 +21,10 @@ */ /** -* \file htdocs/public/stripe/newpayment.php -* \ingroup Stripe -* \brief Page to do payment with Stripe -*/ + * \file htdocs/public/stripe/newpayment.php + * \ingroup Stripe + * \brief Page to do payment with Stripe + */ define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK",1); // We accept to go on this page from external web site.