Skip to content

Commit

Permalink
Update enterprise details on receipts
Browse files Browse the repository at this point in the history
  • Loading branch information
mbayopanda committed Aug 19, 2020
1 parent 9ae0f0e commit f5c7c33
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions server/controllers/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ exports.reload = reload;
// expose session locally
exports.loadSessionInformation = loadSessionInformation;


function loginRoute(req, res, next) {
const { username, password, project } = req.body;
login(username, password, project)
Expand Down Expand Up @@ -183,7 +182,7 @@ async function loadSessionInformation(user) {
// the current enterprise
// the current project
sql = `
SELECT e.id, e.name, e.abbr, e.phone, e.email, BUID(e.location_id) as location_id, e.currency_id,
SELECT e.id, e.name, e.abbr, e.phone, e.email, e.address, BUID(e.location_id) as location_id, e.currency_id,
c.symbol AS currencySymbol, c.name AS currencyName, e.po_box, e.logo,
CONCAT_WS(' / ', village.name, sector.name, province.name) AS location
FROM enterprise AS e
Expand Down
6 changes: 3 additions & 3 deletions server/lib/template/partials/enterpriseDetails.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<h3 style="margin: 0px;">{{metadata.enterprise.name}}</h3>
<strong>{{metadata.project.name}} ({{metadata.project.abbr}})</strong> <br>
<span class="text-capitalize">{{translate 'FORM.LABELS.ADDRESS'}}</span>: {{metadata.enterprise.location}} <br>
<span class="text-capitalize">{{translate 'FORM.LABELS.PHONE'}}</span>: {{metadata.enterprise.phone}} <br>
<span class="text-capitalize">{{translate 'FORM.LABELS.EMAIL'}}</span>: {{metadata.enterprise.email}}
{{#if metadata.enterprise.phone}}<span class="text-capitalize">{{translate 'FORM.LABELS.PHONE'}}</span>: {{metadata.enterprise.phone}} <br>{{/if}}
{{#if metadata.enterprise.email}}<span class="text-capitalize">{{translate 'FORM.LABELS.EMAIL'}}</span>: {{metadata.enterprise.email}} <br>{{/if}}
{{#if metadata.enterprise.address}}<span class="text-capitalize">{{translate 'FORM.LABELS.ADDRESS'}}</span>: {{metadata.enterprise.address}}{{/if}}
</div>

0 comments on commit f5c7c33

Please sign in to comment.