From b9b56341d04d259d5747abbd27398afa6490eb31 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Fri, 27 Aug 2010 12:36:18 +0000 Subject: [PATCH] Merged revisions 3655 via svnmerge from svn+ssh://danydb@svn/svn/phpcompta/branches/rel520 ........ r3655 | danydb | 2010-08-27 14:35:32 +0200 (Fri, 27 Aug 2010) | 1 line Savanah 30804 : sell price is not set with the search box ........ --- html/js/ajax_fiche.js | 2 +- include/class_acc_ledger_purchase.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/html/js/ajax_fiche.js b/html/js/ajax_fiche.js index 7757915cb..60106c556 100644 --- a/html/js/ajax_fiche.js +++ b/html/js/ajax_fiche.js @@ -116,8 +116,8 @@ function successFid(request,json) { if ( ftva_id != 'none') { set_value(ftva_id,answer.tva_id);} if ( flabel != 'none') { set_value(flabel,answer.name);} - if ( fpurchase != 'none') { set_value(fpurchase,answer.buy);} if ( fsale != 'none') { set_value(fsale,answer.sell);} + if ( fpurchase != 'none') { set_value(fpurchase,answer.buy);} } diff --git a/include/class_acc_ledger_purchase.php b/include/class_acc_ledger_purchase.php index 832ddf536..d897c5b22 100644 --- a/include/class_acc_ledger_purchase.php +++ b/include/class_acc_ledger_purchase.php @@ -937,7 +937,9 @@ array // name of the field to update with the name of the card $W1->set_attribute('label','e_march'.$i.'_label'); // name of the field with the price - $W1->set_attribute('purchase','e_march'.$i.'_price'); + $W1->set_attribute('purchase','e_march'.$i.'_price'); /* autocomplete */ + $W1->set_attribute('price','e_march'.$i.'_price'); /* via search */ + // name of the field with the TVA_ID $W1->set_attribute('tvaid','e_march'.$i.'_tva_id'); // Add the callback function to filter the card on the jrn