Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- = form_for @penjualan do |f|
- -if @penjualan.errors.any?
- #error_explanation
- %h2= "#{pluralize(@penjualan.errors.count, "error")} prohibited this penjualan from being saved:"
- %ul
- - @penjualan.errors.full_messages.each do |msg|
- %li= msg
- .row
- .span6
- .field
- = f.label :kode_transaksi
- = f.text_field :kode_transaksi
- = text_field :penjualan, :kode_transaksi, :type => "hidden", :id=>"input-barang"
- .span6
- .field
- Kustomer
- %br
- = text_field :customer, :name
- = f.text_field :customer_id, :type=>"hidden"
- = button_tag "...", :class => "btn", :id =>"select_customer", :"data-toggle" => "modal", :href=>"#customerModal"
- .row
- .span6
- .field.tanggal_transaksi
- = f.label :tanggal_transaksi
- = f.date_select :tanggal_transaksi, {:order => [:day, :month, :year], :use_month_names => [:Januari, :Februari, :Maret, :April, :Mei, :Juni, :Juli, :Agustus, :September, :Oktober, :November, :December]}
- .span6
- .field
- Alamat Kustomer
- %br
- = text_field :customer, :to_s
- .row
- .span12
- .row
- .span4
- = button_tag "Input Barang", :class => "btn add-bottom-10", :id =>"select_barang", :"data-toggle" => "modal", :href=>"#barangModal"
- .span4.offset4
- = button_tag "Hapus Barang", :class => "btn", :id=>"delete_barang"
- = text_field_tag "temp","", :id =>"delete_barang_id", :type=>"hidden"
- .transaction-details
- %table.table#transaction-table
- %tbody
- %tr
- %th Kode barang
- %th Nama Barang
- %th Jumlah
- %th Harga Satuan
- %th Harga Total
- %th Diskon / Unit
- %th Diskon Total
- %th Total
- .row
- .span12.center
- %h3.center
- Cara Bayar
- .row
- .span2.offset4
- %h3
- Hutang
- = radio_button_tag 'status_pembayaran', 'hutang'
- .span2
- %h3
- Kartu Kredit
- = radio_button_tag 'status_pembayaran', 'kartu_kredit'
- .span2
- %h3
- Kartu Debit
- = radio_button_tag 'status_pembayaran', 'kartu_debit'
- .span2
- %h3
- Cash
- = radio_button_tag 'status_pembayaran', 'cash', :selected => true
- .row
- .span4
- .field.tanggal_jatuh_tempo.tanggal_transaksi
- = f.label :jatuh_tempo
- = f.date_select :jatuh_tempo, {:order => [:day, :month, :year], :use_month_names => [:Januari, :Februari, :Maret, :April, :Mei, :Juni, :Juli, :Agustus, :September, :Oktober, :November, :December]}
- .span4.offset8.creditcard
- .field
- Nomor Kartu Kredit
- %br
- = f.text_field :kartu_kredit, :id=>"nomor_kartu_kredit"
- .span4.offset8.debitcard
- .field
- Nomor Kartu Debit
- %br
- = f.text_field :kartu_debit, :id=>"nomor_kartu_debit"
- %hr
- .row
- .span4
- = f.submit 'Proses', :class=>"btn btn-large btn-primary", :disable_with => "Processing..."
- .span4.offset4
- .field
- TOTAL DISCOUNT
- %br
- = text_field_tag :total_discount, "0", :id=>"total_discount", :class=>"right", :readonly=>true
- .row
- .span4
- = f.submit 'Batal', :class=>"btn btn-large btn-danger", :id=>"cancel_transaction"
- .span4.offset4
- .field
- SUB TOTAL
- %br
- = f.text_field :total, :id=>"sub_total", :class=>"right", :readonly=>true
- .row
- .span4.offset8
- .field
- ONGKOS / BIAYA HANDLING
- %br
- = text_field_tag :ongkos, "", :id=>"ongkos", :class => "calculate-grand-total right"
- .row
- .span4.offset8
- .field
- GRAND TOTAL
- %br
- = text_field_tag :grand_total, "", :id=>"grand_total", :class=>"right", :readonly=>true
- .row.cash
- .span4.offset8
- .field
- CASH
- %br
- = text_field_tag :total, "", :id=>"cash_total", :class => "calculate-cash right", :name=>"cash_total"
- .row.cash
- .span4.offset8
- .field
- Kembali
- %br
- = text_field_tag :total, "", :id=>"kembali", :class=>"right", :name=>"kembali"
- .modal.hide#customerModal
- .modal-header
- = button_tag "x", :type=>"button", :class=> "close", :"data-dismiss" =>"modal"
- %h3
- Pilih Kustomer
- .modal-body
- %table.table.table-bordered.table-striped.center#table-customer-penjualan
- %tr
- %th Kode kustomer
- %th Nama kustomer
- %th Nama contactperson
- %th Alamat
- %th Kota
- %th Phone1
- %th Phone2
- - @customers.each do |customer|
- %tr.data{:"data-id"=> customer.id}
- %td.kode_kustomer= customer.kode_kustomer
- %td.nama_kustomer= customer.nama_kustomer
- %td= customer.nama_contactperson
- %td.alamat= customer.alamat
- %td= customer.kota
- %td= customer.phone1
- %td= customer.phone2
- .modal-footer
- %a{:href=>"#", :class=>"btn", :"data-dismiss"=>"modal", :id=>"close-customer-modal"}
- Batal
- .modal.hide#barangModal
- .modal-header
- = button_tag "x", :type=>"button", :class=> "close", :"data-dismiss" =>"modal"
- %h3
- Pilih Barang
- .modal-body
- .detail-barang
- .row
- .span12
- %h3 Detail Barang
- .row
- .span3
- Kode Barang
- .span3
- = text_field :barang, :kode_barang, :id => "kode_barang", :class=>"kode_barang_input"
- .span2
- Nama Barang
- .span3
- = text_area :barang, :nama_barang, :size=>"25x3", :readonly=>true, :id => "nama_barang"
- .row
- .span3
- Jumlah Barang
- .span3
- = text_field :barang, :jumlah_barang, :class=> "calculate"
- .span2
- Satuan
- .span3
- = label_tag '','',:id=>"barang_satuan", :readonly=>true
- .row
- .span3
- Discount Per Unit
- .span3
- = text_field :detil_penjualan, :discount, :class=> "calculate"
- .span2
- Harga Jual
- .span3
- = text_field :barang, :harga_jual, :id => "harga_jual", :readonly=>true
- .row
- .span3
- Extra Cost
- .span3
- = check_box_tag 'tambahan'
- = text_field :detil_penjualan, :tambahan, :class=> "calculate", :readonly => true
- .span2
- Kode Mesin / Rangka / No. Seri
- .span3
- = check_box_tag 'kode_mesin'
- = text_field :detil_penjualan, :kode_mesin, :readonly => true
- .row
- .span3
- Total Discount
- .span3
- = text_field :detil_penjualan, :total_discount, :readonly => true
- .span2
- Total
- .span3
- = text_field :detil_penjualan, :total, :readonly=>true, :id=>"total_harga"
- .row
- .span3.offset9
- .field
- Gambar
- %br
- = image_tag("no_image.jpg", :id=> 'barang_gambar_barang')
- %hr.add-bottom-10
- .row
- .span4
- = button_tag "Proses",:class=>"btn btn-large", :id=>"proses-barang"
- .span4
- = button_tag "Batal" ,:class=>"btn btn-large", :id=>"batal-proses-barang"
- .span4
- = button_tag "Keluar",:class=>"btn btn-large", :"data-dismiss"=>"modal", :id=>"close-barang-modal"
- %hr.add-bottom-10
- .row
- .span12
- = form_tag "/barangs/search/", :method => :get, :class=> "search-barang-form-modal" do
- Search
- = text_field :barang, :search, :id => "search-barang" ,:class => "search-query search-field", :name => "query"
- = button_tag "Search", :class => "btn btn-large search-barang", :id =>"search-barang-button-modal"
- = button_tag "Clear", :class => "btn btn-large clear-search-barang", :id =>"clear-search-barang-button-modal"
- %hr
- = form_tag "/barang/set/limit", :method => :get do
- Tampilkan
- = text_field :barang, :limit, :id=>"limit-hasil", :name=> "limit" ,:size =>"4", :value => cookies[:limit]
- item sekaligus
- = button_tag "refresh", :class => "btn"
- %hr
- .table-barang-wrapper
- #table-barang
- %table.table.table-striped.table-condensed.center#table-barang-inside.table-barang-modal-inside
- %tr.center
- %th Kode barang
- %th Nama barang
- %th Satuan
- %th Harga Jual
- %th Quantity
- %th Kode rak
- %th Keterangan
- - @barangs.each do |barang|
- %tr.data{generate_row_attribute(barang)}
- %td.kode_barang= barang.kode_barang
- %td.nama_barang= barang.nama_barang
- %td.satuan= barang.satuan.nama
- %td.right.harga_jual{:"harga_jual"=> barang.harga_jual.to_i}= number_with_delimiter(barang.harga_jual.to_i, :delimiter => ' ')
- %td.right= number_with_delimiter(barang.quantity, :delimiter => ' ')
- %td= barang.kode_rak
- %td= truncate(barang.keterangan)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement