Minor fixes in paypal translaction list
This commit is contained in:
parent
065cf89b72
commit
a52bd5f06c
@ -169,6 +169,7 @@ if (isset($_GET['action']) && ! empty($_GET['action']) && isset($_GET['transacti
|
|||||||
while (isset($_SESSION[$_GET['transaction_id']]["L_NAME".$i]))
|
while (isset($_SESSION[$_GET['transaction_id']]["L_NAME".$i]))
|
||||||
{
|
{
|
||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
|
|
||||||
$ret = $product->fetch('',$_SESSION[$_GET['transaction_id']]["L_NUMBER".$i]);
|
$ret = $product->fetch('',$_SESSION[$_GET['transaction_id']]["L_NUMBER".$i]);
|
||||||
|
|
||||||
if ($ret > 0)
|
if ($ret > 0)
|
||||||
@ -248,7 +249,7 @@ if (isset($_GET['action']) && ! empty($_GET['action']) && isset($_GET['transacti
|
|||||||
|
|
||||||
echo '<table style="noboardernopading" width="100%">';
|
echo '<table style="noboardernopading" width="100%">';
|
||||||
echo '<tr class="liste_titre">';
|
echo '<tr class="liste_titre">';
|
||||||
echo '<td colspan="2">'.$langs->trans('CustomerDetails').'</td>';
|
echo '<td colspan="2">'.$langs->trans('ThirdParty').'</td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|||||||
@ -24,10 +24,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require("../main.inc.php");
|
require("../main.inc.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT.'/lib/date.lib.php');
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php');
|
require_once(DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php');
|
||||||
require_once(DOL_DOCUMENT_ROOT."/paypal/lib/paypalfunctions.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/paypal/lib/paypalfunctions.lib.php");
|
||||||
|
|
||||||
$langs->load("paypal");
|
$langs->load("paypal");
|
||||||
|
$langs->load("paybox");
|
||||||
|
$langs->load("companies");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$result=restrictedArea($user,'paypal','','','transaction');
|
$result=restrictedArea($user,'paypal','','','transaction');
|
||||||
@ -58,11 +61,13 @@ $errors='';
|
|||||||
|
|
||||||
$nvpStr='';
|
$nvpStr='';
|
||||||
|
|
||||||
|
$now=dol_now();
|
||||||
|
|
||||||
if(isset($startDateStr) && ! empty($startDateStr)) {
|
if(isset($startDateStr) && ! empty($startDateStr)) {
|
||||||
$start_date_str = $startDateStr;
|
$start_date_str = $startDateStr;
|
||||||
$start_time = dol_stringtotime($start_date_str);
|
$start_time = dol_stringtotime($start_date_str);
|
||||||
} else {
|
} else {
|
||||||
$start_time = dol_now()-2592000; // 30 days
|
$start_time = dol_time_plus_duree($now,-1,'m'); // 30 days
|
||||||
$start_date_str = dol_print_date($start_time,'day');
|
$start_date_str = dol_print_date($start_time,'day');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,20 +78,38 @@ if(isset($endDateStr) && ! empty($endDateStr)) {
|
|||||||
$end_date_str = $endDateStr;
|
$end_date_str = $endDateStr;
|
||||||
$end_time = dol_stringtotime($end_date_str);
|
$end_time = dol_stringtotime($end_date_str);
|
||||||
} else {
|
} else {
|
||||||
$end_time = dol_now();
|
$end_time = $now;
|
||||||
$end_date_str = dol_print_date($end_time,'day');
|
$end_date_str = dol_print_date($end_time,'day');
|
||||||
}
|
}
|
||||||
|
|
||||||
$iso_end = dol_print_date($end_time,'dayhourrfc');
|
$iso_end = dol_print_date($end_time,'dayhourrfc');
|
||||||
$nvpStr.="&ENDDATE=$iso_end";
|
$nvpStr.="&ENDDATE=".$iso_end;
|
||||||
|
|
||||||
if(isset($transactionID) && ! empty($transactionID)) {
|
if(isset($transactionID) && ! empty($transactionID)) {
|
||||||
$nvpStr.="&TRANSACTIONID=$transactionID";
|
$nvpStr.="&TRANSACTIONID=$transactionID";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
|
dol_htmloutput_errors('',$errors);
|
||||||
|
|
||||||
|
print_fiche_titre(' - '.$langs->trans('PaypalTransaction'), '', 'paypal_logo@paypal');
|
||||||
|
|
||||||
|
print '<br />';
|
||||||
|
|
||||||
|
if (empty($conf->global->PAYPAL_API_USER) || empty($conf->global->PAYPAL_API_PASSWORD)
|
||||||
|
|| empty($conf->global->PAYPAL_API_SIGNATURE))
|
||||||
|
{
|
||||||
|
$langs->load("errors");
|
||||||
|
print $langs->trans("ErrorModuleSetupNotComplete");
|
||||||
|
|
||||||
|
llxFooter();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -125,7 +148,11 @@ llxHeader();
|
|||||||
modal: true,
|
modal: true,
|
||||||
width: 500,
|
width: 500,
|
||||||
buttons: {
|
buttons: {
|
||||||
'<?php echo $langs->transnoentities('Create'); ?>': function() {
|
'<?php
|
||||||
|
if ($conf->commande->enabled)
|
||||||
|
{
|
||||||
|
$langs->load("orders");
|
||||||
|
echo $langs->transnoentities('CreateOrder'); ?>': function() {
|
||||||
$.get( "<?php echo DOL_URL_ROOT; ?>/paypal/ajaxtransaction.php", {
|
$.get( "<?php echo DOL_URL_ROOT; ?>/paypal/ajaxtransaction.php", {
|
||||||
action: 'add',
|
action: 'add',
|
||||||
element: 'order',
|
element: 'order',
|
||||||
@ -139,7 +166,9 @@ llxHeader();
|
|||||||
location.href=elementurl;
|
location.href=elementurl;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
'<?php echo $langs->transnoentities('Cancel'); ?>': function() {
|
'<?php
|
||||||
|
}
|
||||||
|
echo $langs->transnoentities('Cancel'); ?>': function() {
|
||||||
$( this ).dialog( "close" );
|
$( this ).dialog( "close" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -174,11 +203,6 @@ if (! empty($nvpStr))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_htmloutput_errors('',$errors);
|
|
||||||
|
|
||||||
print_fiche_titre(' - '.$langs->trans('PaypalTransaction'), '', 'paypal_logo@paypal');
|
|
||||||
|
|
||||||
print '<br />';
|
|
||||||
|
|
||||||
// Search parameters
|
// Search parameters
|
||||||
print '<form action="'.$_SERVER['PHP_SELF'].'" method="POST">';
|
print '<form action="'.$_SERVER['PHP_SELF'].'" method="POST">';
|
||||||
@ -196,7 +220,7 @@ print '<input type="text" id="endDateStr" name="endDateStr" maxlength="20" size=
|
|||||||
print $langs->trans('Ref').': ';
|
print $langs->trans('Ref').': ';
|
||||||
print '<input type="text" name="transactionID" /> ';
|
print '<input type="text" name="transactionID" /> ';
|
||||||
|
|
||||||
print '<input type="submit" value="'.$langs->trans('Send').'" />';
|
print '<input type="submit" class="button" value="'.$langs->trans('Send').'" />';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user