Merge pull request #11076 from frederic34/patch-2

phpcs fix
This commit is contained in:
Laurent Destailleur 2019-05-02 12:38:45 +02:00 committed by GitHub
commit c049ba7900
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 81 additions and 85 deletions

View File

@ -349,7 +349,7 @@ class modProduct extends DolibarrModules
'p.note_public' => "PublicNote",//public note 'p.note_public' => "PublicNote",//public note
'p.note' => "PrivateNote",//private note 'p.note' => "PrivateNote",//private note
'p.customcode' => 'CustomCode', 'p.customcode' => 'CustomCode',
'p.price' => "SellingPriceHT",//without tax 'p.price' => "SellingPriceHT",//without
'p.price_min' => "MinPrice", 'p.price_min' => "MinPrice",
'p.price_ttc' => "SellingPriceTTC",//with tax 'p.price_ttc' => "SellingPriceTTC",//with tax
'p.price_min_ttc' => "SellingMinPriceTTC", 'p.price_min_ttc' => "SellingMinPriceTTC",
@ -519,9 +519,12 @@ class modProduct extends DolibarrModules
if (is_object($mysoc) && $mysoc->useLocalTax(2)) $import_sample=array_merge($import_sample, array('p.localtax2_tx'=>'', 'p.localtax2_type'=>'')); if (is_object($mysoc) && $mysoc->useLocalTax(2)) $import_sample=array_merge($import_sample, array('p.localtax2_tx'=>'', 'p.localtax2_type'=>''));
if (! empty($conf->barcode->enabled)) $import_sample=array_merge($import_sample, array('p.barcode'=>'')); if (! empty($conf->barcode->enabled)) $import_sample=array_merge($import_sample, array('p.barcode'=>''));
if (! empty($conf->global->PRODUCT_USE_UNITS)) { if (! empty($conf->global->PRODUCT_USE_UNITS)) {
$import_sample = array_merge($import_sample, array( $import_sample = array_merge(
$import_sample,
array(
'p.fk_unit' => 'use a unit of measure from the dictionary. G/KG/M2/M3 etc....matches field "code" in table "' . MAIN_DB_PREFIX . 'c_units"' 'p.fk_unit' => 'use a unit of measure from the dictionary. G/KG/M2/M3 etc....matches field "code" in table "' . MAIN_DB_PREFIX . 'c_units"'
)); )
);
$this->import_convertvalue_array[$r] = array_merge($this->import_convertvalue_array[$r], array( $this->import_convertvalue_array[$r] = array_merge($this->import_convertvalue_array[$r], array(
'p.fk_unit' => array( 'p.fk_unit' => array(

View File

@ -137,6 +137,7 @@ if ($nolinesbefore) {
print '<td class="linecolcycleref2 right"></td>'; print '<td class="linecolcycleref2 right"></td>';
} }
if (! empty($usemargins)) if (! empty($usemargins))
{ {
if (!empty($user->rights->margins->creer)) { if (!empty($user->rights->margins->creer)) {
?> ?>
@ -149,9 +150,7 @@ if ($nolinesbefore) {
echo $langs->trans('BuyingPrice'); echo $langs->trans('BuyingPrice');
else else
echo $langs->trans('CostPrice'); echo $langs->trans('CostPrice');
?> echo '</td>';
</td>
<?php
if ($user->rights->margins->creer && ! empty($conf->global->DISPLAY_MARGIN_RATES)) echo '<td class="margininfos linecolmargin2 right"><span class="np_marginRate">'.$langs->trans('MarginRate').'</span></td>'; if ($user->rights->margins->creer && ! empty($conf->global->DISPLAY_MARGIN_RATES)) echo '<td class="margininfos linecolmargin2 right"><span class="np_marginRate">'.$langs->trans('MarginRate').'</span></td>';
if ($user->rights->margins->creer && ! empty($conf->global->DISPLAY_MARK_RATES)) echo '<td class="margininfos linecolmargin2 right"><span class="np_markRate">'.$langs->trans('MarkRate').'</span></td>'; if ($user->rights->margins->creer && ! empty($conf->global->DISPLAY_MARK_RATES)) echo '<td class="margininfos linecolmargin2 right"><span class="np_markRate">'.$langs->trans('MarkRate').'</span></td>';
} }
@ -168,9 +167,7 @@ if ($nolinesbefore) {
// Adds a line numbering column // Adds a line numbering column
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
$coldisplay++; $coldisplay++;
?> echo '<td class="nobottom linecolnum center"></td>';
<td class="nobottom linecolnum center"></td>
<?php
} }
$coldisplay++; $coldisplay++;
@ -348,14 +345,12 @@ if ($nolinesbefore) {
echo $form->selectyesno('date_end_fill', $line->date_end_fill, 1); echo $form->selectyesno('date_end_fill', $line->date_end_fill, 1);
echo '</div>'; echo '</div>';
} }
?> echo '</td>';
</td>
<?php
if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines
{ {
?>
$coldisplay++; $coldisplay++;
?>
<td class="nobottom linecolresupplier"><input id="fourn_ref" name="fourn_ref" class="flat maxwidth75" value="<?php echo (isset($_POST["fourn_ref"])?GETPOST("fourn_ref", 'alpha', 2):''); ?>"></td> <td class="nobottom linecolresupplier"><input id="fourn_ref" name="fourn_ref" class="flat maxwidth75" value="<?php echo (isset($_POST["fourn_ref"])?GETPOST("fourn_ref", 'alpha', 2):''); ?>"></td>
<?php } ?> <?php } ?>
@ -458,9 +453,7 @@ if ($nolinesbefore) {
if (is_object($objectline)) { if (is_object($objectline)) {
print $objectline->showOptionals($extrafieldsline, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); print $objectline->showOptionals($extrafieldsline, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
} }
?>
<?php
if ((! empty($conf->service->enabled) || ($object->element == 'contrat')) && $dateSelector && GETPOST('type') != '0') // We show date field if required if ((! empty($conf->service->enabled) || ($object->element == 'contrat')) && $dateSelector && GETPOST('type') != '0') // We show date field if required
{ {
?> ?>

View File

@ -127,16 +127,16 @@ try {
]); ]);
} }
/** /*
* generatePaymentResponse * generate payment response
* *
* @param object $intent Intent * @param \Stripe\PaymentIntent $intent PaymentIntent
* @return void * @return void
*/ */
function generatePaymentResponse($intent) { function generatePaymentResponse($intent)
if ($intent->status == 'requires_source_action' &&
$intent->next_action->type == 'use_stripe_sdk')
{ {
if ($intent->status == 'requires_source_action' &&
$intent->next_action->type == 'use_stripe_sdk') {
// Tell the client to handle the action // Tell the client to handle the action
echo json_encode([ echo json_encode([
'requires_action' => true, 'requires_action' => true,