diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 43a58ee..f3b86ee 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -1,5 +1,5 @@ @import "bootstrap-sprockets"; @import "bootstrap"; @import "bootstrap-datepicker3"; - +@import "colors"; @import "scaffolds"; diff --git a/app/assets/stylesheets/colors.scss b/app/assets/stylesheets/colors.scss new file mode 100644 index 0000000..acce2fb --- /dev/null +++ b/app/assets/stylesheets/colors.scss @@ -0,0 +1 @@ +$teal: #4ebdd7; diff --git a/app/assets/stylesheets/scaffolds.scss b/app/assets/stylesheets/scaffolds.scss index 32701c3..0f3a9dd 100644 --- a/app/assets/stylesheets/scaffolds.scss +++ b/app/assets/stylesheets/scaffolds.scss @@ -19,11 +19,10 @@ pre { } a { - color: #000; + color: $teal; &:hover { - color: #fff; - background-color: #000; + text-decoration: underline; } } diff --git a/app/controllers/invoices_controller.rb b/app/controllers/invoices_controller.rb index b4de421..02bc655 100644 --- a/app/controllers/invoices_controller.rb +++ b/app/controllers/invoices_controller.rb @@ -56,7 +56,7 @@ def update def destroy @invoice.destroy respond_to do |format| - format.html { redirect_to invoices_url, notice: 'Factura eliminada' } + format.html { redirect_to [@namespace, :invoices], notice: 'Factura eliminada' } format.json { head :no_content } end end diff --git a/app/models/invoice.rb b/app/models/invoice.rb index e4ed72b..d66a3c2 100644 --- a/app/models/invoice.rb +++ b/app/models/invoice.rb @@ -12,6 +12,8 @@ class Invoice < ActiveRecord::Base monetize :exempt_cents monetize :perception_cents + default_scope { order(date: 'DESC') } + def operator_namespace operator.class.to_s.pluralize.downcase end diff --git a/app/views/invoices/_form.html.erb b/app/views/invoices/_form.html.erb index 3b9410d..4b566d8 100644 --- a/app/views/invoices/_form.html.erb +++ b/app/views/invoices/_form.html.erb @@ -19,6 +19,6 @@
| Fecha | Operador | -CUIT | Factura | -Pto_d_Vta | -Nro | Gravado 21% | IVA 21% | Gravado 10,5% | IVA 10,5% | No gravado | Exento | -Percepcion AFIP | +5% AFIP | Total | -||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <%= localize invoice.date, :format => '%d/%m/%Y' %> | -<%= invoice.operator.name %> | -<%= invoice.operator.cuit %> | -<%= invoice.invoice_type %> | -<%= invoice.sales_point %> | -<%= invoice.number %> | -<%= invoice.taxed_21 %> | -<%= number_to_currency invoice.tax_21, unit: '' %> | -<%= invoice.taxed_105 %> | -<%= number_to_currency invoice.tax_105, unit: '' %> | -<%= invoice.not_taxed %> | -<%= invoice.exempt %> | -<%= invoice.perception %> | -<%= number_to_currency invoice.total, unit: '' %> | -<%= link_to 'Detalles', [invoice.operator_namespace, invoice] %> | -<%= link_to 'Editar', - [:edit, invoice.operator_namespace, invoice] %> | -<%= link_to 'Borrar', [invoice.operator_namespace, invoice], - method: :delete, data: { confirm: '¿Seguro de borrar?' } %> | +<%= invoice.operator.name.truncate 30 %> | +<%= link_to invoice.full_number, invoice_path(invoice)%> | +<%= invoice.taxed_21 %> | +<%= number_to_currency invoice.tax_21, unit: '' %> | +<%= invoice.taxed_105 %> | +<%= number_to_currency invoice.tax_105, unit: '' %> | +<%= invoice.not_taxed %> | +<%= invoice.exempt %> | +<%= invoice.perception %> | +<%= number_to_currency invoice.total %> |
| Monto | diff --git a/app/views/operators/_operators.html.erb b/app/views/operators/_operators.html.erb index 52dc48f..0de217f 100644 --- a/app/views/operators/_operators.html.erb +++ b/app/views/operators/_operators.html.erb @@ -1,4 +1,4 @@ -
|---|
| Nombre | diff --git a/app/views/passengers/_passengers.html.erb b/app/views/passengers/_passengers.html.erb index 5b8a822..000bb40 100644 --- a/app/views/passengers/_passengers.html.erb +++ b/app/views/passengers/_passengers.html.erb @@ -1,4 +1,4 @@ -
|---|
| Name | diff --git a/app/views/reservas/index.html.erb b/app/views/reservas/index.html.erb index c37efb7..5794968 100644 --- a/app/views/reservas/index.html.erb +++ b/app/views/reservas/index.html.erb @@ -17,7 +17,7 @@ -
|---|
| Salida |
|---|