Show user details on sales invoice

Hello Everybody; I have a simple case here; can someone tell me how to get the current username (cashier) and display it on the sales invoice?

Hi, use {{ frappe.user }} to print current user
more details as follows:

<!-- TO print current logged in user email id -->
<div class="row">
    <div class="col-xs-5 text-right"><big><b>Print By(email id)</b>  </big></div>
    <div class="col-xs-7 "><big>{{ frappe.user }} </big> </div>

<!-- TO print current logged in user fist name -->
{% set u = frappe.get_doc("User", frappe.user) %} 
<div class="row">
    <div class="col-xs-5 text-right"><big><b>Print By(user name)</b>  </big></div>
    <div class="col-xs-7 "><big>{{ u.first_name }} </big> </div>

JavaScript to display on sales invoice pop-up, use


Thanks a lot Sir! always so helpful. I appreciate your effort always.
Thanks, I will tell you how it goes. Thanks again.

Also… do not mean to bother you so much, can you also guide me on how to
display other item information on documents such as a purchase order, I
will like to show item barcode, item code, etc, among the print formats,
there’s no option for purchase orders; How can I achieve this on the POrder


Thanks Sir; I figured out the barcode display from print settings. Thanks

You can find Print Format code here…