Skip to content

Commit

Permalink
feature(Display Stock value)
Browse files Browse the repository at this point in the history
- Display unit cost with 4 decimal places

closes #6951
  • Loading branch information
lomamech committed Mar 2, 2023
1 parent 8fe753b commit 62f7c86
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<td class="text-right">{{old_quantity}}</td>
<td class="text-right">{{new_quantity}}</td>
<td class="text-right">{{difference}}</td>
<td class="text-right">{{currency unit_cost ../enterprise.currency_id}}</td>
<td class="text-right">{{currency unit_cost ../enterprise.currency_id 4}}</td>
<td class="text-right">{{currency total ../enterprise.currency_id}}</td>
</tr>
{{else}}
Expand Down Expand Up @@ -126,7 +126,7 @@
<td class="text-right">{{old_quantity}}</td>
<td class="text-right">{{new_quantity}}</td>
<td class="text-right">{{difference}}</td>
<td class="text-right">{{currency unit_cost ../enterprise.currency_id}}</td>
<td class="text-right">{{currency unit_cost ../enterprise.currency_id 4}}</td>
<td class="text-right">{{currency total ../enterprise.currency_id}}</td>
</tr>
{{else}}
Expand Down Expand Up @@ -161,7 +161,7 @@
<td>{{label}}</td>
<td>{{date expiration_date}}</td>
<td class="text-right">{{quantity}}</td>
<td class="text-right">{{currency unit_cost ../enterprise.currency_id}}</td>
<td class="text-right">{{currency unit_cost ../enterprise.currency_id 4}}</td>
<td class="text-right">{{currency total ../enterprise.currency_id}}</td>
</tr>
{{else}}
Expand Down
24 changes: 12 additions & 12 deletions server/controllers/stock/reports/stock_entry.report.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<tr>
<th colspan="3">{{ data.inventory_name }}</th>
<th colspan="2" class="text-right">{{ data.inventory_stock_entry_quantity }} {{ data.inventory_unit }}</th>
<th colspan="2" class="text-right">{{currency data.inventory_stock_entry_cost ../currencyId}}</th>
<th colspan="2" class="text-right">{{currency data.inventory_stock_entry_cost ../currencyId 4}}</th>
</tr>
</thead>

Expand All @@ -40,8 +40,8 @@
</td>
<td style="border:none;">{{date date }}</td>
<td class="text-right" style="border:none;">{{ quantity }} {{ unit_text }}</td>
<td class="text-right" style="border:none;">{{currency unit_cost ../../currencyId}}</td>
<td class="text-right" style="border:none;">{{currency cost ../../currencyId}}</td>
<td class="text-right" style="border:none;">{{currency unit_cost ../../currencyId 4}}</td>
<td class="text-right" style="border:none;">{{currency cost ../../currencyId 4}}</td>
</tr>
{{/each}}
</tbody>
Expand Down Expand Up @@ -71,7 +71,7 @@
<tr>
<th colspan="3">{{ data.inventory_name }}</th>
<th colspan="2" class="text-right">{{ data.inventory_stock_entry_quantity }} {{ data.inventory_unit }}</th>
<th colspan="2" class="text-right">{{currency data.inventory_stock_entry_cost ../currencyId}}</th>
<th colspan="2" class="text-right">{{currency data.inventory_stock_entry_cost ../currencyId 4}}</th>
</tr>
</thead>

Expand All @@ -88,8 +88,8 @@
</td>
<td style="border:none;">{{date date }}</td>
<td class="text-right" style="border:none;">{{ quantity }} {{ unit_text }}</td>
<td class="text-right" style="border:none;">{{currency unit_cost ../../currencyId}}</td>
<td class="text-right" style="border:none;">{{currency cost ../../currencyId}}</td>
<td class="text-right" style="border:none;">{{currency unit_cost ../../currencyId 4}}</td>
<td class="text-right" style="border:none;">{{currency cost ../../currencyId 4}}</td>
</tr>
{{/each}}
</tbody>
Expand Down Expand Up @@ -119,7 +119,7 @@
<tr>
<th colspan="3">{{ data.inventory_name }}</th>
<th colspan="2" class="text-right">{{ data.inventory_stock_entry_quantity }} {{ data.inventory_unit }}</th>
<th colspan="2" class="text-right">{{currency data.inventory_stock_entry_cost ../currencyId}}</th>
<th colspan="2" class="text-right">{{currency data.inventory_stock_entry_cost ../currencyId 4}}</th>
</tr>
</thead>

Expand All @@ -132,8 +132,8 @@
<td class="text-left" style="border:none; width: 15%">&nbsp;</td>
<td style="border:none;">{{date date }}</td>
<td class="text-right" style="border:none;">{{ quantity }} {{ unit_text }}</td>
<td class="text-right" style="border:none;">{{currency unit_cost ../../currencyId}}</td>
<td class="text-right" style="border:none;">{{currency cost ../../currencyId}}</td>
<td class="text-right" style="border:none;">{{currency unit_cost ../../currencyId 4}}</td>
<td class="text-right" style="border:none;">{{currency cost ../../currencyId 4}}</td>
</tr>
{{/each}}
</tbody>
Expand Down Expand Up @@ -163,7 +163,7 @@
<tr>
<th colspan="3">{{ data.inventory_name }}</th>
<th colspan="2" class="text-right">{{ data.inventory_stock_entry_quantity }} {{ data.inventory_unit }}</th>
<th colspan="2" class="text-right">{{currency data.inventory_stock_entry_cost ../currencyId}}</th>
<th colspan="2" class="text-right">{{currency data.inventory_stock_entry_cost ../currencyId 4}}</th>
</tr>
</thead>

Expand All @@ -176,8 +176,8 @@
<td class="text-left" style="border:none; width: 15%">&nbsp;</td>
<td style="border:none;">{{date date }}</td>
<td class="text-right" style="border:none;">{{ quantity }} {{ unit_text }}</td>
<td class="text-right" style="border:none;">{{currency unit_cost ../../currencyId}}</td>
<td class="text-right" style="border:none;">{{currency cost ../../currencyId}}</td>
<td class="text-right" style="border:none;">{{currency unit_cost ../../currencyId 4}}</td>
<td class="text-right" style="border:none;">{{currency cost ../../currencyId 4}}</td>
</tr>
{{/each}}
</tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<table class="table table-condensed table-bordered table-report">
<thead>
<tr>
<th>{{translate 'STOCK.CODE'}}</th>
<th>{{translate 'STOCK.CODE'}} BBB</th>
<th>{{translate 'STOCK.INVENTORY'}}</th>
<th>{{translate 'STOCK.LOT'}}</th>
<th>{{translate 'STOCK.EXPIRATION'}}</th>
Expand Down Expand Up @@ -87,7 +87,7 @@
{{#if ../entry.details.partialDelivery}}
<td class="text-right">{{quantity_difference}}</td>
{{/if}}
<td class="text-right">{{currency unit_cost ../metadata.enterprise.currency_id}}</td>
<td class="text-right">{{currency unit_cost ../metadata.enterprise.currency_id 4}}</td>
<td class="text-right">{{currency total ../metadata.enterprise.currency_id}}</td>
<td style="width: 25%;">&nbsp;</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
</td>
{{/if}}
<td class="text-right">{{quantity}}</td>
<td class="text-right">{{currency unit_cost ../enterprise.currency_id}}</td>
<td class="text-right">{{currency unit_cost ../enterprise.currency_id 4}}</td>
<td class="text-right">{{currency total ../enterprise.currency_id}}</td>
</tr>
{{else}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
</td>
{{/if}}
<td class="text-right">{{quantity}}</td>
<td class="text-right">{{currency unit_cost ../enterprise.currency_id}}</td>
<td class="text-right">{{currency unit_cost ../enterprise.currency_id 4}}</td>
<td class="text-right">{{currency total ../enterprise.currency_id}}</td>
</tr>
{{else}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@
</td>
{{/if}}
<td class="text-right">{{quantity}}</td>
<td class="text-right">{{currency unit_cost_base ../details.p_currency_id}}</td>
<td class="text-right">{{currency unit_cost_base ../details.p_currency_id 4}}</td>
{{#if ../details.p_shipping_handling}}
<td class="text-right">{{currency unit_cost_deliv ../details.p_currency_id}}</td>
<td class="text-right">{{currency unit_cost_deliv ../details.p_currency_id 4}}</td>
{{/if}}
<td class="text-right">{{currency cost_deliv ../details.p_currency_id}}</td>
<td class="text-right">{{currency cost_deliv ../details.p_currency_id 4}}</td>
</tr>
{{else}}
{{#if displayPackagingDetails}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
</td>
{{/if}}
<td class="text-right">{{quantity}}</td>
<td class="text-right">{{currency unit_cost ../metadata.enterprise.currency_id}}</td>
<td class="text-right">{{currency unit_cost ../metadata.enterprise.currency_id 4}}</td>
<td class="text-right">{{currency total ../metadata.enterprise.currency_id}}</td>
</tr>
{{else}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<tr>
<td>({{code}}) {{text}}, {{label}}</td>
<td class="text-right">{{quantity}} ({{translate unit_type}})</td>
<td class="text-right">{{currency unit_cost ../enterprise.currency_id}}</td>
<td class="text-right">{{currency unit_cost ../enterprise.currency_id 4}}</td>
<td class="text-right">{{currency total ../enterprise.currency_id}}</td>
</tr>
{{else}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<tr>
<td>({{code}}) {{text}}, {{label}}</td>
<td class="text-right">{{quantity}} ({{ translate unit_type }})</td>
<td class="text-right">{{currency unit_cost ../enterprise.currency_id}}</td>
<td class="text-right">{{currency unit_cost ../enterprise.currency_id 4}}</td>
<td class="text-right">{{currency total ../enterprise.currency_id}}</td>
</tr>
{{else}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<tr>
<td>({{code}}) {{text}}, {{label}}</td>
<td class="text-right">{{quantity}} ({{ translate unit_type }})</td>
<td class="text-right">{{currency unit_cost ../enterprise.currency_id}}</td>
<td class="text-right">{{currency unit_cost ../enterprise.currency_id 4}}</td>
<td class="text-right">{{currency total ../enterprise.currency_id}}</td>
</tr>
{{else}}
Expand Down

0 comments on commit 62f7c86

Please sign in to comment.