Merge branch 'registry-772' into registry-623

# Conflicts:
#	app/models/invoice.rb
#	db/structure.sql
This commit is contained in:
Artur Beljajev 2018-03-10 16:48:47 +02:00
commit 7acd41595c
10 changed files with 29 additions and 12 deletions

View file

@ -3,7 +3,7 @@ class Directo < ActiveRecord::Base
belongs_to :item, polymorphic: true
def self.send_receipts
new_trans = Invoice.where(invoice_type: "DEB", in_directo: false).where(cancelled_at: nil)
new_trans = Invoice.where(in_directo: false).where(cancelled_at: nil)
total = new_trans.count
counter = 0
Rails.logger.info("[DIRECTO] Will try to send #{total} invoices")