-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
390 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | ||
<h3 id="fixDuplicateBarcode">Fix duplicate barcode</h3> | ||
</div> | ||
<div class="modal-body"> | ||
<%= form_tag({controller: 'edi_lins', action: 'index'}, method: 'get') do %> | ||
<div class="div-table"> | ||
<div class="div-table-body"> | ||
<div class="div-table-row"> | ||
<div class="div-table-cell"> | ||
Enter barcode | ||
</div> | ||
</div> | ||
<div class="div-table-row"> | ||
<div class="div-table-cell"> | ||
<%= text_field_tag 'barcode_num' %> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="btn-group"> | ||
<button class='btn btn-md btn-default btn-full' data-dismiss="modal" aria-hidden="true">Cancel</button> | ||
</div> | ||
| ||
<div class="btn-group"> | ||
<%= submit_tag 'Next', class: 'btn btn-md btn-primary btn-full' %> | ||
</div> | ||
</div> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<div class="home-page-section"> | ||
<h1>Edit EDI line with duplicate barcodes</h1> | ||
<table class="table table-striped"> | ||
<thead> | ||
<tr> | ||
<th>Vendor</th> | ||
<th>Invoice Num</th> | ||
<th>Line Num</th> | ||
<th>Barcode</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<% @edi_lin.each do |edi, index | %> | ||
<tr class='<%= cycle("odd", "even") %>'> | ||
<td><%= edi.vend_id %></td> | ||
<td><%= edi.doc_num %></td> | ||
<td><%= edi.edi_lin_num.present? ? edi.edi_lin_num.to_i : '' %></td> | ||
<td><%= text_field_tag('new_barcode', '', placeholder: edi.barcode_num.present? ? edi.barcode_num.to_i : '', onblur: "$('#barcode#{index}').data('bc', $(this).val())") %></td> | ||
<td> | ||
<%= link_to 'Change this barcode', {controller: 'edi_lins', action: 'update_barcode'}, id: "barcode#{index}", onclick: "window.location = '/edi_lins/update_barcode?new_barcode=' + $('#barcode#{index}').data('bc') + '&vend_id=#{edi.vend_id}&doc_num=#{edi.doc_num}&edi_lin_num=#{edi.edi_lin_num}&edi_sublin_count=#{edi.edi_sublin_count}&old_barcode=#{edi.barcode_num}'; return true" , class: 'btn btn-primary' %> | ||
</td> | ||
</tr> | ||
<% end %> | ||
</tbody> | ||
</table> | ||
<div class="btn-group"> | ||
<%= main_menu_button %> | ||
</div> | ||
<div class="btn-group"> | ||
<%= edi_menu_button %> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
$("#new-modal-window").html("<%= escape_javascript(render 'fix_duplicate_barcode') %>"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<div class="home-page-section"> | ||
<h1>EDI lines with duplicate barcodes</h1> | ||
<table class="table table-striped"> | ||
<thead> | ||
<tr> | ||
<th></th> | ||
<th>Vendor</th> | ||
<th>Invoice Num</th> | ||
<th>Line Num</th> | ||
<th>Barcode</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<% @edi_lin.each do |edi| %> | ||
<tr class='<%= cycle("odd", "even") %>'> | ||
<td><%= radio_button_tag('edi_lin', 'edit', false, onclick: "window.location = '/edi_lins/show/#{edi.barcode_num.present? ? edi.barcode_num.to_i : 'no_barcode'}'") %></td> | ||
<td><%= edi.vend_id %></td> | ||
<td><%= edi.doc_num %></td> | ||
<td><%= edi.edi_lin_num.present? ? edi.edi_lin_num.to_i : '' %></td> | ||
<td><%= edi.barcode_num.present? ? edi.barcode_num.to_i : '' %></td> | ||
</tr> | ||
<% end %> | ||
</tbody> | ||
</table> | ||
<div class="btn-group"> | ||
<%= main_menu_button %> | ||
</div> | ||
<div class="btn-group"> | ||
<%= edi_menu_button %> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<div class="home-page-section"> | ||
<h1>EDI lines with duplicate barcodes</h1> | ||
<table class="table table-striped"> | ||
<thead> | ||
<tr> | ||
<th></th> | ||
<th>Vendor</th> | ||
<th>Invoice Num</th> | ||
<th>Line Num</th> | ||
<th>Barcode</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<% @edi_lin.each do |edi| %> | ||
<tr class='<%= cycle("odd", "even") %>'> | ||
<td> | ||
<%= radio_button_tag('edi_lin', 'edit', false, onclick: "window.location = '/edi_lins/edit/"\ | ||
"#{edi.vend_id},"\ | ||
"#{edi.doc_num},"\ | ||
"#{edi.edi_lin_num.present? ? edi.edi_lin_num.to_i : ''},"\ | ||
"#{edi.edi_sublin_count.present? ? edi.edi_sublin_count.to_i : ''},"\ | ||
"#{edi.barcode_num.present? ? edi.barcode_num.to_i : ''}'") %> | ||
</td> | ||
<td><%= edi.vend_id %></td> | ||
<td><%= edi.doc_num %></td> | ||
<td><%= edi.edi_lin_num.present? ? edi.edi_lin_num.to_i : '' %></td> | ||
<td><%= edi.barcode_num.present? ? edi.barcode_num.to_i : '' %></td> | ||
</tr> | ||
<% end %> | ||
</tbody> | ||
</table> | ||
<div class="btn-group"> | ||
<%= main_menu_button %> | ||
</div> | ||
<div class="btn-group"> | ||
<%= edi_menu_button %> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddColumnsToEdiLin < ActiveRecord::Migration | ||
def change | ||
add_column :edi_lin, :barcode_num, :integer, limit: 6 | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.