Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: shingonoide/spree-pos
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: CodeCantor/spree-pos
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.

Commits on May 11, 2012

  1. first 1.0 changes, tax not finished

    Torsten Ruger committed May 11, 2012
    Copy the full SHA
    7075b1b View commit details

Commits on May 17, 2012

  1. Copy the full SHA
    635f6af View commit details

Commits on May 19, 2012

  1. switch to order and back

    Torsten Ruger committed May 19, 2012
    Copy the full SHA
    39a88d5 View commit details

Commits on May 20, 2012

  1. select fix and inentory. almost ready

    Torsten Ruger committed May 20, 2012
    Copy the full SHA
    ce0a4c2 View commit details

Commits on Jun 2, 2012

  1. fix shipp for now

    Torsten Ruger committed Jun 2, 2012
    Copy the full SHA
    48d4f9b View commit details

Commits on Jun 4, 2012

  1. partial fixed due to mass assignment

    Torsten Ruger committed Jun 4, 2012
    Copy the full SHA
    3d8181b View commit details
  2. ransacked

    Torsten Ruger committed Jun 4, 2012
    Copy the full SHA
    54205bf View commit details

Commits on Jun 8, 2012

  1. config for shipment, payment works, user is customer

    Torsten Ruger committed Jun 8, 2012
    Copy the full SHA
    4588b99 View commit details
  2. fix price and quantity

    Torsten Ruger committed Jun 8, 2012
    Copy the full SHA
    17a56fd View commit details
  3. remove slider (tryout)

    Torsten Ruger committed Jun 8, 2012
    Copy the full SHA
    c6fdf20 View commit details
  4. fix the find page

    Torsten Ruger committed Jun 8, 2012
    Copy the full SHA
    a830f5c View commit details
  5. fix the missing tax

    Torsten Ruger committed Jun 8, 2012
    Copy the full SHA
    a5208fb View commit details

Commits on Jun 10, 2012

  1. error handling for inventory function

    Torsten Ruger committed Jun 10, 2012
    Copy the full SHA
    be80f67 View commit details
  2. updates readme and adds a print redirect config option

    Torsten Ruger committed Jun 10, 2012
    Copy the full SHA
    b7f4751 View commit details

Commits on Jun 12, 2012

  1. fixed the print redirect bug that i just introduced

    Torsten Ruger committed Jun 12, 2012
    Copy the full SHA
    6899ac5 View commit details
  2. fix gemspec and versionfile

    Torsten Ruger committed Jun 12, 2012
    Copy the full SHA
    8e11842 View commit details

Commits on Jun 14, 2012

  1. fix the ean fields

    Torsten Ruger committed Jun 14, 2012
    Copy the full SHA
    9a2db99 View commit details

Commits on Jun 15, 2012

  1. fix vat price bug in variant list

    Torsten Ruger committed Jun 15, 2012
    Copy the full SHA
    3dadb2d View commit details

Commits on Jun 17, 2012

  1. improves readme

    Torsten Ruger committed Jun 17, 2012
    Copy the full SHA
    585285c View commit details

Commits on Jun 28, 2012

  1. move overrides to override dir

    Torsten Ruger committed Jun 28, 2012
    Copy the full SHA
    85ae426 View commit details

Commits on Jul 11, 2012

  1. fix (hack) inventory update

    Torsten Ruger committed Jul 11, 2012
    Copy the full SHA
    9e5a274 View commit details
  2. Copy the full SHA
    146110f View commit details

Commits on Sep 23, 2012

  1. fix the min and max prices

    Torsten Rüger committed Sep 23, 2012
    Copy the full SHA
    3d7d5a6 View commit details
  2. bugfix, was showing deleted variants to add

    Torsten Rüger committed Sep 23, 2012
    Copy the full SHA
    f015456 View commit details

Commits on Sep 27, 2012

  1. fixed for 1.2(remove cucumber)

    Torsten Rüger committed Sep 27, 2012
    Copy the full SHA
    6d980c9 View commit details

Commits on Nov 6, 2012

  1. adds more search option in find page, and ean save bug

    Torsten Ruger committed Nov 6, 2012
    Copy the full SHA
    ae44b4b View commit details

Commits on Dec 17, 2012

  1. seems to pick up the field without the override, which wasn't working…

    … anyway
    Torsten Ruger committed Dec 17, 2012
    Copy the full SHA
    fc4d180 View commit details
  2. fixed find for option values

    Torsten Ruger committed Dec 17, 2012
    Copy the full SHA
    e9a29ca View commit details

Commits on Dec 18, 2012

  1. minor translation

    Torsten Ruger committed Dec 18, 2012
    Copy the full SHA
    67b8288 View commit details
  2. adds barcodes

    Torsten Ruger committed Dec 18, 2012
    Copy the full SHA
    6b5f1ac View commit details
  3. fixes dependencies

    Torsten Ruger committed Dec 18, 2012
    Copy the full SHA
    ccb4209 View commit details

Commits on Apr 17, 2013

  1. notice of removal

    Torsten Ruger committed Apr 17, 2013
    Copy the full SHA
    44461bd View commit details

Commits on Jul 9, 2013

  1. Copy the full SHA
    1a64c48 View commit details
  2. Copy the full SHA
    40c3d4c View commit details
  3. Work in spree 2.0

    enriqueaf committed Jul 9, 2013
    Copy the full SHA
    62415d5 View commit details
  4. Change for 2.0

    enriqueaf committed Jul 9, 2013
    Copy the full SHA
    9f61f9d View commit details
  5. Change readme

    enriqueaf committed Jul 9, 2013
    Copy the full SHA
    4339f6f View commit details
  6. Change readme

    enriqueaf committed Jul 9, 2013
    Copy the full SHA
    8bae895 View commit details
  7. Added keyboard

    enriqueaf committed Jul 9, 2013
    Copy the full SHA
    476090e View commit details
  8. partial

    enriqueaf committed Jul 9, 2013
    Copy the full SHA
    fc0fef8 View commit details

Commits on Jul 10, 2013

  1. Copy the full SHA
    c0bbca8 View commit details
  2. Copy the full SHA
    19e1376 View commit details
  3. Copy the full SHA
    4b4403c View commit details
  4. Change README

    enriqueaf committed Jul 10, 2013
    Copy the full SHA
    2fd3841 View commit details

Commits on Jul 12, 2013

  1. Added shopping cart icon

    enriqueaf committed Jul 12, 2013
    Copy the full SHA
    2b56734 View commit details

Commits on Jul 15, 2013

  1. Copy the full SHA
    f2aca78 View commit details
  2. Added some options

    enriqueaf committed Jul 15, 2013
    Copy the full SHA
    368fb3c View commit details
  3. Copy the full SHA
    e5aab92 View commit details
  4. Minor corrections in README

    Serabe committed Jul 15, 2013
    Copy the full SHA
    30e3fe5 View commit details

Commits on Aug 8, 2013

  1. Added generator

    enriqueaf committed Aug 8, 2013
    Copy the full SHA
    f6c1861 View commit details
Showing with 1,502 additions and 420 deletions.
  1. +2 −0 .gitignore
  2. +59 −31 README.md
  3. +0 −2 Rakefile
  4. +7 −1 Versionfile
  5. BIN app/assets/images/admin/pos/order.jpg
  6. +1 −0 app/assets/javascripts/admin/pos/keyboard.js.coffee
  7. +1 −0 app/assets/javascripts/admin/pos/pos.js
  8. +1 −0 app/assets/javascripts/admin/pos/refund/all.js
  9. +20 −0 app/assets/stylesheets/admin/html-label.css
  10. +3 −0 app/assets/stylesheets/admin/pos/refund/all.css
  11. +106 −0 app/assets/stylesheets/admin/stickers-print.css.scss
  12. +0 −218 app/controllers/admin/pos_controller.rb
  13. +67 −0 app/controllers/spree/admin/barcode_controller.rb
  14. +280 −0 app/controllers/spree/admin/pos_controller.rb
  15. +22 −0 app/controllers/spree/admin/print_coupon_controller.rb
  16. +63 −0 app/controllers/spree/admin/refund_controller.rb
  17. +7 −0 app/helpers/admin/barcode_helper.rb
  18. +8 −0 app/helpers/admin/pos_helper.rb
  19. +0 −35 app/models/pos_item.rb
  20. +0 −5 app/models/product_decorator.rb
  21. +36 −0 app/models/spree/payment_method/credit_card_pos.rb
  22. +40 −0 app/models/spree/payment_method/money_pos.rb
  23. +6 −0 app/models/spree/payment_method_decorator.rb
  24. +9 −0 app/models/spree/promotion_decorator.rb
  25. +5 −0 app/models/spree/sticker.rb
  26. +7 −0 app/models/spree/variant_decorator.rb
  27. +0 −7 app/models/variant_decorator.rb
  28. +5 −0 app/overrides/add_pos_button.rb
  29. +5 −0 app/overrides/add_promotion_used.rb
  30. +10 −0 app/overrides/add_promotions_state.rb
  31. +15 −0 app/overrides/codes.rb
  32. +8 −0 app/overrides/ean_fields.rb
  33. +5 −0 app/overrides/pos_admin_tab.rb
  34. +6 −0 app/overrides/promotion_code_print.rb
  35. +12 −0 app/views/spree/admin/barcode/_barcode_sticker.html.erb
  36. +28 −0 app/views/spree/admin/barcode/basic.html.erb
  37. +19 −0 app/views/spree/admin/barcode/stickers.html.erb
  38. +12 −0 app/views/spree/admin/layouts/popup_pos.html.erb
  39. +22 −0 app/views/spree/admin/layouts/receipt.html.erb
  40. +22 −0 app/views/spree/admin/layouts/refund.html.erb
  41. +14 −0 app/views/spree/admin/layouts/stickers.html.erb
  42. +1 −0 app/views/spree/admin/orders/_pos_button.html.erb
  43. +32 −0 app/views/spree/admin/pos/_keyboard.erb
  44. +18 −18 app/views/{ → spree}/admin/pos/find.html.erb
  45. +52 −0 app/views/spree/admin/pos/payment.html.erb
  46. +37 −0 app/views/spree/admin/pos/report.html.erb
  47. +31 −31 app/views/{admin/pos/index.html.erb → spree/admin/pos/show.html.erb}
  48. +16 −0 app/views/spree/admin/print_coupon/_barcode_coupon_link.html.erb
  49. +5 −0 app/views/spree/admin/print_coupon/print.html.erb
  50. +6 −0 app/views/spree/admin/products/_barcode_product_link.html.erb
  51. +6 −0 app/views/spree/admin/products/_barcode_variant_link.html.erb
  52. +7 −0 app/views/spree/admin/products/_stickers_variant_form.html.erb
  53. +8 −0 app/views/spree/admin/promotions/_orders.html.erb
  54. +3 −0 app/views/spree/admin/promotions/_status_text.html.erb
  55. +14 −0 app/views/spree/admin/refund/create_refund.html.erb
  56. +9 −0 app/views/spree/admin/refund/select_coupon.html.erb
  57. +81 −0 app/views/spree/admin/refund/select_items.html.erb
  58. +7 −0 app/views/spree/admin/refund/select_order.html.erb
  59. +85 −0 app/views/spree/admin/variants/index.html.erb
  60. +3 −0 config/locales/codes-fi.yml
  61. +5 −0 config/locales/en.yml
  62. +6 −0 config/locales/fi.yml
  63. +33 −12 config/routes.rb
  64. +2 −2 db/migrate/20111020121229_add_ean.rb
  65. +5 −0 db/migrate/20130710122945_add_pos_sell_column_to_spree_orders.rb
  66. +19 −0 db/migrate/20140908170015_change_coupon_promotion_usage_limit_to_one_less.rb
  67. +6 −0 db/migrate/20141026184415_add_questions_to_spree_order.rb
  68. +11 −0 db/seeds.rb
  69. +11 −4 lib/generators/spree_pos/install/install_generator.rb
  70. +2 −46 lib/spree_pos.rb
  71. +9 −0 lib/spree_pos/configuration.rb
  72. +30 −0 lib/spree_pos/engine.rb
  73. +9 −8 spree_pos.gemspec
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -7,3 +7,5 @@
tmp
nbproject
*.swp
.rakeTasks
*.iml
90 changes: 59 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,84 @@
SpreePos
===============
SUMMARY
-------

A Point Of Sale (POS) screen for Spree.

POS screen hooks into the Admin Tabs and is meant to be used with a touchscreen.
POS screen hooks into the Admin Tabs and is meant to be used to sell inside a shop, possibly with a touchscreen and a scanner. Allows for quick checkout and basic adjustment of line item prices also with discount percentages.

Basic Bar scanner input (sku/ean search) or search by name. No Customer, no shipping, no coupons...

Allows for adjustment of line item prices and discount percentage of items and total
Features
--------
* Input field for find items by sku/ean
* Print receipts of the order
* Do discounts directly from the interface
* Change calculator
* Label printing
* Flag orders as sold in pos
* Page for searching products

An actual Order is only created when you press print.
How to use
----------

Pressing new will abandon the current sale. Also, there is no way to get to the pos screen from an existing order(yet), if those need to be edited, do so in the orders tab.
A minimal transaction is one scan, and pressing of print button.

Configure
=========
Basic bar scanner input (sku/ean search) or search by name. No Customer, no shipping, no coupons, but these are achievable through the order interface.

And Order must be shipped, so you must configure a ShippingMethod to be used. If you don't the first will be
taken, rarely what you want.
POS creates orders (just like the admin/order) and in fact lets you switch between the two views freely by adding links back and forth. Pressing new customer will create a new order (in checkout), which is finalised when print is pressed. ONLY pressing print will finalise the order, if you do not press print (ie press new customer) the order will be left
in "checkout" state and thus not be a sale in your system.

Spree::Config.set(:pos_shipping => "id_or_name")
Installation
------------

You can use this feature to give a discount or do whatever else you can do with shipments. We use 0€ .
The best way for using this software is by adding this code to your Gemfile:

EAN
====
```shell
gem "spree_pos", :git => "git://github.com/CodeCantor/spree-pos.git"
gem "spree_html_invoice", :git => "git://github.com/CodeCantor/spree-html-invoice.git"
```

Many sales and especially POS systems rely on barcode scanning. A barcde scanner functions identical to keyboard input to the product code. You may use the sku field for this but we use that for the supplier (or own) abbreviation.
For installing the assets needed and creating the default objects run this command:

So there is a migration supplied that provides a ean (European Article code, may be upc too) for the Variant class, and fields to edit it and search by it.
```shell
rails generate spree_pos:install
```

Dependencies
============
Continue reading the configuration section for see how to finish the setup.

None..... but
Configure
--------
**IMPORTANT**: You have to config the shipping method with the zone of the ship address in the pos.

Pos relies on html-invoice to print a receipt. The dependency is not made explicit in case you don't need receipts. If you do add spree-html-invoice to your gemfile you _will_ want to configure the look of the receipt.
By default, the address chosen by the pos, will be the one setted to the current user logged. You can config this address changing this options:

You can install spree-product-barcodes to print product labels if need be. Otherwise use the existing upc barcodes on the products and scan them into the sku.
* Ship Address: You can config this options setting :pos_ship_address to the id of the Spree::Address you would like to use.
* Bill Address: You can config this options setting :pos_bill_address to the id of the Spree::Address you would like to use. By default it will use :ship_address if not set

ToDo
====
I'm just starting , maybe still rough. Currently works for VAT only.
If you would like to use an other shipping method you can change it using, :pos_shipping_method. By default, it will take 'At Store' with a flat rate.

Installation
=======
You can also change the invoice generator url, in wich the pos will redirect after pressing the print button:

Add to your Gemfile with
* Pos printing: Change the option :pos_printing to the url you would like to use after pressing print.

gem "spree_pos", :git => "git://github.com/dancinglightning/spree-pos.git"
If you change this option, the spree_html_invoice gem is not longer required.

What is the EAN?
---------------

Many sales and especially POS systems rely on barcode scanning. A barcode scanner functions identical to keyboard
input to the product code. You may use the sku field for this but we use that for the suppliers code (or our own).

So there is a migration supplied that provides a ean (European Article code, may be upc too) for the Variant class, and fields to edit it and search by it.

and run bundler.

TO-DO
-----
* TESTS !!!!!!!!!!!!!!!!!!!!!!!!!
* Being able to assign a user directly to an order directly from the interface for later invoice printing.
* Do ease the mechanism for devolutions
* Refactor the view so it has the calculator prettier
* Being able to use promotions from this interface
* Create a report with the information of the day sells
* Recover funcionality for add stock directly from pos

Copyright (c) 2011 [Torsten Rüger], released under the New BSD License
Copyright (c) 2011 [Torsten Ruger], released under the New BSD License
Copyright (c) 2013 [Enrique Alvarez (enrique at codecantor dot com)], released under the New BSD License
2 changes: 0 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -3,11 +3,9 @@ require 'rake/testtask'
require 'rake/packagetask'
require 'rubygems/package_task'
require 'rspec/core/rake_task'
require 'cucumber/rake/task'
require 'spree_core/testing_support/common_rake'

RSpec::Core::RakeTask.new
Cucumber::Rake::Task.new

task :default => [:spec, :cucumber ]

8 changes: 7 additions & 1 deletion Versionfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# This file is used to designate compatibilty with different versions of Spree
# Please see http://spreecommerce.com/documentation/extensions.html#versionfile for details

"0.70.x" => { :branch => "master"}
"0.70.x" => { :ref => "793ca3ad2822877babf60c5e3d3bd7b3f39be3db"}
# note: the 1.0 version was in never in production use as I had server crashes with 1.0 and upgraded immediately to 1.1
"1.0.x" => { :ref => "7075b1b483faa183679761f060072515e45dcaf7"}

"1.1.x" => { :ref => "ccb4209c94a326f1760bef0b8a7fd32a3f4be121" }
"2.0.x" => { :branch => "master" }



Binary file added app/assets/images/admin/pos/order.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/assets/javascripts/admin/pos/keyboard.js.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log 'keyboard'
1 change: 1 addition & 0 deletions app/assets/javascripts/admin/pos/pos.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//= require jquery
1 change: 1 addition & 0 deletions app/assets/javascripts/admin/pos/refund/all.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//= require jquery
20 changes: 20 additions & 0 deletions app/assets/stylesheets/admin/html-label.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@page {
margin-left:1mm;
margin-right:1mm;
margin-top:1mm;
margin-bottom:1mm;
}

body {
font-family:"Helvetica";
color:#000000;
width:200px;
}

.label-name {
font-size:13px;
}

.label-price {
font-size:13px;
}
3 changes: 3 additions & 0 deletions app/assets/stylesheets/admin/pos/refund/all.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body {
margin-left: 100px;
}
106 changes: 106 additions & 0 deletions app/assets/stylesheets/admin/stickers-print.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
/* margin print */

@page{
margin: 0;
}

/* css sticker */

body, div {
margin: 0 !important;
padding: 0 !important;
}

.page {
width: 210mm;
height: 297mm;
text-align: center;
overflow: hidden;
font-family: 'Oswald';
font-size: 0.8em;
}

.data_sticker {
line-height: 20px;
overflow: hidden;
}

.data_image {
margin-top: -2px !important;
}

div.sticker {
width: 4.24cm;
height: 1.95cm !important;
margin: 0.5cm !important;
float: left;
overflow: hidden;
&:nth-child(4n+4) {
margin-right: 0 !important;
}
&:nth-child(37), &:nth-child(38), &:nth-child(39), &:nth-child(40) {
margin-bottom: 0 !important;
}
}

img {
width: 100%;
}

.sku_sticker, .price_sticker {
width: 50%;
display: block;
float: left;
}

.sku_sticker {
font-weight: 300;
opacity: 0.7;
}

.profiler-results {
display: none !important;
}

/*
body {
margin: 0;
padding: 0;
}
* {
box-sizing: border-box;
-moz-box-sizing: border-box;
}
.page {
width: 21cm;
min-height: 29.7cm;
padding: 2cm;
margin: 1cm auto;
}
.subpage {
padding: 1cm;
height: 256mm;
}
@page {
size: A4;
margin: 0;
}
@media print {
html, body {
width: 210mm;
height: 297mm;
}
.page {
margin: 0;
border: initial;
border-radius: initial;
width: initial;
min-height: initial;
box-shadow: initial;
background: initial;
page-break-after: always;
}
}
*/
Loading