Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Translate billing 2 (#515)
Browse files Browse the repository at this point in the history
* [TRANSLATION] Billing Invoice Routes translated

* [TRANSLATION] Billing Pricing Routes Translated

* update test
  • Loading branch information
billybonks authored and jkleinsc committed Jun 18, 2016
1 parent 0851737 commit 0faef46
Show file tree
Hide file tree
Showing 14 changed files with 123 additions and 78 deletions.
4 changes: 2 additions & 2 deletions app/invoices/add-line-item/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
updateButtonAction=updateButtonAction
updateButtonText=updateButtonText }}
{{#em-form model=model submitButton=false }}
{{em-input property="name" label="Name" class="required"}}
{{em-input property="name" label=(t 'labels.name') class="required"}}
{{select-or-typeahead property="category" className="required"
label="Category" list=billingCategories
label=(t 'labels.category') list=billingCategories
selection=model.category
}}
{{/em-form}}
Expand Down
2 changes: 1 addition & 1 deletion app/invoices/delete/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
{{#em-form model=model submitButton=false }}{{/em-form}}
<div class="alert alert-danger">
<span class="glyphicon glyphicon-warning-sign"></span>
Are you sure you wish to delete <b>{{model.displayInvoiceNumber}}</b>?
{{t 'billing.alerts.delete_item' item=model.displayInvoiceNumber}}
</div>
{{/modal-dialog}}
64 changes: 32 additions & 32 deletions app/invoices/edit/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,29 @@
<div class="row">
{{#unless model.isNew}}
<div class="form-group col-xs-2">
<label>Invoice Id</label>
<label>{{t 'labels.invoice_id'}}</label>
<p class="form-control-static">{{model.id}}</p>
</div>
{{/unless}}
{{date-picker property="billDate" label="Bill Date" class="col-xs-2"}}
{{date-picker property="billDate" label=(t 'labels.bill_date') class="col-xs-2"}}
{{#if model.isNew}}
{{patient-typeahead property="patientTypeAhead" label="Patient" content=patientList selection=selectedPatient class="col-xs-4 required invoice-patient"}}
{{em-select class="col-xs-4 required invoice-visit" label="Visit"
{{patient-typeahead property="patientTypeAhead" label=(t 'labels.patient') content=patientList selection=selectedPatient class="col-xs-4 required invoice-patient"}}
{{em-select class="col-xs-4 required invoice-visit" label=(t 'labels.visit')
property="visit" content=patientVisitsForSelect
optionValuePath="selectObject" optionLabelPath="selectObject.visitDescription"
selected=model.visit
prompt='Please select a visit'
}}
{{else}}
<div class="form-group col-xs-3">
<label>Visit</label>
<label>{{t 'labels.visit'}}</label>
<p class="form-control-static">{{model.visit.visitDescription}}</p>
</div>
{{/if}}
</div>
<div class="row">
{{em-input property="externalInvoiceNumber" label="External Invoice #" class="col-xs-3 external-invoice-no"}}
{{em-select label="Payment Profile"
{{em-input property="externalInvoiceNumber" label=(t 'billing.labels.external_invoice_number') class="col-xs-3 external-invoice-no"}}
{{em-select label=(t 'billing.labels.payment_profile')
property="paymentProfile"
content=pricingProfiles
optionValuePath="selectObject"
Expand All @@ -43,21 +43,21 @@
<div class="panel detail-section">
<div class="panel-heading">
<h3 class="panel-title">
Line Items
{{t 'labels.line_items'}}
{{#if canAddCharge}}
<button class="btn btn-primary align-right" {{action "showAddLineItem" bubbles=false }}><span class="octicon octicon-plus"></span>Add Line Item</button>
<button class="btn btn-primary align-right" {{action "showAddLineItem" bubbles=false }}><span class="octicon octicon-plus"></span>{{t 'buttons.add_line_item'}}</button>
{{/if}}
</h3>
</div>
<div class="panel-body detail-section-content">
<table class="table">
<tr class="table-header">
<th class="col-xs-5">Description</th>
<th class="col-xs-1 text-right">Actual Charges</th>
<th class="col-xs-1 text-right">Discount</th>
<th class="col-xs-1 text-right">PhilHealth</th>
<th class="col-xs-1 text-right">HMO/COM</th>
<th class="col-xs-1 text-right">Excess</th>
<th class="col-xs-5">{{t 'labels.description'}}</th>
<th class="col-xs-1 text-right">{{t 'billing.labels.actual_charges'}}</th>
<th class="col-xs-1 text-right">{{t 'labels.discount'}}</th>
<th class="col-xs-1 text-right">{{t 'billing.labels.phil_health'}}</th>
<th class="col-xs-1 text-right">{{t 'billing.labels.hmo_com'}}</th>
<th class="col-xs-1 text-right">{{t 'labels.excess'}}</th>
<th class="col-xs-2 text-right">{{t 'labels.action'}}</th>
</tr>
{{#each model.lineItemsByCategory as |categoryGroup|}}
Expand Down Expand Up @@ -97,7 +97,7 @@
<td class="col-xs-2">
{{#if canAddCharge}}
<button class="btn btn-default warning" {{action "showDeleteLineItem" item bubbles=false }}>
<span class="octicon octicon-x"></span>Delete
<span class="octicon octicon-x"></span>{{t 'buttons.delete'}}
</button>
{{/if}}
</td>
Expand All @@ -106,13 +106,13 @@
<tr>
<th colspan="2" class="col-xs-6">{{t 'labels.name'}}</th>
<th class="col-xs-1">{{t 'labels.quantity'}}</th>
<th class="col-xs-1">Price</th>
<th class="col-xs-1">Expense To</th>
<th class="col-xs-1 text-right">Total</th>
<th class="col-xs-1">{{t 'labels.price'}}</th>
<th class="col-xs-1">{{t 'labels.expense_to'}}</th>
<th class="col-xs-1 text-right">{{t 'labels.total'}}</th>
<th class="col-xs-2">
{{#if canAddCharge}}
<button class="btn btn-primary" {{action "addItemCharge" item}}>
<span class="octicon octicon-plus"></span>Add Charge
<span class="octicon octicon-plus"></span>{{t 'admin.roles.capability.add_charge'}}
</button>
{{/if}}
</th>
Expand Down Expand Up @@ -148,7 +148,7 @@
<td class="col-xs-2">
{{#if canAddCharge}}
<button class="btn btn-default warning" {{action "showDeleteItem" detail item.details bubbles=false }}>
<span class="octicon octicon-x"></span>Delete
<span class="octicon octicon-x"></span>{{t 'buttons.delete'}}
</button>
{{/if}}
</td>
Expand All @@ -158,7 +158,7 @@
{{/each}}
<tr>
<td>
<strong>Total {{categoryGroup.category}}</strong>
<strong>{{t 'labels.total'}} {{categoryGroup.category}}</strong>
</td>
<td class="text-right">{{number-format categoryGroup.total}}</td>
<td class="text-right">{{number-format categoryGroup.discount}}</td>
Expand All @@ -170,7 +170,7 @@
{{/each}}
<tr>
<td>
<strong>Total</strong>
<strong>{{t 'labels.total'}}</strong>
</td>
<td class="text-right">{{number-format model.total}}</td>
<td class="text-right">{{number-format model.discount}}</td>
Expand All @@ -181,15 +181,15 @@
</tr>
<tr>
<td>
<strong>Payments/Deposits</strong>
<strong>{{t 'billing.labels.payments_deposits'}}</strong>
</td>
<td colspan="4"></td>
<td class="text-right">-{{number-format model.paidTotal}}</td>
<td></td>
</tr>
<tr>
<td>
<strong>Grand Total</strong>
<strong>{{t 'labels.grand'}} {{t 'labels.total'}}</strong>
</td>
<td colspan="4"></td>
<td class="text-right">{{number-format model.remainingBalance}}</td>
Expand All @@ -202,7 +202,7 @@
<div class="panel detail-section">
<div class="panel-heading">
<h3 class="panel-title">
Remarks
{{t 'labels.remarks'}}
</h3>
</div>
<div class="panel-body detail-section-content">
Expand All @@ -212,18 +212,18 @@
<div class="panel detail-section">
<div class="panel-heading">
<h3 class="panel-title">
Payments
{{t 'labels.payments'}}
{{#if canAddPayment}}
<button class="btn btn-primary align-right" {{action "showAddPayment" model bubbles=false }}><span class="octicon octicon-plus"></span>Add Payment</button>
<button class="btn btn-primary align-right" {{action "showAddPayment" model bubbles=false }}><span class="octicon octicon-plus"></span>{{t 'admin.roles.capability.add_payment'}}</button>
{{/if}}
</h3>
</div>
<div class="panel-body detail-section-content">
<table class="table">
<tr class="table-header">
<th>Date</th>
<th>Amount</th>
<th>Type</th>
<th>{{t 'labels.date'}}</th>
<th>{{t 'labels.amount'}}</th>
<th>{{t 'labels.type'}}</th>
<th>{{t 'labels.notes'}}</th>
<th>{{t 'labels.action'}}</th>
</tr>
Expand All @@ -238,7 +238,7 @@
<button class="btn btn-default neutral" {{action 'showEditPayment' payment bubbles=false }}>{{t 'labels.edit'}}</button>
{{#if payment.canRemovePayment}}
<button class="btn btn-default warning" {{action "showRemovePayment" payment bubbles=false }}>
<span class="octicon octicon-x"></span>Remove
<span class="octicon octicon-x"></span>{{t 'buttons.remove'}}
</button>
{{/if}}
</td>
Expand Down
18 changes: 9 additions & 9 deletions app/invoices/index/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
{{#if hasRecords}}
<table class="table">
<tr class="table-header">
<th>Number</th>
<th>Bill Date</th>
<th>Status</th>
<th>{{t 'labels.number'}}</th>
<th>{{t 'labels.bill_date'}}</th>
<th>{{t 'labels.status'}}</th>
<th>{{t 'labels.patient'}}</th>
<th>Total</th>
<th>Balance Due</th>
<th>{{t 'labels.total'}}</th>
<th>{{t 'labels.balance_due'}}</th>
{{#if showActions}}
<th>{{t 'labels.actions'}}</th>
{{/if}}
Expand All @@ -25,14 +25,14 @@
{{#if showActions}}
{{#if canAddPayment}}
<button class="btn btn-default neutral" {{action 'showAddPayment' invoice bubbles=false }}>
<span class="octicon octicon-plus"></span> Add Payment
<span class="octicon octicon-plus"></span> {{t 'admin.roles.capability.add_payment'}}
</button>
{{/if}}
{{#if canAdd}}
<button class="btn btn-default neutral" {{action 'editItem' invoice bubbles=false }}>{{t 'labels.edit'}}</button>
<button class="btn btn-default neutral" {{action 'editItem' invoice bubbles=false }}>{{t 'buttons.edit'}}</button>
{{/if}}
{{#if canDelete}}
<button class="btn btn-default warning" {{action 'deleteItem' invoice bubbles=false }}><span class="octicon octicon-x"></span> Delete</button>
<button class="btn btn-default warning" {{action 'deleteItem' invoice bubbles=false }}><span class="octicon octicon-x"></span> {{t 'buttons.delete'}}</button>
{{/if}}
{{/if}}
{{/unless}}
Expand All @@ -42,7 +42,7 @@
</table>
{{else}}
<div class="alert alert-info">
<p>No invoices found. <a href="#" {{action 'newItem'}}>Create an invoice?</a></p>
<p>{{t 'billing.alerts.no_invoice_found'}} <a href="#" {{action 'newItem'}}>{{t 'billing.buttons.create_invoice'}}</a></p>
</div>
{{/if}}
{{/item-listing}}
10 changes: 5 additions & 5 deletions app/invoices/payment/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
{{#em-form model=model submitButton=false }}
{{#if model.isNew}}
{{#if selectPatient}}
{{patient-typeahead property="patientTypeAhead" label="Patient" content=patientList selection=selectedPatient class="required payment-patient"}}
{{patient-typeahead property="patientTypeAhead" label=(t 'labels.patient') content=patientList selection=selectedPatient class="required payment-patient"}}
{{else}}
<div class="form-group">
<label>{{t 'labels.patient'}}</label>
<p class="form-control-static">{{model.invoice.patient.displayName}}</p>
</div>
{{/if}}
{{/if}}
{{em-input property="amount" label="Amount" class="required payment-amount"}}
{{date-picker property="datePaid" label="Date Paid" maxDate="now" class="required"}}
{{select-or-typeahead property="expenseAccount" label="Credit To" list=expenseAccountList selection=model.expenseAccount }}
{{em-text property="notes" label="Notes"}}
{{em-input property="amount" label=(t 'labels.amount') class="required payment-amount"}}
{{date-picker property="datePaid" label=(t 'labels.date_paid') maxDate="now" class="required"}}
{{select-or-typeahead property="expenseAccount" label=(t 'labels.credit_to') list=expenseAccountList selection=model.expenseAccount }}
{{em-text property="notes" label=(t 'labels.notes')}}
{{/em-form}}
{{/modal-dialog}}
49 changes: 47 additions & 2 deletions app/locales/en/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,25 @@ export default {
physician: 'Physician',
assisting: 'Assisting',
anesthesia: 'Anesthesia',
procedures: 'Procedures'
procedures: 'Procedures',
number: 'Number',
bill_date: 'Bill Date',
balance_due: 'Balance Due',
amount: 'Amount',
date_paid: 'Date Paid',
credit_to: 'Credit To',
invoice_id: 'Invoice ID',
line_items: 'Line Items',
discount: 'Discount',
excess: 'Excess',
price: 'Price',
total: 'Total',
expense_to: 'Expense To',
grand: 'Grand',
remarks: 'Remarks',
payments: 'Payments',
category: 'Category',
department: 'Department'
},
messages: {
no_items_found: 'No items found.',
Expand Down Expand Up @@ -323,7 +341,9 @@ export default {
new_item: '+ new item',
new_request_plus: '+ new request',
add_visit: 'Add Visit',
search: 'Search'
search: 'Search',
edit: 'Edit',
add_line_item: 'Add Line Item'
},
login: {
messages: {
Expand Down Expand Up @@ -401,6 +421,7 @@ export default {
name: 'Name',
mark_as_consumed: 'Mark as Consumed',
new_item: 'New Item',
all_items: 'All Items',
original_quantity: 'Original Quantity',
print: 'Print',
print_barcode: 'Print Barcode',
Expand Down Expand Up @@ -711,5 +732,29 @@ export default {
please_select_a_visit: 'Please select a visit',
note_label: 'Note'
}
},
billing: {
alerts: {
no_invoice_found: 'No invoices found',
delete_item: 'Are you sure you wish to delete <strong>{{item}}</strong>?',
no_pricing_items: 'No pricing items found.',
no_pricing_profiles: 'No pricing profiles found.'
},
buttons: {
create_invoice: 'Create an invoice?',
add_override: 'Add Override'
},
labels: {
external_invoice_number: 'External Invoice #',
payment_profile: 'Payment Profile',
actual_charges: 'Actual Charges',
phil_health: 'PhilHealth',
hmo_com: 'HMO/COM',
payments_deposits: 'Payments/Deposits',
pricing_panel_overrides: 'Pricing profile overrides',
pricing_profile: 'Pricing Profile',
discount_amount: 'Discount Amount',
discount_percentage: 'Discount Percentage'
}
}
};
2 changes: 1 addition & 1 deletion app/pricing/delete/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
updateButtonText=updateButtonText }}
<div class="alert alert-danger">
<span class="glyphicon glyphicon-warning-sign"></span>
Are you sure you wish to delete {{model.name}}?
{{t 'billing.alerts.delete_item' item=model.name}}
</div>
{{/modal-dialog}}
Loading

0 comments on commit 0faef46

Please sign in to comment.