Merge branch 'develop'
paypal, pikpay and gift support
This commit is contained in:
@@ -3,14 +3,14 @@
|
||||
.tg td{ }
|
||||
.tg th{ }
|
||||
</style>
|
||||
<%
|
||||
<%
|
||||
dd = @record.delivery_destination
|
||||
c = @record
|
||||
%>
|
||||
<p>
|
||||
<p><strong>Ime:</strong> <%= dd.name %><br /><br /></p>
|
||||
|
||||
<p><strong>Adresa:</strong><br />
|
||||
<p><strong>Adresa:</strong><br />
|
||||
<%= dd.address %><br />
|
||||
<%= dd.place.to_s.strip %> <%= Place.name_from_code(dd.place.to_s) %><br />
|
||||
Bosna i Hercegovina<br /><br />
|
||||
@@ -22,15 +22,27 @@ Bosna i Hercegovina<br /><br />
|
||||
<p><strong>Telefon: </strong> +387 <%= dd.phone %><br /><br />
|
||||
</p>
|
||||
|
||||
<p><strong>Plaćanje: </strong><%= dd.get_payment_string %></p><br />
|
||||
|
||||
<p><strong>Napomena: </strong><br />
|
||||
<%= dd.note %><br /><br />
|
||||
</p>
|
||||
</p>
|
||||
|
||||
<% if dd.gift %>
|
||||
<p><strong>Ovo je poklon</strong><br /><br />
|
||||
<p><strong>Ime primaoca: </strong><%= dd.recipient_name %><br />
|
||||
<p><strong>Adresa primaoca: </strong><%= dd.recipient_address %><br />
|
||||
<p><strong>Postanski broj primaoca: </strong><%= dd.recipient_postal_code %><br />
|
||||
<p><strong>Grad primaoca: </strong><%= dd.recipient_place %><br />
|
||||
<p><strong>Email primaoca: </strong><%= dd.recipient_email %><br />
|
||||
<p><strong>Telefon primaoca: </strong><%= dd.recipient_phone %><br /><br />
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<strong>Naručeno:</strong> <%= c.confirmed_at.in_time_zone("Europe/Sarajevo").strftime("%A %d.%m.%Y. %H:%M") %>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
</p>
|
||||
<% if dd.instant_delivery %>
|
||||
<p style="font-size: 120%;">
|
||||
@@ -47,7 +59,7 @@ OVO JE NARUDŽBA ZA INSTANT DOSTAVU
|
||||
<th style="text-align: right; ">Total</th>
|
||||
</tr>
|
||||
<% @record.item_in_carts.each do |iic| %>
|
||||
<tr>
|
||||
<tr>
|
||||
<td class="tg-031e"><%= iic.item.code %></td>
|
||||
<td class="tg-031e"><%= iic.item.name %></td>
|
||||
<td style="text-align: right; "><%= iic.count %></td>
|
||||
@@ -70,15 +82,6 @@ OVO JE NARUDŽBA ZA INSTANT DOSTAVU
|
||||
<td style="text-align: right; "><%= money(c.total) %></td>
|
||||
</tr>
|
||||
<tr><td><strong> </strong></td></tr>
|
||||
|
||||
|
||||
</table>
|
||||
<br /><br />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,33 +2,48 @@
|
||||
<p><label for="supplier_id">Supplier: </label>
|
||||
<%= select_tag "supplier_id", options_from_collection_for_select(@suppliers, "id", "name", @selected_supplier.try(:id)) %></p>
|
||||
|
||||
<p><label for="codes">
|
||||
<p><label for="codes">
|
||||
Codes to check:
|
||||
</label><br />
|
||||
<%= text_area_tag "codes", @codes_to_check, rows: 20, columns: 50 %></p>
|
||||
|
||||
<p><%= submit_tag "Check" %></p>
|
||||
<p><%= submit_tag "Delete Items" %></p>
|
||||
<% end %>
|
||||
|
||||
<div>
|
||||
<h2> In database: <%= @items.length %>, in file: <%= @codes_to_check_array.length %> </h2>
|
||||
</div>
|
||||
<% if controller.action_name == 'delete_items' %>
|
||||
|
||||
<h2> Delete successful </h2>
|
||||
|
||||
<% if @not_deleted_items.length > 0 %>
|
||||
<p>Not deleted items</p>
|
||||
<% @not_deleted_items.each do |code| %>
|
||||
<%= code %><br />
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% else %>
|
||||
|
||||
<div>
|
||||
<h2> In database: <%= @items.length %>, in file: <%= @codes_to_check_array.length %> </h2>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h2>Not in database (<%= @missing_from_database.length %>): </h2>
|
||||
<br />
|
||||
<% @missing_from_database.each do |code| %>
|
||||
<%= code %><br />
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h2>Not in file (<%= @missing_from_codes.length %>): </h2>
|
||||
<br />
|
||||
<% @missing_from_codes.each do |code| %>
|
||||
<%= code %><br />
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h2>Not in database (<%= @missing_from_database.length %>): </h2>
|
||||
<br />
|
||||
<% @missing_from_database.each do |code| %>
|
||||
<%= code %><br />
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h2>Not in file (<%= @missing_from_codes.length %>): </h2>
|
||||
<br />
|
||||
<% @missing_from_codes.each do |code| %>
|
||||
<%= code %><br />
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
21
back-office/app/views/items/export_import.html.erb
Normal file
21
back-office/app/views/items/export_import.html.erb
Normal file
@@ -0,0 +1,21 @@
|
||||
<%= form_tag('./export_import') do %>
|
||||
<p><label for="codes">
|
||||
CSV content goes here:
|
||||
</label><br />
|
||||
<textarea id="csv_content" name="csv_content" rows=20 style="width: 100%"><%= @csv_content %></textarea></p>
|
||||
|
||||
<p><label for="task">Task: </label>
|
||||
<%= select_tag "task", options_for_select(@tasks, @task) %></p>
|
||||
|
||||
<p><%= submit_tag "Run task" %></p>
|
||||
|
||||
<% if !@error_message.nil? && @error_message != "" %>
|
||||
<div>Error message: <span style="color: red"><%= @error_message %></span></div>
|
||||
<% end %>
|
||||
|
||||
<br />
|
||||
<p><label for="output_area">Output area: </label>
|
||||
<div id="output_area" style="width: 100%;height: 14em;outline: 1px solid #A9A9A9; overflow: scroll"><%= unless @output.nil?
|
||||
@output.html_safe end %>
|
||||
</div>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user