This commit is contained in:
Laurent Destailleur 2023-02-22 02:35:04 +01:00
parent 7c316229db
commit dca143087b

View File

@ -1116,14 +1116,14 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
} }
print '<a href="'.$url.'" target="_stripe">'.img_picto($langs->trans('ShowInStripe').' - Customer and Publishable key = '.$companypaymentmodetemp->stripe_account, 'globe').'</a> '; print '<a href="'.$url.'" target="_stripe">'.img_picto($langs->trans('ShowInStripe').' - Customer and Publishable key = '.$companypaymentmodetemp->stripe_account, 'globe').'</a> ';
} }
print $companypaymentmodetemp->stripe_card_ref; print dol_escape_htmltag($companypaymentmodetemp->stripe_card_ref);
print '</td>'; print '</td>';
// Type // Type
print '<td>'; print '<td>';
print img_credit_card($companypaymentmodetemp->type); print img_credit_card($companypaymentmodetemp->type);
print '</td>'; print '</td>';
// Information (Owner, ...) // Information (Owner, ...)
print '<td>'; print '<td class="minwidth100">';
if ($companypaymentmodetemp->proprio) { if ($companypaymentmodetemp->proprio) {
print '<span class="opacitymedium">'.$companypaymentmodetemp->proprio.'</span><br>'; print '<span class="opacitymedium">'.$companypaymentmodetemp->proprio.'</span><br>';
} }
@ -1133,7 +1133,9 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
if ($companypaymentmodetemp->exp_date_month || $companypaymentmodetemp->exp_date_year) { if ($companypaymentmodetemp->exp_date_month || $companypaymentmodetemp->exp_date_year) {
print ' - '.sprintf("%02d", $companypaymentmodetemp->exp_date_month).'/'.$companypaymentmodetemp->exp_date_year.''; print ' - '.sprintf("%02d", $companypaymentmodetemp->exp_date_month).'/'.$companypaymentmodetemp->exp_date_year.'';
} }
print '</td><td>'; print '</td>';
// Country
print '<td class="tdoverflowmax100">';
if ($companypaymentmodetemp->country_code) { if ($companypaymentmodetemp->country_code) {
$img = picto_from_langcode($companypaymentmodetemp->country_code); $img = picto_from_langcode($companypaymentmodetemp->country_code);
print $img ? $img.' ' : ''; print $img ? $img.' ' : '';
@ -1152,12 +1154,13 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
print img_picto($langs->trans("Default"), 'on'); print img_picto($langs->trans("Default"), 'on');
} }
print '</td>'; print '</td>';
print '<td>';
if (empty($companypaymentmodetemp->stripe_card_ref)) { if (empty($companypaymentmodetemp->stripe_card_ref)) {
print $langs->trans("Local"); $s = $langs->trans("Local");
} else { } else {
print $langs->trans("LocalAndRemote"); $s = $langs->trans("LocalAndRemote");
} }
print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($s).'">';
print $s;
print '</td>'; print '</td>';
print '<td>'; print '<td>';
print dol_print_date($companypaymentmodetemp->tms, 'dayhour'); print dol_print_date($companypaymentmodetemp->tms, 'dayhour');
@ -1167,7 +1170,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint; print $hookmanager->resPrint;
// Action column // Action column
print '<td class="right nowraponall">'; print '<td class="right minwidth50 nowraponall">';
if ($permissiontoaddupdatepaymentinformation) { if ($permissiontoaddupdatepaymentinformation) {
if ($stripecu && empty($companypaymentmodetemp->stripe_card_ref)) { if ($stripecu && empty($companypaymentmodetemp->stripe_card_ref)) {
print '<a href="'.$_SERVER['PHP_SELF'].'?action=synccardtostripe&socid='.$object->id.'&id='.$companypaymentmodetemp->id.'" class="paddingrightonly marginrightonly">'.$langs->trans("CreateCardOnStripe").'</a>'; print '<a href="'.$_SERVER['PHP_SELF'].'?action=synccardtostripe&socid='.$object->id.'&id='.$companypaymentmodetemp->id.'" class="paddingrightonly marginrightonly">'.$langs->trans("CreateCardOnStripe").'</a>';
@ -1452,7 +1455,6 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
// Bank name // Bank name
print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($rib->bank).'">'.dol_escape_htmltag($rib->bank).'</td>'; print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($rib->bank).'">'.dol_escape_htmltag($rib->bank).'</td>';
// Account number // Account number
print '<td>';
$string = ''; $string = '';
foreach ($rib->getFieldsToShow() as $val) { foreach ($rib->getFieldsToShow() as $val) {
if ($val == 'BankCode') { if ($val == 'BankCode') {
@ -1478,7 +1480,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
$string .= ' '.img_picto($langs->trans("ValueIsValid"), 'info'); $string .= ' '.img_picto($langs->trans("ValueIsValid"), 'info');
} }
} }
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($string).'">';
print $string; print $string;
print '</td>'; print '</td>';
// IBAN // IBAN