NEW: supplier credit notes: remove MAIN_FEATURES_LEVEL
This commit is contained in:
parent
451d943927
commit
6a4a3c9e82
@ -110,10 +110,6 @@ if ($socid > 0)
|
|||||||
$isCustomer = $object->client == 1 || $object->client == 3;
|
$isCustomer = $object->client == 1 || $object->client == 3;
|
||||||
$isSupplier = $object->fournisseur == 1;
|
$isSupplier = $object->fournisseur == 1;
|
||||||
|
|
||||||
$displayCustomer = $conf->global->MAIN_FEATURES_LEVEL <= 0 || $isCustomer;
|
|
||||||
$displaySupplier = $conf->global->MAIN_FEATURES_LEVEL > 0 && $isSupplier;
|
|
||||||
|
|
||||||
|
|
||||||
print '<form method="POST" action="remise.php?id='.$object->id.'">';
|
print '<form method="POST" action="remise.php?id='.$object->id.'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="setremise">';
|
print '<input type="hidden" name="action" value="setremise">';
|
||||||
@ -127,7 +123,7 @@ if ($socid > 0)
|
|||||||
|
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
if(! $displayCustomer && ! $displaySupplier) {
|
if(! $isCustomer && ! $isSupplier) {
|
||||||
print '<p class="opacitymedium">'.$langs->trans('ThirdpartyIsNeitherCustomerNorClientSoCannotHaveDiscounts').'</p>';
|
print '<p class="opacitymedium">'.$langs->trans('ThirdpartyIsNeitherCustomerNorClientSoCannotHaveDiscounts').'</p>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
@ -141,13 +137,13 @@ if ($socid > 0)
|
|||||||
|
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent">';
|
||||||
|
|
||||||
if($displayCustomer) {
|
if($isCustomer) {
|
||||||
// Customer discount
|
// Customer discount
|
||||||
print '<tr><td class="titlefield">';
|
print '<tr><td class="titlefield">';
|
||||||
print $langs->trans("CustomerRelativeDiscount").'</td><td>'.price2num($object->remise_percent)."%</td></tr>";
|
print $langs->trans("CustomerRelativeDiscount").'</td><td>'.price2num($object->remise_percent)."%</td></tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if($displaySupplier) {
|
if($isSupplier) {
|
||||||
// Supplier discount
|
// Supplier discount
|
||||||
print '<tr><td class="titlefield">';
|
print '<tr><td class="titlefield">';
|
||||||
print $langs->trans("SupplierRelativeDiscount").'</td><td>'.price2num($object->remise_supplier_percent)."%</td></tr>";
|
print $langs->trans("SupplierRelativeDiscount").'</td><td>'.price2num($object->remise_supplier_percent)."%</td></tr>";
|
||||||
@ -160,17 +156,17 @@ if ($socid > 0)
|
|||||||
|
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
if($conf->global->MAIN_FEATURES_LEVEL <= 0 || ($isCustomer && ! $isSupplier)) {
|
if($isCustomer && ! $isSupplier) {
|
||||||
print '<input type="hidden" name="discount_type" value="0" />';
|
print '<input type="hidden" name="discount_type" value="0" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
if($conf->global->MAIN_FEATURES_LEVEL > 0 && (! $isCustomer && $isSupplier)) {
|
if(! $isCustomer && $isSupplier) {
|
||||||
print '<input type="hidden" name="discount_type" value="1" />';
|
print '<input type="hidden" name="discount_type" value="1" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent">';
|
||||||
|
|
||||||
if($conf->global->MAIN_FEATURES_LEVEL > 0 && $isCustomer && $isSupplier) {
|
if($isCustomer && $isSupplier) {
|
||||||
// Discount type
|
// Discount type
|
||||||
print '<tr><td class="titlefield fieldrequired">'.$langs->trans('DiscountType').'</td>';
|
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 '<td><input type="radio" name="discount_type" id="discount_type_0" selected value="0"/> <label for="discount_type_0">'.$langs->trans('Customer').'</label>';
|
||||||
@ -205,8 +201,8 @@ if ($socid > 0)
|
|||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
if($displayCustomer) {
|
if($isCustomer) {
|
||||||
if($displaySupplier) {
|
if($isSupplier) {
|
||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
print '<div class="fichehalfleft">';
|
print '<div class="fichehalfleft">';
|
||||||
print load_fiche_titre($langs->trans("CustomerDiscounts"), '', '');
|
print load_fiche_titre($langs->trans("CustomerDiscounts"), '', '');
|
||||||
@ -263,8 +259,8 @@ if ($socid > 0)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($displaySupplier) {
|
if($isSupplier) {
|
||||||
if($displayCustomer) {
|
if($isCustomer) {
|
||||||
print '</div>'; // class="fichehalfleft"
|
print '</div>'; // class="fichehalfleft"
|
||||||
print '<div class="fichehalfright">';
|
print '<div class="fichehalfright">';
|
||||||
print '<div class="ficheaddleft">';
|
print '<div class="ficheaddleft">';
|
||||||
@ -321,7 +317,7 @@ if ($socid > 0)
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($displayCustomer) {
|
if($isCustomer) {
|
||||||
print '</div>'; // class="ficheaddleft"
|
print '</div>'; // class="ficheaddleft"
|
||||||
print '</div>'; // class="fichehalfright"
|
print '</div>'; // class="fichehalfright"
|
||||||
print '</div>'; // class="fichecenter"
|
print '</div>'; // class="fichecenter"
|
||||||
|
|||||||
@ -238,9 +238,6 @@ if ($socid > 0)
|
|||||||
$isCustomer = $object->client == 1 || $object->client == 3;
|
$isCustomer = $object->client == 1 || $object->client == 3;
|
||||||
$isSupplier = $object->fournisseur == 1;
|
$isSupplier = $object->fournisseur == 1;
|
||||||
|
|
||||||
$displayCustomer = $conf->global->MAIN_FEATURES_LEVEL <= 0 || $isCustomer;
|
|
||||||
$displaySupplier = $conf->global->MAIN_FEATURES_LEVEL > 0 && $isSupplier;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Display tabs
|
* Display tabs
|
||||||
*/
|
*/
|
||||||
@ -259,7 +256,7 @@ if ($socid > 0)
|
|||||||
|
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
if(! $displayCustomer && ! $displaySupplier) {
|
if(! $isCustomer && ! $isSupplier) {
|
||||||
print '<p class="opacitymedium">'.$langs->trans('ThirdpartyIsNeitherCustomerNorClientSoCannotHaveDiscounts').'</p>';
|
print '<p class="opacitymedium">'.$langs->trans('ThirdpartyIsNeitherCustomerNorClientSoCannotHaveDiscounts').'</p>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
@ -274,7 +271,7 @@ if ($socid > 0)
|
|||||||
|
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent">';
|
||||||
|
|
||||||
if($displayCustomer) { // Calcul avoirs client en cours
|
if($isCustomer) { // Calcul avoirs client en cours
|
||||||
$remise_all=$remise_user=0;
|
$remise_all=$remise_user=0;
|
||||||
$sql = "SELECT SUM(rc.amount_ht) as amount, rc.fk_user";
|
$sql = "SELECT SUM(rc.amount_ht) as amount, rc.fk_user";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe_remise_except as rc";
|
$sql.= " FROM ".MAIN_DB_PREFIX."societe_remise_except as rc";
|
||||||
@ -305,7 +302,7 @@ if ($socid > 0)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($displaySupplier) {
|
if($isSupplier) {
|
||||||
// Calcul avoirs fournisseur en cours
|
// Calcul avoirs fournisseur en cours
|
||||||
$remise_all=$remise_user=0;
|
$remise_all=$remise_user=0;
|
||||||
$sql = "SELECT SUM(rc.amount_ht) as amount, rc.fk_user";
|
$sql = "SELECT SUM(rc.amount_ht) as amount, rc.fk_user";
|
||||||
@ -349,16 +346,16 @@ if ($socid > 0)
|
|||||||
|
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
if($conf->global->MAIN_FEATURES_LEVEL <= 0 || ($isCustomer && ! $isSupplier)) {
|
if($isCustomer && ! $isSupplier) {
|
||||||
print '<input type="hidden" name="discount_type" value="0" />';
|
print '<input type="hidden" name="discount_type" value="0" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
if($conf->global->MAIN_FEATURES_LEVEL > 0 && (! $isCustomer && $isSupplier)) {
|
if(! $isCustomer && $isSupplier) {
|
||||||
print '<input type="hidden" name="discount_type" value="1" />';
|
print '<input type="hidden" name="discount_type" value="1" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
if($conf->global->MAIN_FEATURES_LEVEL > 0 && $isCustomer && $isSupplier) {
|
if($isCustomer && $isSupplier) {
|
||||||
print '<tr><td class="titlefield fieldrequired">'.$langs->trans('DiscountType').'</td>';
|
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 '<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 ' <input type="radio" name="discount_type" id="discount_type_1" selected value="1"/> <label for="discount_type_1">'.$langs->trans('Supplier').'</label>';
|
||||||
@ -408,8 +405,8 @@ if ($socid > 0)
|
|||||||
|
|
||||||
print load_fiche_titre($langs->trans("DiscountStillRemaining"));
|
print load_fiche_titre($langs->trans("DiscountStillRemaining"));
|
||||||
|
|
||||||
if($displayCustomer) {
|
if($isCustomer) {
|
||||||
if($displaySupplier) {
|
if($isSupplier) {
|
||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
print '<div class="fichehalfleft">';
|
print '<div class="fichehalfleft">';
|
||||||
print load_fiche_titre($langs->trans("CustomerDiscounts"), '', '');
|
print load_fiche_titre($langs->trans("CustomerDiscounts"), '', '');
|
||||||
@ -541,8 +538,8 @@ if ($socid > 0)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($displaySupplier) {
|
if($isSupplier) {
|
||||||
if($displayCustomer) {
|
if($isCustomer) {
|
||||||
print '</div>'; // class="fichehalfleft"
|
print '</div>'; // class="fichehalfleft"
|
||||||
print '<div class="fichehalfright">';
|
print '<div class="fichehalfright">';
|
||||||
print '<div class="ficheaddleft">';
|
print '<div class="ficheaddleft">';
|
||||||
@ -677,7 +674,7 @@ if ($socid > 0)
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($displayCustomer) {
|
if($isCustomer) {
|
||||||
print '</div>'; // class="ficheaddleft"
|
print '</div>'; // class="ficheaddleft"
|
||||||
print '</div>'; // class="fichehalfright"
|
print '</div>'; // class="fichehalfright"
|
||||||
print '</div>'; // class="fichecenter"
|
print '</div>'; // class="fichecenter"
|
||||||
@ -692,8 +689,8 @@ if ($socid > 0)
|
|||||||
|
|
||||||
print load_fiche_titre($langs->trans("DiscountAlreadyCounted"));
|
print load_fiche_titre($langs->trans("DiscountAlreadyCounted"));
|
||||||
|
|
||||||
if($displayCustomer) {
|
if($isCustomer) {
|
||||||
if($displaySupplier) {
|
if($isSupplier) {
|
||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
print '<div class="fichehalfleft">';
|
print '<div class="fichehalfleft">';
|
||||||
print load_fiche_titre($langs->trans("CustomerDiscounts"), '', '');
|
print load_fiche_titre($langs->trans("CustomerDiscounts"), '', '');
|
||||||
@ -843,8 +840,8 @@ if ($socid > 0)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($displaySupplier) {
|
if($isSupplier) {
|
||||||
if($displayCustomer) {
|
if($isCustomer) {
|
||||||
print '</div>'; // class="fichehalfleft"
|
print '</div>'; // class="fichehalfleft"
|
||||||
print '<div class="fichehalfright">';
|
print '<div class="fichehalfright">';
|
||||||
print '<div class="ficheaddleft">';
|
print '<div class="ficheaddleft">';
|
||||||
@ -994,7 +991,7 @@ if ($socid > 0)
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($displayCustomer) {
|
if($isCustomer) {
|
||||||
print '</div>'; // class="ficheaddleft"
|
print '</div>'; // class="ficheaddleft"
|
||||||
print '</div>'; // class="fichehalfright"
|
print '</div>'; // class="fichehalfright"
|
||||||
print '</div>'; // class="fichecenter"
|
print '</div>'; // class="fichecenter"
|
||||||
|
|||||||
@ -258,7 +258,6 @@ if ($object->id > 0)
|
|||||||
print "</td>";
|
print "</td>";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
if($conf->global->MAIN_FEATURES_LEVEL > 0) {
|
|
||||||
// Relative discounts (Discounts-Drawbacks-Rebates)
|
// Relative discounts (Discounts-Drawbacks-Rebates)
|
||||||
print '<tr><td class="nowrap">';
|
print '<tr><td class="nowrap">';
|
||||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
||||||
@ -291,7 +290,6 @@ if ($object->id > 0)
|
|||||||
//else print $langs->trans("DiscountNone");
|
//else print $langs->trans("DiscountNone");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
|
||||||
|
|
||||||
print '<tr class="nowrap">';
|
print '<tr class="nowrap">';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
|
|||||||
@ -1479,7 +1479,7 @@ if ($action=='create')
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 0 && $societe->id > 0)
|
if ($societe->id > 0)
|
||||||
{
|
{
|
||||||
// Discounts for third party
|
// Discounts for third party
|
||||||
print '<tr><td>' . $langs->trans('Discounts') . '</td><td>';
|
print '<tr><td>' . $langs->trans('Discounts') . '</td><td>';
|
||||||
@ -1874,8 +1874,6 @@ elseif (! empty($object->id))
|
|||||||
print '<td>'.$author->getNomUrl(1, '', 0, 0, 0).'</td>';
|
print '<td>'.$author->getNomUrl(1, '', 0, 0, 0).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 0) {
|
|
||||||
|
|
||||||
// Relative and absolute discounts
|
// Relative and absolute discounts
|
||||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||||
$filterabsolutediscount = "fk_invoice_supplier_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
|
$filterabsolutediscount = "fk_invoice_supplier_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
|
||||||
@ -1898,7 +1896,6 @@ elseif (! empty($object->id))
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php';
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
|
||||||
|
|
||||||
// Conditions de reglement par defaut
|
// Conditions de reglement par defaut
|
||||||
$langs->load('bills');
|
$langs->load('bills');
|
||||||
|
|||||||
@ -1847,8 +1847,6 @@ if ($action == 'create')
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (empty($origin))
|
if (empty($origin))
|
||||||
{
|
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 0) // Need to fix reports of standard accounting module to manage supplier credit note
|
|
||||||
{
|
{
|
||||||
if ($societe->id > 0)
|
if ($societe->id > 0)
|
||||||
{
|
{
|
||||||
@ -1909,13 +1907,12 @@ if ($action == 'create')
|
|||||||
print '</div></div>' . "\n";
|
print '</div></div>' . "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 0 && $societe->id > 0)
|
if ($societe->id > 0)
|
||||||
{
|
{
|
||||||
// Discounts for third party
|
// Discounts for third party
|
||||||
print '<tr><td>' . $langs->trans('Discounts') . '</td><td>';
|
print '<tr><td>' . $langs->trans('Discounts') . '</td><td>';
|
||||||
@ -2411,7 +2408,7 @@ else
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 0) {
|
|
||||||
// Relative and absolute discounts
|
// Relative and absolute discounts
|
||||||
print '<!-- Discounts --><tr><td>' . $langs->trans('Discounts');
|
print '<!-- Discounts --><tr><td>' . $langs->trans('Discounts');
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
@ -2422,7 +2419,6 @@ else
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php';
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
@ -2782,7 +2778,7 @@ else
|
|||||||
$creditnoteamount = 0;
|
$creditnoteamount = 0;
|
||||||
$depositamount = 0;
|
$depositamount = 0;
|
||||||
|
|
||||||
if($conf->global->MAIN_FEATURES_LEVEL > 0) {
|
|
||||||
$sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,";
|
$sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,";
|
||||||
$sql .= " re.description, re.fk_invoice_supplier_source";
|
$sql .= " re.description, re.fk_invoice_supplier_source";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "societe_remise_except as re";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "societe_remise_except as re";
|
||||||
@ -2815,8 +2811,6 @@ else
|
|||||||
} else {
|
} else {
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Paye partiellement 'escompte'
|
// Paye partiellement 'escompte'
|
||||||
if (($object->statut == FactureFournisseur::STATUS_CLOSED || $object->statut == FactureFournisseur::STATUS_ABANDONED) && $object->close_code == 'discount_vat') {
|
if (($object->statut == FactureFournisseur::STATUS_CLOSED || $object->statut == FactureFournisseur::STATUS_ABANDONED) && $object->close_code == 'discount_vat') {
|
||||||
@ -3029,7 +3023,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Reverse back money or convert to reduction
|
// Reverse back money or convert to reduction
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 0 && ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE || $object->type == FactureFournisseur::TYPE_DEPOSIT || $object->type == FactureFournisseur::TYPE_STANDARD)) {
|
if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE || $object->type == FactureFournisseur::TYPE_DEPOSIT || $object->type == FactureFournisseur::TYPE_STANDARD) {
|
||||||
// For credit note only
|
// For credit note only
|
||||||
if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && $object->statut == 1 && $object->paye == 0)
|
if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && $object->statut == 1 && $object->paye == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1050,7 +1050,7 @@ if ($action == 'create')
|
|||||||
}
|
}
|
||||||
print '</tr>' . "\n";
|
print '</tr>' . "\n";
|
||||||
|
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 0 && $soc->id > 0)
|
if ($soc->id > 0)
|
||||||
{
|
{
|
||||||
// Discounts for third party
|
// Discounts for third party
|
||||||
print '<tr><td>' . $langs->trans('Discounts') . '</td><td>';
|
print '<tr><td>' . $langs->trans('Discounts') . '</td><td>';
|
||||||
@ -1404,8 +1404,6 @@ if ($action == 'create')
|
|||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 0) {
|
|
||||||
|
|
||||||
// Relative and absolute discounts
|
// Relative and absolute discounts
|
||||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||||
$filterabsolutediscount = "fk_invoice_supplier_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
|
$filterabsolutediscount = "fk_invoice_supplier_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
|
||||||
@ -1428,7 +1426,6 @@ if ($action == 'create')
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php';
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
|
||||||
|
|
||||||
// Payment term
|
// Payment term
|
||||||
print '<tr><td class="titlefield">';
|
print '<tr><td class="titlefield">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user