Merge pull request #10712 from atm-florian/8.0

fix relative discount for prospect and supplier
This commit is contained in:
Laurent Destailleur 2019-02-28 11:26:50 +01:00 committed by GitHub
commit 92259810c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -165,11 +165,15 @@ if ($socid > 0)
print '<table class="border centpercent">';
if($isCustomer && $isSupplier) {
if($isCustomer || $isSupplier) {
// Discount type
print '<tr><td class="titlefield fieldrequired">'.$langs->trans('DiscountType').'</td>';
print '<td><input type="radio" name="discount_type" id="discount_type_0" selected value="0"/> <label for="discount_type_0">'.$langs->trans('Customer').'</label>';
print ' <input type="radio" name="discount_type" id="discount_type_1" selected value="1"/> <label for="discount_type_1">'.$langs->trans('Supplier').'</label>';
print '<tr><td class="titlefield fieldrequired">'.$langs->trans('DiscountType').'</td><td>';
if ($isCustomer) {
print '<input type="radio" name="discount_type" id="discount_type_0" selected value="0"/> <label for="discount_type_0">'.$langs->trans('Customer').'</label>';
}
if ($isSupplier) {
print ' <input type="radio" name="discount_type" id="discount_type_1" selected value="1"/> <label for="discount_type_1">'.$langs->trans('Supplier').'</label>';
}
print '</td></tr>';
}