remove superfluous spaces

This commit is contained in:
Frédéric FRANCE 2018-08-13 09:00:22 +02:00
parent 1b27cca91c
commit 5d0d8d10fc
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
2 changed files with 34 additions and 35 deletions

View File

@ -232,7 +232,7 @@ elseif (($event->type == 'source.chargeable') && ($event->data->object->type ==
// Save into $tmptag all metadata // Save into $tmptag all metadata
$tmptag=dolExplodeIntoArray($fulltag,'.','='); $tmptag=dolExplodeIntoArray($fulltag,'.','=');
if (! empty($tmptag['ORD'])){ if (! empty($tmptag['ORD'])) {
$order=new Commande($db); $order=new Commande($db);
$order->fetch('',$tmptag['ORD']); $order->fetch('',$tmptag['ORD']);
$origin='order'; $origin='order';
@ -249,7 +249,7 @@ elseif (($event->type == 'source.chargeable') && ($event->data->object->type ==
$stripecu = $stripe->getStripeCustomerAccount($tmptag['CUS'], $servicestatus); // Get thirdparty cu_... $stripecu = $stripe->getStripeCustomerAccount($tmptag['CUS'], $servicestatus); // Get thirdparty cu_...
$charge=$stripe->createPaymentStripe($event->data->object->amount/100,$event->data->object->currency,$origin,$item,$event->data->object->id,$stripecu,$stripeacc,$servicestatus); $charge=$stripe->createPaymentStripe($event->data->object->amount/100,$event->data->object->currency,$origin,$item,$event->data->object->id,$stripecu,$stripeacc,$servicestatus);
if (isset($charge->id) && $charge->statut=='error'){ if (isset($charge->id) && $charge->statut=='error') {
$msg=$charge->message; $msg=$charge->message;
$code=$charge->code; $code=$charge->code;
$error++; $error++;
@ -272,17 +272,17 @@ elseif (($event->type == 'source.chargeable') && ($event->data->object->type ==
$ifverif=$invoice->socid; $ifverif=$invoice->socid;
$currency=$invoice->multicurrency_code; $currency=$invoice->multicurrency_code;
$total=price2num($invoice->total_ttc - $paiement - $creditnotes - $deposits,'MT'); $total=price2num($invoice->total_ttc - $paiement - $creditnotes - $deposits,'MT');
}else{ } else {
$msg=$invoice->error; $msg=$invoice->error;
$error++; $error++;
} }
}else{ } else {
$msg=$invoice->error; $msg=$invoice->error;
$error++; $error++;
} }
} }
if (!$error){ if (!$error) {
$datepaye = dol_now(); $datepaye = dol_now();
$paymentType ="CB"; $paymentType ="CB";
$amounts=array(); $amounts=array();
@ -298,10 +298,10 @@ elseif (($event->type == 'source.chargeable') && ($event->data->object->type ==
$paiement->note = ''; $paiement->note = '';
} }
if (! $error){ if (! $error) {
$paiement_id=$paiement->create($user, 0); $paiement_id=$paiement->create($user, 0);
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE) && count($invoice->lines)){ if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE) && count($invoice->lines)) {
$outputlangs = $langs; $outputlangs = $langs;
$newlang = ''; $newlang = '';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','aZ09')) $newlang = GETPOST('lang_id','aZ09'); if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','aZ09')) $newlang = GETPOST('lang_id','aZ09');
@ -315,17 +315,17 @@ elseif (($event->type == 'source.chargeable') && ($event->data->object->type ==
$invoice->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); $invoice->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
} }
if ($paiement_id < 0){ if ($paiement_id < 0) {
$msg=$paiement->errors; $msg=$paiement->errors;
$error++; $error++;
}else{ } else {
if ($event->data->object->metadata->source=='order') { if ($event->data->object->metadata->source=='order') {
$order->classifyBilled($user); $order->classifyBilled($user);
} }
} }
} }
if (! $error){ if (! $error) {
$label='(CustomerInvoicePayment)'; $label='(CustomerInvoicePayment)';
if (GETPOST('type') == 2) $label='(CustomerInvoicePaymentBack)'; if (GETPOST('type') == 2) $label='(CustomerInvoicePaymentBack)';
$paiement->addPaymentToBank($user,'payment',$label,$conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS,'',''); $paiement->addPaymentToBank($user,'payment',$label,$conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS,'','');
@ -348,4 +348,3 @@ elseif ($event->type == 'customer.deleted') {
$db->query($sql); $db->query($sql);
$db->commit(); $db->commit();
} }