Skip to content

Instantly share code, notes, and snippets.

@j3ck
Created August 14, 2017 13:38
Show Gist options
  • Save j3ck/ec4f00bcd5582effcb56aa7d1a520eb0 to your computer and use it in GitHub Desktop.
Save j3ck/ec4f00bcd5582effcb56aa7d1a520eb0 to your computer and use it in GitHub Desktop.
def lol
# ... something
@operations, history = [], {}
wtf
#... wat
end
def wtf
# ... wtf
@operation = Operation.create(description: description,
invoice_payment_id: @invoice_payment.id,
amount: operation_amount.abs,
contact: line.invoice.contact,
author: @invoice_payment.author,
account: @invoice.account,
operation_date: @invoice_payment.payment_date,
category_id: @line_category,
is_approved: true,
manual: false) if @invoice_payment.payment_date.yday() < Time.now.yday()
@operation = Operation.create(description: description,
invoice_payment_id: @invoice_payment.id,
amount: operation_amount.abs,
contact: line.invoice.contact,
author: @invoice_payment.author,
account: @invoice.account,
operation_date: Time.now,
category_id: @line_category,
is_approved: true,
manual: false) unless @invoice_payment.payment_date.yday() < Time.now.yday()
# ... wtf
@operations << @operation
# wtf ...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment