Class: Skr::PtLine
Instance Attribute Summary collapse
-
#qty_to_ship ⇒ Object
Returns the value of attribute qty_to_ship.
Instance Method Summary collapse
Instance Attribute Details
#qty_to_ship ⇒ Object
Returns the value of attribute qty_to_ship.
8 9 10 |
# File 'lib/skr/pt_line.rb', line 8 def qty_to_ship @qty_to_ship end |
Instance Method Details
#cancel! ⇒ Object
25 26 27 28 |
# File 'lib/skr/pt_line.rb', line 25 def cancel! self.update_attributes! :is_complete=>true self.pick_ticket.maybe_cancel end |
#is_invoiceable? ⇒ Boolean
30 31 32 |
# File 'lib/skr/pt_line.rb', line 30 def is_invoiceable? ! self.is_complete? && self.qty_to_ship.to_i > 0 end |
#total ⇒ Object
34 35 36 |
# File 'lib/skr/pt_line.rb', line 34 def total self.price * ( self.qty_to_ship || self.qty ) end |