Merge pull request #1670 from FHenry/3.5
Fix [ bug #1349 ] AJAX contact selector does not work fine in Project
This commit is contained in:
commit
6740e0321a
@ -22,6 +22,10 @@ Fix: [ bug #1451 ] Interrupted order clone through trigger, loads nonexistent or
|
||||
Fix: [ bug #1454 ] Mention de bas de page erroné
|
||||
Fix: Do not display dictionnay for non activated module
|
||||
Fix: Link element from element project pages
|
||||
Fix: [ bug #1349 ] AJAX contact selector does not work fine in Project card
|
||||
Fix: [ bug #1452 ] variable used but not defined
|
||||
Fix: If multiprice level is used the VAT on addline is not correct
|
||||
Fix: [ bug #1254 ] Error when using "Enter" on qty input box of a product (on supplier order part)
|
||||
|
||||
***** ChangeLog for 3.5.3 compared to 3.5.2 *****
|
||||
Fix: Error on field accountancy code for export profile of invoices.
|
||||
|
||||
@ -738,6 +738,8 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights-
|
||||
$pu_ttc = $prod->multiprices_ttc[$object->client->price_level];
|
||||
$price_min = $prod->multiprices_min[$object->client->price_level];
|
||||
$price_base_type = $prod->multiprices_base_type[$object->client->price_level];
|
||||
$tva_tx=$prod->multiprices_tva_tx[$object->client->price_level];
|
||||
$tva_npr ==$prod->multiprices_recuperableonly[$object->client->price_level];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -686,6 +686,8 @@ else if ($action == 'addline' && $user->rights->commande->creer)
|
||||
$pu_ttc = $prod->multiprices_ttc[$object->client->price_level];
|
||||
$price_min = $prod->multiprices_min[$object->client->price_level];
|
||||
$price_base_type = $prod->multiprices_base_type[$object->client->price_level];
|
||||
$tva_tx=$prod->multiprices_tva_tx[$object->client->price_level];
|
||||
$tva_npr ==$prod->multiprices_recuperableonly[$object->client->price_level];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -1259,6 +1259,8 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights-
|
||||
$pu_ttc = $prod->multiprices_ttc[$object->client->price_level];
|
||||
$price_min = $prod->multiprices_min[$object->client->price_level];
|
||||
$price_base_type = $prod->multiprices_base_type[$object->client->price_level];
|
||||
$tva_tx=$prod->multiprices_tva_tx[$object->client->price_level];
|
||||
$tva_npr ==$prod->multiprices_recuperableonly[$object->client->price_level];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -808,6 +808,7 @@ function confirmConstantAction(action, url, code, input, box, entity, yesButton,
|
||||
var input = this.input = $( "<input>" )
|
||||
.insertAfter( select )
|
||||
.val( value )
|
||||
.attr('id', 'inputautocomplete'+select.attr('id'))
|
||||
.autocomplete({
|
||||
delay: 0,
|
||||
minLength: this.options.minLengthToAutocomplete,
|
||||
|
||||
@ -358,6 +358,13 @@ function ajax_combobox($htmlname, $event=array(), $minLengthToAutocomplete=0)
|
||||
}
|
||||
});
|
||||
$("select#" + htmlname).html(response.value);
|
||||
if (response.num) {
|
||||
var selecthtml_str = response.value;
|
||||
var selecthtml_dom=$.parseHTML(selecthtml_str);
|
||||
$("#inputautocomplete"+htmlname).val(selecthtml_dom[0][0].innerHTML);
|
||||
} else {
|
||||
$("#inputautocomplete"+htmlname).val("");
|
||||
}
|
||||
});
|
||||
}
|
||||
});';
|
||||
|
||||
@ -1731,6 +1731,30 @@ elseif (! empty($object->id))
|
||||
// TODO Use the predefinedproductline_create.tpl.php file
|
||||
|
||||
// Add free products/services form
|
||||
|
||||
//Fix Bug [ bug #1254 ] Error when using "Enter" on qty input box of a product
|
||||
//this Fix Will be obsolete in 3.6 because 3.6 get one form to do every things
|
||||
if (! empty($conf->use_javascript_ajax)) {
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
|
||||
$("#qty").bind("keypress", {}, keypressInBox);
|
||||
$("#remise_percent").bind("keypress", {}, keypressInBox);
|
||||
$("#pu").bind("keypress", {}, keypressInBox);
|
||||
|
||||
});
|
||||
|
||||
function keypressInBox(e) {
|
||||
var code = (e.keyCode ? e.keyCode : e.which);
|
||||
if (code == 13) { //Enter keycode
|
||||
e.preventDefault();
|
||||
|
||||
$(\'#addFreeProductButton\').click();
|
||||
}
|
||||
};
|
||||
</script>';
|
||||
}
|
||||
|
||||
$var=true;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>';
|
||||
@ -1755,22 +1779,40 @@ elseif (! empty($object->id))
|
||||
print '<td align="center">';
|
||||
print $form->load_tva('tva_tx',(GETPOST('tva_tx')?GETPOST('tva_tx'):-1),$object->thirdparty,$mysoc);
|
||||
print '</td>';
|
||||
print '<td align="right"><input type="text" name="pu" size="5" value="'.GETPOST('pu').'"></td>';
|
||||
print '<td align="right"><input type="text" name="qty" value="'.(GETPOST('qty')?GETPOST('qty'):'1').'" size="2"></td>';
|
||||
print '<td align="right" class="nowrap"><input type="text" name="remise_percent" size="1" value="'.(GETPOST('remise_percent')?GETPOST('remise_percent'):$object->thirdparty->remise_percent).'"><span class="hideonsmartphone">%</span></td>';
|
||||
print '<td align="center" colspan="4"><input type="submit" class="button" value="'.$langs->trans('Add').'" name="addline_libre"></td>';
|
||||
print '<td align="right"><input type="text" id="pu" name="pu" size="5" value="'.GETPOST('pu').'"></td>';
|
||||
print '<td align="right"><input type="text" id="qty" name="qty" value="'.(GETPOST('qty')?GETPOST('qty'):'1').'" size="2"></td>';
|
||||
print '<td align="right" class="nowrap"><input type="text" id="remise_percent" name="remise_percent" size="1" value="'.(GETPOST('remise_percent')?GETPOST('remise_percent'):$object->thirdparty->remise_percent).'"><span class="hideonsmartphone">%</span></td>';
|
||||
print '<td align="center" colspan="4"><input type="submit" class="button" value="'.$langs->trans('Add').'" name="addline_libre" id="addFreeProductButton"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Ajout de produits/services predefinis
|
||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
|
||||
{
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery(\'#idprodfournprice\').change(function() {
|
||||
if (jQuery(\'#idprodfournprice\').val() > 0) jQuery(\'#np_desc\').focus();
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
|
||||
if (! empty($conf->use_javascript_ajax)) {
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery(\'#idprodfournprice\').change(function() {
|
||||
if (jQuery(\'#idprodfournprice\').val() > 0) jQuery(\'#np_desc\').focus();
|
||||
});
|
||||
|
||||
//Fix Bug [ bug #1254 ] Error when using "Enter" on qty input box of a product
|
||||
//this Fix Will be obsolete in 3.6 because 3.6 get one form to do every things
|
||||
$("#qty_predef").bind("keypress", {}, keypressInBox);
|
||||
$("#remise_percent_predef").bind("keypress", {}, keypressInBox);
|
||||
|
||||
});
|
||||
|
||||
function keypressInBox(e) {
|
||||
var code = (e.keyCode ? e.keyCode : e.which);
|
||||
if (code == 13) { //Enter keycode
|
||||
e.preventDefault();
|
||||
|
||||
$(\'#addPredefinedProductButton\').click();
|
||||
}
|
||||
};
|
||||
</script>';
|
||||
}
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">';
|
||||
|
||||
@ -1167,7 +1167,7 @@ if ($action == 'create')
|
||||
print '</td></tr>';
|
||||
|
||||
// Ref supplier
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('RefSupplier').'</td><td><input name="ref_supplier" value="'.(isset($_POST['ref_supplier'])?$_POST['ref_supplier']:$fac_ori->ref).'" type="text"></td>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('RefSupplier').'</td><td><input name="ref_supplier" value="'.(isset($_POST['ref_supplier'])?$_POST['ref_supplier']:'').'" type="text"></td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans('Type').'</td><td colspan="2">';
|
||||
@ -1254,7 +1254,7 @@ if ($action == 'create')
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td>'.$langs->trans('Label').'</td><td><input size="30" name="libelle" value="'.(isset($_POST['libelle'])?$_POST['libelle']:$fac_ori->libelle).'" type="text"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Label').'</td><td><input size="30" name="libelle" value="'.(isset($_POST['libelle'])?$_POST['libelle']:'').'" type="text"></td></tr>';
|
||||
|
||||
// Date invoice
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('DateInvoice').'</td><td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user