Fix phpcs

This commit is contained in:
Laurent Destailleur 2020-01-01 22:58:26 +01:00
parent b90dbb585a
commit 607d013a9d
2 changed files with 24 additions and 24 deletions

View File

@ -356,35 +356,36 @@ if ($nolinesbefore) {
<input type="text" size="5" name="price_ht" id="price_ht" class="flat right" value="<?php echo (isset($_POST["price_ht"]) ?GETPOST("price_ht", 'alpha', 2) : ''); ?>"> <input type="text" size="5" name="price_ht" id="price_ht" class="flat right" value="<?php echo (isset($_POST["price_ht"]) ?GETPOST("price_ht", 'alpha', 2) : ''); ?>">
</td> </td>
<?php if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { <?php
if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) {
$coldisplay++; $coldisplay++;
?> ?>
<td class="nobottom linecoluht_currency right"> <td class="nobottom linecoluht_currency right">
<input type="text" size="5" name="multicurrency_price_ht" id="multicurrency_price_ht" class="flat right" value="<?php echo (isset($_POST["multicurrency_price_ht"]) ?GETPOST("multicurrency_price_ht", 'alpha', 2) : ''); ?>"> <input type="text" size="5" name="multicurrency_price_ht" id="multicurrency_price_ht" class="flat right" value="<?php echo (isset($_POST["multicurrency_price_ht"]) ?GETPOST("multicurrency_price_ht", 'alpha', 2) : ''); ?>">
</td> </td>
<?php } <?php
}
if (!empty($inputalsopricewithtax)) { if (!empty($inputalsopricewithtax)) {
$coldisplay++; $coldisplay++;
?> ?>
<td class="nobottom linecoluttc right"> <td class="nobottom linecoluttc right">
<input type="text" size="5" name="price_ttc" id="price_ttc" class="flat" value="<?php echo (isset($_POST["price_ttc"]) ?GETPOST("price_ttc", 'alpha', 2) : ''); ?>"> <input type="text" size="5" name="price_ttc" id="price_ttc" class="flat" value="<?php echo (isset($_POST["price_ttc"]) ?GETPOST("price_ttc", 'alpha', 2) : ''); ?>">
</td> </td>
<?php } <?php
}
$coldisplay++; $coldisplay++;
?> ?>
<td class="nobottom linecolqty right"><input type="text" size="2" name="qty" id="qty" class="flat right" value="<?php echo (isset($_POST["qty"]) ?GETPOST("qty", 'alpha', 2) : 1); ?>"> <td class="nobottom linecolqty right"><input type="text" size="2" name="qty" id="qty" class="flat right" value="<?php echo (isset($_POST["qty"]) ?GETPOST("qty", 'alpha', 2) : 1); ?>">
</td> </td>
<?php <?php
if ($conf->global->PRODUCT_USE_UNITS) if (! empty($conf->global->PRODUCT_USE_UNITS)) {
{
$coldisplay++; $coldisplay++;
print '<td class="nobottom linecoluseunit left">'; print '<td class="nobottom linecoluseunit left">';
print $form->selectUnits($line->fk_unit, "units"); print $form->selectUnits($line->fk_unit, "units");
print '</td>'; print '</td>';
} }
$remise_percent = $buyer->remise_percent; $remise_percent = $buyer->remise_percent;
if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') {
{
$remise_percent = $seller->remise_supplier_percent; $remise_percent = $seller->remise_supplier_percent;
} }
$coldisplay++; $coldisplay++;
@ -397,8 +398,7 @@ if ($nolinesbefore) {
$coldisplay++; $coldisplay++;
print '<td></td>'; print '<td></td>';
} }
if (!empty($usemargins)) if (!empty($usemargins)) {
{
if (!empty($user->rights->margins->creer)) { if (!empty($user->rights->margins->creer)) {
$coldisplay++; $coldisplay++;
?> ?>
@ -486,19 +486,19 @@ if (!empty($usemargins) && $user->rights->margins->creer)
/* Some js test when we click on button "Add" */ /* Some js test when we click on button "Add" */
jQuery(document).ready(function() { jQuery(document).ready(function() {
<?php <?php
if (!empty($conf->global->DISPLAY_MARGIN_RATES)) { ?> if (!empty($conf->global->DISPLAY_MARGIN_RATES)) { ?>
$("input[name='np_marginRate']:first").blur(function(e) { $("input[name='np_marginRate']:first").blur(function(e) {
return checkFreeLine(e, "np_marginRate"); return checkFreeLine(e, "np_marginRate");
}); });
<?php <?php
} }
if (!empty($conf->global->DISPLAY_MARK_RATES)) { ?> if (!empty($conf->global->DISPLAY_MARK_RATES)) { ?>
$("input[name='np_markRate']:first").blur(function(e) { $("input[name='np_markRate']:first").blur(function(e) {
return checkFreeLine(e, "np_markRate"); return checkFreeLine(e, "np_markRate");
}); });
<?php <?php
} }
?> ?>
}); });
/* TODO This does not work for number with thousand separator that is , */ /* TODO This does not work for number with thousand separator that is , */

View File

@ -482,7 +482,7 @@ if (empty($reshook))
$amount_ht = $amount_tva = $amount_ttc = array(); $amount_ht = $amount_tva = $amount_ttc = array();
$multicurrency_amount_ht = $multicurrency_amount_tva = $multicurrency_amount_ttc = array(); $multicurrency_amount_ht = $multicurrency_amount_tva = $multicurrency_amount_ttc = array();
// Loop on each vat rate // Loop on each vat rate
$i = 0; $i = 0;
foreach ($object->lines as $line) foreach ($object->lines as $line)
@ -557,7 +557,7 @@ if (empty($reshook))
$total_creditnote_and_deposit += $obj->amount_ttc; $total_creditnote_and_deposit += $obj->amount_ttc;
} }
} else dol_print_error($db); } else dol_print_error($db);
$discount->amount_ht = $discount->amount_ttc = $total_paiements + $total_creditnote_and_deposit - $object->total_ttc; $discount->amount_ht = $discount->amount_ttc = $total_paiements + $total_creditnote_and_deposit - $object->total_ttc;
$discount->amount_tva = 0; $discount->amount_tva = 0;
$discount->tva_tx = 0; $discount->tva_tx = 0;