Merge branch 'update-payboxAndPaypal' into develop

This commit is contained in:
Marion Muszynski 2016-10-31 11:52:28 +01:00
commit 644ecd0593
9 changed files with 30 additions and 21 deletions

View File

@ -3318,6 +3318,9 @@ span.anticon{
.styled-select.big-select select{
width: 420px;
}
.styled-select select:focus{
outline: none;
}
.semi-square {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;

View File

@ -141,7 +141,7 @@ class AdminLogistics extends AdminTab {
global $cookie, $logistics_carriers;
if((
(int) $cookie->profile == 1 || (int) $cookie->profile == 9 || (int) $cookie->profile == 7
(int) $cookie->profile == 1 || (int) $cookie->profile == 9 || (int) $cookie->profile == 7 || (int) $cookie->profile == 14
) && (
$delete_number = Tools::getValue('delete_number')
)) {
@ -226,7 +226,7 @@ class AdminLogistics extends AdminTab {
}
if( (Tools::isSubmit('submitReprintShip'))
&& ((int) $cookie->profile == 1 || (int) $cookie->profile == 9 || (int) $cookie->profile == 7)
&& ((int) $cookie->profile == 1 || (int) $cookie->profile == 9 || (int) $cookie->profile == 7 || (int) $cookie->profile == 14)
&& (
($id_order = Tools::getValue('id_order_reprint'))
&& ($products = Tools::getValue('products_reprint'))
@ -711,9 +711,9 @@ class AdminLogistics extends AdminTab {
<th>'.$this->l('Supplier reference').'</th>\
<th>'.$this->l('Shipping number').'</th>\
<th>'.$this->l('Carrier').'</th>\
'.(((int) $cookie->profile == 1 || (int) $cookie->profile == 9 || (int) $cookie->profile == 7)?
'.(((int) $cookie->profile == 1 || (int) $cookie->profile == 9 || (int) $cookie->profile == 7 || (int) $cookie->profile == 14)?
'<th></th>': '').'\
'.(((int) $cookie->profile == 1 || (int) $cookie->profile == 9 || (int) $cookie->profile == 7)?
'.(((int) $cookie->profile == 1 || (int) $cookie->profile == 9 || (int) $cookie->profile == 7 || (int) $cookie->profile == 14)?
'<th></th>': '').'\
</tr>\
</thead>\
@ -729,9 +729,9 @@ class AdminLogistics extends AdminTab {
<td>\' + loaded.logs[i].product_supplier_reference + \'</td>\
<td>\' + loaded.logs[i].shipping_number + \'</td>\
<td>\' + carriers[loaded.logs[i].carrier] + \'</td>\
'.(((int) $cookie->profile == 1 || (int) $cookie->profile == 9 || (int) $cookie->profile == 7)?
'.(((int) $cookie->profile == 1 || (int) $cookie->profile == 9 || (int) $cookie->profile == 7 || (int) $cookie->profile == 14)?
'<td><a href="/adm/index.php?tab=AdminLogistics&token='.Tools::getAdminTokenLite('AdminLogistics').'&id_order=\' + loaded.order.id + \'&delete_\' + loaded.logs[i].carrier + \'=\' + loaded.logs[i].id_order_detail + \'&delete_number=\' + loaded.logs[i].shipping_number + \'">x</a></td>': '').'\
'.(((int) $cookie->profile == 1 || (int) $cookie->profile == 9 || (int) $cookie->profile == 7)?
'.(((int) $cookie->profile == 1 || (int) $cookie->profile == 9 || (int) $cookie->profile == 7 || (int) $cookie->profile == 14)?
'<td><a title="Re print" class="reprint ui-icon ui-icon-arrowthickstop-1-s" data-product="\' + loaded.logs[i].product_name.replace(" - ", "<br />") + \'" data-ref="\' + loaded.logs[i].product_reference + \'" data-id_order="\' + loaded.order.id + \'" data-carrier="\' + loaded.logs[i].carrier + \'" data-id_order_detail="\' + loaded.logs[i].id_order_detail + \'">+</a></td>': '').'\
</tr>\';
}
@ -755,7 +755,7 @@ class AdminLogistics extends AdminTab {
';
if((int) $cookie->profile == 1 || (int) $cookie->profile == 2 || (int) $cookie->profile == 7) {
if((int) $cookie->profile == 1 || (int) $cookie->profile == 2 || (int) $cookie->profile == 7 || (int) $cookie->profile == 14) {
$this->_html .= '
content += \'<br /><br />\';
';

View File

@ -151,6 +151,7 @@ $values = array(
's' => (int) $num_trans[1],
'e' => $code_reponse[1],
'd' => $paybox_card['date'],
'saved' => 1
);
// payment success

View File

@ -319,7 +319,7 @@ class Paybox extends PaymentModule
if (empty($exists)) {
$sql = 'INSERT INTO `ps_paybox_transaction`
(`amount`, `id_cart`, `num_appel`, `num_autorisation`, `paiement`, `type`, `num_transaction`, `code_erreur`, `date_carte`, `date_add`)
(`amount`, `id_cart`, `num_appel`, `num_autorisation`, `paiement`, `type`, `num_transaction`, `code_erreur`, `date_carte`, `date_add`, `is_saved_card`)
VALUES (
'. (int)$values["m"] .',
'. (int)$values["r"] .',
@ -330,7 +330,8 @@ class Paybox extends PaymentModule
'. (int)$values["s"] .',
"'. pSQL($values["e"]) .'",
"'. pSQL($values["d"]) .'",
"'. date("Y-m-d H:i:s").'"
"'. date("Y-m-d H:i:s").'",
'.(isset($values['saved'])?1:0).'
)';
$save = Db::getInstance()->execute($sql);

View File

@ -123,9 +123,9 @@ class AdminPhileaMagistor extends AdminTab {
LIMIT 1
');
echo '<p class="conf">'.$this->l('Sale added to queue successfully').'</p><br />';
echo '<p class="conf">'.$this->l('CDC for this Sale added to queue successfully').'</p><br />';
} else {
echo '<p class="error">'.$this->l('Sync already in progress for this sale').'</p><br />';
echo '<p class="error">'.$this->l('CDC Sync already in progress for this sale').'</p><br />';
}
} else {
echo '<p class="error">'.$this->l('Invalid sale id').'</p><br />';
@ -306,6 +306,7 @@ class AdminPhileaMagistor extends AdminTab {
}
.table td div{
margin: 5px 0;
margin-bottom: 12px;
}
.table td .button{
padding: 5px 3px;

View File

@ -23,13 +23,13 @@ if($row = Db::getInstance()->getRow('
sleep(20);
// SEND REC01 - pas de gestion recption fournisseur sur bbb
/*Db::getInstance()->ExecuteS('
Db::getInstance()->ExecuteS('
UPDATE `'._DB_PREFIX_.'philea_sync`
SET `status` = 2
WHERE `id_sync` = '.(int) $row['id_sync'].'
LIMIT 1
');
system('cd '.dirname(__FILE__).'/script && php send_recep_orderform.php '.(int) $row['id_sale']);*/
/*system('cd '.dirname(__FILE__).'/script && php send_recep_orderform.php '.(int) $row['id_sale']);*/
}
if($row = Db::getInstance()->getRow('

View File

@ -38,12 +38,13 @@ if(is_object($iterator) && count($iterator)) {
$result = array();
foreach($xml->Listing->Message as $message) {
$result[] = ((string) $message['bloquant'] == 'False'? '<span>[W]': '<span style="color:red;">[E]').' '.(string) $message['codeArticle'].' : </span>'.(string) $message;
//$result[] = ((string) $message['bloquant'] == 'False'? '<span>[W]': '<span style="color:red;">[E]').' '.(string) $message['codeArticle'].' : </span>'.(string) $message;
$result[] = ((string) $message['bloquant'] == 'False'? '': '<span style="color:red;">[E]').' '.(string) $message['codeArticle'].' : </span>'.(string) $message;
}
$result = nl2br(implode("\n", $result));
if($result != '') {
if($result == '') {
$result = "RAS";
}
Db::getInstance()->Execute('
@ -64,7 +65,7 @@ if(is_object($iterator) && count($iterator)) {
$result = nl2br(implode("\n", $result));
if($result != '') {
if($result == '') {
$result = "RAS";
}
Db::getInstance()->Execute('

View File

@ -10,6 +10,7 @@ $id_sale = (int) $argv[1];
if($id_sale == 0) {
exit;
}
$dateNow = date('ymdHis');
function getName($id_product, $id_lang, $id_product_attribute = FALSE) {
$name = DB::getInstance()->getValue('
@ -50,7 +51,6 @@ if($magistorModule->active) {
global $regex_file_out;
$regex_file_out = '@^ART01(.*)\.(BAL|DAT)@';
@set_time_limit(0);
$dateNow = date('ymdHis');
$fileName = dirname(__FILE__) . '/OUT/ART01' . $dateNow;
$repo_archive = dirname(__FILE__) . '/archives/OUT/ARTICLES/';
@ -61,7 +61,7 @@ if($magistorModule->active) {
mkdir($repo_archive);
}
$fileArchive = $repo_archive . 'ART01' . date('ymdHis');
$fileArchive = $repo_archive . 'ART01' . $dateNow;
$code_societe = (int)(Configuration::get('PHILEA_MAGISTOR_CODE_STE'));
$db = Db::getInstance();
@ -139,11 +139,12 @@ if($magistorModule->active) {
}
if($data != '') {
$file = 'ART01'.$dateNow.'.DAT';
Db::getInstance()->Execute('
INSERT INTO `'._DB_PREFIX_.'philea_syncreport` (`id_sale`, `filename`, `date_add`)
VALUES (
'.(int)$id_sale.',
"'.pSQL('ART01'.$dateNow.'.DAT').'",
"'.pSQL($file).'",
NOW()
)
');

View File

@ -15,6 +15,7 @@ $id_sale = (int) $argv[1];
if($id_sale == 0) {
exit;
}
$dateNow = date('ymdHis');
$magistorModule = new philea_magistor();
$id_lang = Configuration::get('PS_LANG_DEFAULT');
@ -118,7 +119,6 @@ if($magistorModule->active) {
//@TODO rendre configurable le champs "reference" entre "reference" et "ean13"
$referenceField = 'reference';//Configuration::get('PHILEA_MAGISTOR_REF_FIELD');
$dateNow = date('ymdHis');
$fileName = dirname(__FILE__) . '/OUT/CDC02' . $dateNow;
$repo_archive = dirname(__FILE__) . '/archives/OUT/CMD/';
@ -330,11 +330,12 @@ if($magistorModule->active) {
if($orders and is_array($orders))
{
$file = 'CDC02'.$dateNow.'.DAT';
Db::getInstance()->Execute('
INSERT INTO `'._DB_PREFIX_.'philea_syncreport` (`id_sale`, `filename`, `date_add`)
VALUES (
'.(int)$id_sale.',
"'.pSQL('CDC02'.$dateNow.'.DAT').'",
"'.pSQL($file).'",
NOW()
)
');