commit
609c0c8b90
@ -79,24 +79,24 @@ $stripeacc = $stripe->getStripeAccount($service);
|
|||||||
|
|
||||||
if (!$rowid)
|
if (!$rowid)
|
||||||
{
|
{
|
||||||
print '<FORM method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
if ($optioncss != '') print '<INPUT type="hidden" name="optioncss" value="'.$optioncss.'">';
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
print '<INPUT type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<INPUT type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||||
print '<INPUT type="hidden" name="action" value="list">';
|
print '<input type="hidden" name="action" value="list">';
|
||||||
print '<INPUT type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
print '<INPUT type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
print '<INPUT type="hidden" name="page" value="'.$page.'">';
|
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||||
|
|
||||||
$title=$langs->trans("StripeChargeList");
|
$title=$langs->trans("StripeChargeList");
|
||||||
$title.=($stripeacc?' (Stripe connection with Stripe OAuth Connect account '.$stripeacc.')':' (Stripe connection with keys from Stripe module setup)');
|
$title.=($stripeacc?' (Stripe connection with Stripe OAuth Connect account '.$stripeacc.')':' (Stripe connection with keys from Stripe module setup)');
|
||||||
|
|
||||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num, $totalnboflines, 'title_accountancy.png', 0, '', '', $limit);
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num, $totalnboflines, 'title_accountancy.png', 0, '', '', $limit);
|
||||||
|
|
||||||
print '<DIV class="div-table-responsive">';
|
print '<div class="div-table-responsive">';
|
||||||
print '<TABLE class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||||
|
|
||||||
print '<TR class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre("Ref",$_SERVER["PHP_SELF"],"","","","",$sortfield,$sortorder);
|
print_liste_field_titre("Ref",$_SERVER["PHP_SELF"],"","","","",$sortfield,$sortorder);
|
||||||
print_liste_field_titre("StripeCustomerId",$_SERVER["PHP_SELF"],"","","","",$sortfield,$sortorder);
|
print_liste_field_titre("StripeCustomerId",$_SERVER["PHP_SELF"],"","","","",$sortfield,$sortorder);
|
||||||
print_liste_field_titre("Customer",$_SERVER["PHP_SELF"],"","","","",$sortfield,$sortorder);
|
print_liste_field_titre("Customer",$_SERVER["PHP_SELF"],"","","","",$sortfield,$sortorder);
|
||||||
@ -105,9 +105,9 @@ if (!$rowid)
|
|||||||
print_liste_field_titre("Type",$_SERVER["PHP_SELF"],"","","",'align="left"',$sortfield,$sortorder);
|
print_liste_field_titre("Type",$_SERVER["PHP_SELF"],"","","",'align="left"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre("Paid",$_SERVER["PHP_SELF"],"","","",'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre("Paid",$_SERVER["PHP_SELF"],"","","",'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre("Status",$_SERVER["PHP_SELF"],"","","",'align="right"');
|
print_liste_field_titre("Status",$_SERVER["PHP_SELF"],"","","",'align="right"');
|
||||||
print "</TR>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print "</TR>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
if ($stripeacc)
|
if ($stripeacc)
|
||||||
{
|
{
|
||||||
@ -148,7 +148,7 @@ if (!$rowid)
|
|||||||
$memberstatic->id = 0;
|
$memberstatic->id = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<TR class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
if (! empty($conf->stripe->enabled) && !empty($stripeacc)) $connect=$stripeacc.'/';
|
if (! empty($conf->stripe->enabled) && !empty($stripeacc)) $connect=$stripeacc.'/';
|
||||||
|
|
||||||
@ -158,9 +158,9 @@ if (!$rowid)
|
|||||||
{
|
{
|
||||||
$url='https://dashboard.stripe.com/'.$connect.'payments/'.$charge->id;
|
$url='https://dashboard.stripe.com/'.$connect.'payments/'.$charge->id;
|
||||||
}
|
}
|
||||||
print "<TD><a href='".$url."' target='_stripe'>".img_picto($langs->trans('ShowInStripe'), 'object_globe')." ".$charge->id."</a></TD>\n";
|
print "<td><a href='".$url."' target='_stripe'>".img_picto($langs->trans('ShowInStripe'), 'object_globe')." ".$charge->id."</a></td>\n";
|
||||||
// Stripe customer
|
// Stripe customer
|
||||||
print "<TD>";
|
print "<td>";
|
||||||
|
|
||||||
if (! empty($conf->stripe->enabled) && !empty($stripeacc)) $connect=$stripeacc.'/';
|
if (! empty($conf->stripe->enabled) && !empty($stripeacc)) $connect=$stripeacc.'/';
|
||||||
$url='https://dashboard.stripe.com/'.$connect.'test/customers/'.$charge->customer;
|
$url='https://dashboard.stripe.com/'.$connect.'test/customers/'.$charge->customer;
|
||||||
@ -168,11 +168,11 @@ if (!$rowid)
|
|||||||
{
|
{
|
||||||
$url='https://dashboard.stripe.com/'.$connect.'customers/'.$charge->customer;
|
$url='https://dashboard.stripe.com/'.$connect.'customers/'.$charge->customer;
|
||||||
}
|
}
|
||||||
print ' <a href="'.$url.'" target="_stripe">'.img_picto($langs->trans('ShowInStripe'), 'object_globe').' '.$charge->customer.'</a>';
|
print '<a href="'.$url.'" target="_stripe">'.img_picto($langs->trans('ShowInStripe'), 'object_globe').' '.$charge->customer.'</a>';
|
||||||
|
|
||||||
print "</TD>\n";
|
print "</td>\n";
|
||||||
// Link
|
// Link
|
||||||
print "<TD>";
|
print "<td>";
|
||||||
if ($societestatic->id > 0)
|
if ($societestatic->id > 0)
|
||||||
{
|
{
|
||||||
print $societestatic->getNomUrl(1);
|
print $societestatic->getNomUrl(1);
|
||||||
@ -181,27 +181,27 @@ if (!$rowid)
|
|||||||
{
|
{
|
||||||
print $memberstatic->getNomUrl(1);
|
print $memberstatic->getNomUrl(1);
|
||||||
}
|
}
|
||||||
print "</TD>\n";
|
print "</td>\n";
|
||||||
// Origine
|
// Origine
|
||||||
print "<TD>";
|
print "<td>";
|
||||||
if ($charge->metadata->dol_type=="order"){
|
if ($charge->metadata->dol_type=="order"){
|
||||||
$object = new Commande($db);
|
$object = new Commande($db);
|
||||||
$object->fetch($charge->metadata->dol_id);
|
$object->fetch($charge->metadata->dol_id);
|
||||||
if ($object->id > 0) {
|
if ($object->id > 0) {
|
||||||
print "<A href='".DOL_URL_ROOT."/commande/card.php?id=".$object->id."'>".img_picto('', 'object_order')." ".$object->ref."</A>";
|
print "<a href='".DOL_URL_ROOT."/commande/card.php?id=".$object->id."'>".img_picto('', 'object_order')." ".$object->ref."</a>";
|
||||||
} else print $FULLTAG;
|
} else print $FULLTAG;
|
||||||
} elseif ($charge->metadata->dol_type=="invoice"){
|
} elseif ($charge->metadata->dol_type=="invoice"){
|
||||||
$object = new Facture($db);
|
$object = new Facture($db);
|
||||||
$object->fetch($charge->metadata->dol_id);
|
$object->fetch($charge->metadata->dol_id);
|
||||||
if ($object->id > 0) {
|
if ($object->id > 0) {
|
||||||
print "<A href='".DOL_URL_ROOT."/compta/facture/card.php?facid=".$charge->metadata->dol_id."'>".img_picto('', 'object_invoice')." ".$object->ref."</A>";
|
print "<a href='".DOL_URL_ROOT."/compta/facture/card.php?facid=".$charge->metadata->dol_id."'>".img_picto('', 'object_invoice')." ".$object->ref."</a>";
|
||||||
} else print $FULLTAG;
|
} else print $FULLTAG;
|
||||||
} else print $FULLTAG;
|
} else print $FULLTAG;
|
||||||
print "</TD>\n";
|
print "</td>\n";
|
||||||
// Date payment
|
// Date payment
|
||||||
print '<TD align="center">'.dol_print_date($charge->created,'%d/%m/%Y %H:%M')."</TD>\n";
|
print '<td align="center">'.dol_print_date($charge->created,'%d/%m/%Y %H:%M')."</td>\n";
|
||||||
// Type
|
// Type
|
||||||
print '<TD>';
|
print '<td>';
|
||||||
if ($charge->source->object=='card')
|
if ($charge->source->object=='card')
|
||||||
{
|
{
|
||||||
print $langs->trans("card");
|
print $langs->trans("card");
|
||||||
@ -211,11 +211,11 @@ if (!$rowid)
|
|||||||
} elseif ($charge->source->type=='three_d_secure'){
|
} elseif ($charge->source->type=='three_d_secure'){
|
||||||
print $langs->trans("card3DS");
|
print $langs->trans("card3DS");
|
||||||
}
|
}
|
||||||
print '</TD>';
|
print '</td>';
|
||||||
// Amount
|
// Amount
|
||||||
print "<TD align=\"right\">".price(($charge->amount-$charge->amount_refunded)/100, 0, '', 1, - 1, - 1, strtoupper($charge->currency))."</TD>";
|
print "<td align=\"right\">".price(($charge->amount-$charge->amount_refunded)/100, 0, '', 1, - 1, - 1, strtoupper($charge->currency))."</td>";
|
||||||
// Status
|
// Status
|
||||||
print '<TD align="right">';
|
print '<td align="right">';
|
||||||
if ($charge->refunded=='1'){
|
if ($charge->refunded=='1'){
|
||||||
print img_picto($langs->trans("refunded"),'statut6');
|
print img_picto($langs->trans("refunded"),'statut6');
|
||||||
} elseif ($charge->paid=='1'){
|
} elseif ($charge->paid=='1'){
|
||||||
@ -228,9 +228,9 @@ if (!$rowid)
|
|||||||
$label.="Statut: ".$langs->trans("".$charge->outcome->seller_message."");
|
$label.="Statut: ".$langs->trans("".$charge->outcome->seller_message."");
|
||||||
print $form->textwithpicto(img_picto($langs->trans("".$charge->status.""),'statut8'),$label,1);
|
print $form->textwithpicto(img_picto($langs->trans("".$charge->status.""),'statut8'),$label,1);
|
||||||
}
|
}
|
||||||
print "</TD>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
print "</TR>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user