Fix online payments use id instead of ref into TAG
This commit is contained in:
parent
eff0e959b3
commit
1204fb1e74
@ -813,7 +813,7 @@ if ($source == 'order')
|
||||
$amount=price2num($amount);
|
||||
}
|
||||
|
||||
$fulltag='ORD='.$order->ref.'.CUS='.$order->thirdparty->id;
|
||||
$fulltag='ORD='.$order->id.'.CUS='.$order->thirdparty->id;
|
||||
//$fulltag.='.NAM='.strtr($order->thirdparty->name,"-"," ");
|
||||
if (! empty($TAG)) { $tag=$TAG; $fulltag.='.TAG='.$TAG; }
|
||||
$fulltag=dol_string_unaccent($fulltag);
|
||||
@ -933,7 +933,7 @@ if ($source == 'invoice')
|
||||
$amount=price2num($amount);
|
||||
}
|
||||
|
||||
$fulltag='INV='.$invoice->ref.'.CUS='.$invoice->thirdparty->id;
|
||||
$fulltag='INV='.$invoice->id.'.CUS='.$invoice->thirdparty->id;
|
||||
//$fulltag.='.NAM='.strtr($invoice->thirdparty->name,"-"," ");
|
||||
if (! empty($TAG)) { $tag=$TAG; $fulltag.='.TAG='.$TAG; }
|
||||
$fulltag=dol_string_unaccent($fulltag);
|
||||
@ -1115,7 +1115,7 @@ if ($source == 'contractline')
|
||||
$amount=price2num($amount);
|
||||
}
|
||||
|
||||
$fulltag='COL='.$contractline->ref.'.CON='.$contract->ref.'.CUS='.$contract->thirdparty->id.'.DAT='.dol_print_date(dol_now(),'%Y%m%d%H%M');
|
||||
$fulltag='COL='.$contractline->id.'.CON='.$contract->id.'.CUS='.$contract->thirdparty->id.'.DAT='.dol_print_date(dol_now(),'%Y%m%d%H%M');
|
||||
//$fulltag.='.NAM='.strtr($contract->thirdparty->name,"-"," ");
|
||||
if (! empty($TAG)) { $tag=$TAG; $fulltag.='.TAG='.$TAG; }
|
||||
$fulltag=dol_string_unaccent($fulltag);
|
||||
|
||||
@ -313,7 +313,7 @@ if ($ispaymentok)
|
||||
$adht = new AdherentType($db);
|
||||
$object = new Adherent($db);
|
||||
|
||||
$result1 = $object->fetch(0, $tmptag['MEM']);
|
||||
$result1 = $object->fetch($tmptag['MEM']);
|
||||
$result2 = $adht->fetch($object->typeid);
|
||||
|
||||
if ($result1 > 0 && $result2 > 0)
|
||||
@ -588,7 +588,7 @@ if ($ispaymentok)
|
||||
// Record payment
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
$invoice = new Facture($db);
|
||||
$result = $invoice->fetch(0, $tmptag['INV']);
|
||||
$result = $invoice->fetch($tmptag['INV']);
|
||||
if ($result)
|
||||
{
|
||||
$FinalPaymentAmt = $_SESSION["FinalPaymentAmt"];
|
||||
@ -776,9 +776,9 @@ if ($ispaymentok)
|
||||
}
|
||||
elseif (in_array('INV', array_keys($tmptag)))
|
||||
{
|
||||
$url=$urlwithroot."/compta/facture/card.php?ref=".$tmptag['INV'];
|
||||
$url=$urlwithroot."/compta/facture/card.php?id=".$tmptag['INV'];
|
||||
$content.='<strong>'.$companylangs->trans("Payment")."</strong><br><br>\n";
|
||||
$content.=$companylangs->trans("Invoice").': <strong>'.$tmptag['INV']."</strong><br>\n";
|
||||
$content.=$companylangs->trans("InvoiceId").': <strong>'.$tmptag['INV']."</strong><br>\n";
|
||||
//$content.=$companylangs->trans("ThirdPartyId").': '.$tmptag['CUS']."<br>\n";
|
||||
$content.=$companylangs->trans("Link").': <a href="'.$url.'">'.$url.'</a>'."<br>\n";
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user