payday 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -113,6 +113,8 @@ We've had some awesome contributers:
113
113
  * Pierre Olivier Martel ([pomartel](http://github.com/pomartel))
114
114
  * Matt Hoofman ([mhoofman](https://github.com/mhoofman))
115
115
  * Édouard Brière ([edouard](https://github.com/edouard))
116
+ * Jim Jones ([aantix](https://github.com/aantix))
117
+ * Hussein Morsy ([husseinmorsy](https://github.com/husseinmorsy))
116
118
 
117
119
  To Do
118
120
  ===
@@ -153,4 +155,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
153
155
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
154
156
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
155
157
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
156
- THE SOFTWARE.
158
+ THE SOFTWARE.
@@ -7,11 +7,13 @@ module Payday
7
7
  class LineItem
8
8
  include LineItemable
9
9
 
10
- attr_accessor :description, :quantity, :price
10
+ attr_accessor :description, :quantity, :display_quantity, :display_price, :price
11
11
 
12
12
  # Initializes a new LineItem
13
13
  def initialize(options = {})
14
14
  self.quantity = options[:quantity] || "1"
15
+ self.display_quantity = options[:display_quantity]
16
+ self.display_price = options[:display_price]
15
17
  self.price = options[:price] || "0.00"
16
18
  self.description = options[:description] || ""
17
19
  end
@@ -5,15 +5,17 @@ de:
5
5
  paid: BEZAHLT
6
6
  invoice:
7
7
  bill_to: Rechnung an
8
- due_date: "Fälligkeit:"
8
+ ship_to: Versenden an
9
9
  invoice_no: "Rechnungsnr.:"
10
+ due_date: "Fälligkeit:"
10
11
  paid_date: "Zahlungsdatum:"
11
- ship_to: Versenden an
12
12
  subtotal: "Zwischensumme:"
13
+ shipping: "Versand:"
13
14
  tax: "Steuern:"
14
15
  total: "Gesamt:"
16
+ notes: "Anmerkungen"
15
17
  line_item:
16
- amount: Betrag
17
18
  description: Beschreibung
19
+ unit_price: Stückpreis
18
20
  quantity: Menge
19
- unit_price: Stückpreis
21
+ amount: Betrag
@@ -17,4 +17,4 @@ en:
17
17
  description: Description
18
18
  unit_price: Unit Price
19
19
  quantity: Quantity
20
- amount: Amount
20
+ amount: Amount
@@ -5,15 +5,17 @@ es:
5
5
  paid: PAGADO
6
6
  invoice:
7
7
  bill_to: Facturar a
8
- due_date: "Vencimiento:"
9
8
  invoice_no: "Recibo #:"
10
- paid_date: "Pagado en:"
9
+ due_date: "Vencimiento:"
11
10
  ship_to: Enviar a
11
+ paid_date: "Pagado en:"
12
12
  subtotal: "Subtotal:"
13
+ shipping: "Envío:"
13
14
  tax: "Impuesto:"
14
15
  total: "Total:"
16
+ notes: "Notas"
15
17
  line_item:
16
- amount: Cantidad
17
18
  description: Descripción
19
+ unit_price: Precio por Unidad
18
20
  quantity: Cantidad
19
- unit_price: Precio por Unidad
21
+ amount: Cantidad
@@ -10,10 +10,12 @@ fr:
10
10
  due_date: "Paiment dû le:"
11
11
  paid_date: "Payé le:"
12
12
  subtotal: "Sous-total:"
13
+ shipping: "Livraison:"
13
14
  tax: "Taxe:"
14
15
  total: "Total:"
16
+ notes: "Notes"
15
17
  line_item:
16
18
  description: Description
17
19
  unit_price: Prix unitaire
18
20
  quantity: Quantité
19
- amount: Montant
21
+ amount: Montant
@@ -150,8 +150,10 @@ module Payday
150
150
  bold_cell(pdf, I18n.t('payday.line_item.quantity', :default => "Quantity"), :align => :center, :borders => []),
151
151
  bold_cell(pdf, I18n.t('payday.line_item.amount', :default => "Amount"), :align => :center, :borders => [])]
152
152
  invoice.line_items.each do |line|
153
- table_data << [line.description, number_to_currency(line.price, invoice), BigDecimal.new(line.quantity.to_s).to_s("F"),
154
- number_to_currency(line.amount, invoice)]
153
+ table_data << [line.description,
154
+ (line.display_price || number_to_currency(line.price, invoice)),
155
+ (line.display_quantity || BigDecimal.new(line.quantity.to_s).to_s("F")),
156
+ number_to_currency(line.amount, invoice)]
155
157
  end
156
158
 
157
159
  pdf.move_cursor_to(pdf.cursor - 20)
@@ -2,5 +2,5 @@
2
2
  module Payday
3
3
 
4
4
  # Current Version
5
- VERSION = "1.0.2"
5
+ VERSION = "1.0.3"
6
6
  end
data/payday.gemspec CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
14
14
 
15
15
  s.add_dependency("prawn", "~> 0.11.1")
16
16
  s.add_dependency("money", "~> 3.6.1")
17
- s.add_dependency("i18n", "~> 0.5.0")
17
+ s.add_dependency("i18n", ">= 0.5.0")
18
18
 
19
19
  s.add_development_dependency("minitest")
20
20
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: payday
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.2
5
+ version: 1.0.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Alan Johnson
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-10 00:00:00 -04:00
13
+ date: 2011-05-24 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -41,7 +41,7 @@ dependencies:
41
41
  requirement: &id003 !ruby/object:Gem::Requirement
42
42
  none: false
43
43
  requirements:
44
- - - ~>
44
+ - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: 0.5.0
47
47
  type: :runtime