How to print total debit from journal voucher

i m creating a print format for journal voucher.....in which everything is ok

but i m trying to print total debit amount from journal voucher but it is not printing.....

i m using the following code for this.....

 <div style="text-align:Right"><strong>Total Amount:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</strong>
<script type="text/javascript">// <![CDATA[
date.str_to_user(doc.total_debit)
// ]]></script>




any one can help me...?


Regards
Mahaveer Somani



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Remove date.str_to_user, just use

<script>doc.total_debit</script>

the the function is to transform the date into the user's format (eg dd-mm-yy etc)



On Monday, November 11, 2013 11:48:35 AM UTC+5:30, Mahaveer Somani wrote:
i m creating a print format for journal voucher.....in which everything is ok

but i m trying to print total debit amount from journal voucher but it is not printing.....

i m using the following code for this.....

 <div style="text-align:Right"><strong>Total Amount:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</strong>
<script type="text/javascript">// <![CDATA[
date.str_to_user(doc.total_debit)
// ]]></script>




any one can help me...?


Regards
Mahaveer Somani



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Thank you very much rushabh 

its working fine....



Regards
CA Mahaveer somani



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
but i have one more query in this format....


i m trying to get a voucher type table.....and its working good.
but there is a minor mistake i m visiting......

here is the code:


<script>
    var t = print_table('Journal Voucher', doc.name, 'entries', 'Journal Voucher Detail', ['sr','account','cost_center','credit','debit'], ['SR','Account','Cost Center', 'Credit', 'Debit'], ['5%','35%','20%', '20%', '20%'])
    if(t.appendChild) {
      // single
      out = t.innerHTML;
    } 
    else {//multiple
      out = ''
      for(var i=0;i<t.length;i++) {
        if(i!=t.length-1){
          out += '<div style:"padding-top:5px;"></div>' + t[i].innerHTML +'<div style="page-break-after:always"></div>';
        }
        else out += '<div style:"padding-top:5px;"></div>' + t[i].innerHTML;
      }
    }
    out;
    </script>



in this code i m printing 5 columns. serial wise
1.  SR
2. Account
3. Cost Center
4. Debit
5. Credit

check my attached two picture

in which one entry takes cost_center in third column
while second entry takes cost_center in forth column why?

i want to print cost_center always in 3 column.

what should i do?




Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.