fix cmd fourn no msg

This commit is contained in:
jpb 2021-07-21 08:26:41 +02:00
parent d61b831737
commit 32f9b1a556
2 changed files with 7 additions and 4 deletions

View File

@ -68,6 +68,7 @@ if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf-
if (in_array($object->element, array('propal', 'commande', 'order', 'facture', 'facturerec', 'invoice', 'supplier_proposal', 'order_supplier', 'invoice_supplier'))) { if (in_array($object->element, array('propal', 'commande', 'order', 'facture', 'facturerec', 'invoice', 'supplier_proposal', 'order_supplier', 'invoice_supplier'))) {
$colspan++; // With this, there is a column move button $colspan++; // With this, there is a column move button
} }
//print $object->element; //print $object->element;
// Lines for extrafield // Lines for extrafield
$objectline = null; $objectline = null;
@ -674,16 +675,17 @@ if (!empty($usemargins) && $user->rights->margins->creer) {
<?php <?php
} }
?> ?>
<?php if ($this->table_element_line != 'commande_fournisseurdet' || $this->table_element_line == 'facture_fourn_det') { ?>
$("#date_start, #date_end").focusout(function() $("#date_start, #date_end").focusout(function()
{ {
if ( $(this).val() == '' && !$(this).hasClass("error") ) { if ( $(this).val() == '' && !$(this).hasClass("error") ) {
$(this).addClass('error'); $(this).addClass('error');
}else{ }else{
$(this).removeClass('error'); $(this).removeClass('error');
} }
}); });
<?php } ?>
/* When changing predefined product, we reload list of supplier prices required for margin combo */ /* When changing predefined product, we reload list of supplier prices required for margin combo */
$("#idprod, #idprodfournprice").change(function() $("#idprod, #idprodfournprice").change(function()
{ {
@ -712,8 +714,6 @@ if (!empty($usemargins) && $user->rights->margins->creer) {
function(data) { function(data) {
console.log("Load unit price end, we got value "+data.price_ht); console.log("Load unit price end, we got value "+data.price_ht);
// service and we setted mandatory_period to true // service and we setted mandatory_period to true
if (data.mandatory_period == 1 && data.type == 1 ) { if (data.mandatory_period == 1 && data.type == 1 ) {
jQuery("#date_start").addClass("error"); jQuery("#date_start").addClass("error");

View File

@ -184,6 +184,7 @@ if (($line->info_bits & 2) == 2) {
if (!$line->date_start || !$line->date_end) { if (!$line->date_start || !$line->date_end) {
// show warning under line // show warning under line
// we need to fetch product associated to line for some test // we need to fetch product associated to line for some test
if ($object->element != 'order_supplier'){
$res = $line->fetch_product(); $res = $line->fetch_product();
if ($res > 0 ) { if ($res > 0 ) {
if ($line->product->isService() && $line->product->isMandatoryPeriod()) { if ($line->product->isService() && $line->product->isMandatoryPeriod()) {
@ -192,6 +193,8 @@ if (($line->info_bits & 2) == 2) {
} }
} }
}