forked from ones006/inventory_v2
/
show.html.haml
56 lines (51 loc) · 1.95 KB
/
show.html.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
- title "Begining Balance #{@beginning_balance.number}"
- content_for :breadcrumb do
= breadcrumb [ link_to('Transactions', transactions_path), |
link_to('Begining Balances', beginning_balances_path), |
@beginning_balance.number ] |
= sidemenu @tab
= hint "Click 'edit' to edit beginning balance"
#subheader
%h3= "Beginning Balance # #{@beginning_balance.number}"
#subheader-menu
= link_to "#{image_tag('icons/silk/arrow_left.png')} back", beginning_balances_path, :class => "back_link"
•
= link_to "#{image_tag('icons/silk/application_form_edit.png')} edit", edit_beginning_balance_path(@beginning_balance)
•
= link_to "#{image_tag('icons/silk/delete.png')} delete", beginning_balance_path(@purchase_order), :method => :delete, :confirm => "Are you sure?"
#dialog_form
%fieldset.form_section
%legend Transaction Data
.two_columns
%p
%span.light.transaction_label Transaction Number :
%strong= @beginning_balance.number
%p
%span.light.transaction_label Created :
%strong= @beginning_balance.created_at.to_s(:long)
.single_column
%p
%span.light.transaction_label Remark :
%strong= @beginning_balance.remark
%fieldset.form_section
%legend Entries
%table.report
%thead
%tr
%th #
%th Item Code
%th Item Name
%th.actions Quantity
%th.actions Value
%tbody
- @beginning_balance.entries.each_with_index do |entry, n|
%tr{ :class => cycle('odd','even') }
%td.index= n+1
%td= entry.item.code
%td
%strong= entry.item.name_with_category
%td.actions= entry.quantity
%td.actions
= number_to_currency(entry.total_value, :unit => '', :delimiter => '.', :separator => ',')
%br
= "(@ #{number_to_currency(entry.value, :unit => '', :delimiter => '.', :separator => ',')})"