Register    Login    Forum    Search    FAQ

Board index » General Usage » Receivables




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: show credit limit on order form
 Post Posted: Mon Apr 16, 2012 5:15 pm 
Offline

Joined: Wed Mar 14, 2012 7:51 am
Posts: 6
i want to show credit limit information in page order [sales order, sales/invoice, Customer Credit Memos]

i try to add code file : module/phreebooks/pages/order/template_main.php
Code:
 html_input_field('credit_limit', $currencies->format($terms[4] ? $terms[4] : AR_CREDIT_LIMIT_AMOUNT), 'size="10" style="text-align:right"') . ' ' . chr(10);


but i don't know how to change value (credit limit costumer) when i select "Costumer ID"

Image


Top 
 Profile  
 
 Post subject: Re: show credit limit on order form
 Post Posted: Sat Apr 21, 2012 7:12 am 
Offline

Joined: Mon Mar 01, 2010 5:32 am
Posts: 554
Location: Netherlands
That is a good start.

now you need to add a line to the javascript function 'orderFillAddress'
( the first and last line are as reference)

Code:
      custCreditLimit              = $(this).find("credit_remaining").text();
      insertValue('credit_limit',          $(this).find("credit_limit").text());
      var rowCnt = 1;


To keep your changes for the further copy your template to the folder custom and copy the javascript function to a new file extra_js in the folder custom. (there is info in this form on how to do this.)

_________________
Rene Kervezee


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 2 posts ] 

Board index » General Usage » Receivables


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron