Enhancements to Supplier Portal (#19221)

* fix: Add Purchase Order to portal

* fix: Create Customer or Supplier on first login

Based on default role set in Portal Settings, a Customer or Supplier
will be created when the user logs in for the first time.

* fix: Styling for transaction_row

* fix: Styling for RFQ page

* fix: Add Purchase Invoice route

- Make Purchase Invoice from PO

* fix: minor

- Admissions for Student role
- Remove print statement
diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html
index 67a8fed..9e3c58b 100644
--- a/erpnext/templates/pages/order.html
+++ b/erpnext/templates/pages/order.html
@@ -12,7 +12,22 @@
 {% endblock %}
 
 {% block header_actions %}
-<a href='/printview?doctype={{ doc.doctype}}&name={{ doc.name }}&format={{ print_format }}' target="_blank" rel="noopener noreferrer">{{ _("Print") }}</a>
+<div class="dropdown">
+	<button class="btn btn-outline-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
+		<span>{{ _('Actions') }}</span>
+		<b class="caret"></b>
+	</button>
+	<ul class="dropdown-menu dropdown-menu-right" role="menu">
+		{% if doc.doctype == 'Purchase Order' %}
+		<a class="dropdown-item" href="/api/method/erpnext.buying.doctype.purchase_order.purchase_order.make_purchase_invoice_from_portal?purchase_order_name={{ doc.name }}" data-action="make_purchase_invoice">{{ _("Make Purchase Invoice") }}</a>
+		{% endif %}
+		<a class="dropdown-item" href='/printview?doctype={{ doc.doctype}}&name={{ doc.name }}&format={{ print_format }}'
+			target="_blank" rel="noopener noreferrer">
+			{{ _("Print") }}
+		</a>
+	</ul>
+</div>
+
 {% endblock %}
 
 {% block page_content %}
@@ -34,7 +49,7 @@
 </div>
 
 <p class="small my-3">
-	{%- set party_name = doc.supplier_name if doc.doctype == 'Supplier Quotation' else doc.customer_name %}
+	{%- set party_name = doc.supplier_name if doc.doctype in ['Supplier Quotation', 'Purchase Invoice', 'Purchase Order'] else doc.customer_name %}
 	<b>{{ party_name }}</b>
 
 	{% if doc.contact_display and doc.contact_display != party_name %}
@@ -172,4 +187,4 @@
 			currency: '{{ doc.currency }}'
 		}
 	</script>
-{% endblock %}
\ No newline at end of file
+{% endblock %}