Ejemplo n.º 1
0
 def on_submit(self):
     default_receivable_account = frappe.get_value(
         'Company', self.company, 'default_receivable_account')
     default_income_account = frappe.get_value('Company', self.company,
                                               'default_income_account')
     make_gl_entry(self, default_receivable_account, self.total_amount,
                   flt(0))
     make_gl_entry(self, default_income_account, flt(0), self.total_amount)
Ejemplo n.º 2
0
 def on_submit(self):
     default_inventory_account = frappe.get_value(
         'Company', self.company, 'default_inventory_account')
     stock_received_but_not_billed = frappe.get_value(
         'Company', self.company, 'stock_received_but_not_billed')
     make_gl_entry(self, default_inventory_account, self.total_amount,
                   flt(0))
     make_gl_entry(self, stock_received_but_not_billed, flt(0),
                   self.total_amount)
Ejemplo n.º 3
0
    def on_submit(self):
        default_expense_account = frappe.get_value('Company', self.company,
                                                   'default_expense_account')
        default_inventory_account = frappe.get_value(
            'Company', self.company, 'default_inventory_account')

        make_gl_entry(self, default_expense_account, self.total_cost_price,
                      flt(0))  #debit account
        make_gl_entry(self, default_inventory_account, flt(0),
                      self.total_cost_price)  #credit account
Ejemplo n.º 4
0
 def on_submit(self):
     if self.payment_type == "Pay":
         account_paid_to = frappe.get_value('Company', self.company,
                                            'default_payable_account')
         account_paid_from = frappe.get_value('Company', self.company,
                                              'default_cash_account')
         self.account_paid_to = account_paid_to
         self.account_paid_from = account_paid_from
         make_gl_entry(self, self.account_paid_to, self.amount, flt(0))
         make_gl_entry(self, self.account_paid_from, flt(0), self.amount)
     else:
         account_paid_to = frappe.get_value('Company', self.company,
                                            'default_cash_account')
         account_paid_from = frappe.get_value('Company', self.company,
                                              'default_receivable_account')
         self.account_paid_to = account_paid_to
         self.account_paid_from = account_paid_from
         make_gl_entry(self, self.account_paid_to, self.amount, flt(0))
         make_gl_entry(self, self.account_paid_from, flt(0), self.amount)
Ejemplo n.º 5
0
 def on_submit(self):
     for d in self.accounting_entries:
         make_gl_entry(self, d.account, d.debit, d.credit)
Ejemplo n.º 6
0
 def on_submit(self):
     make_gl_entry(self, self.expense_account, self.total_amount, 0)
     make_gl_entry(self, self.credit_to, 0, self.total_amount)
Ejemplo n.º 7
0
 def on_submit(self):
     make_gl_entry(self, self.income_account, 0, self.total_amount)
     make_gl_entry(self, self.debit_to, self.total_amount, 0)
Ejemplo n.º 8
0
	def on_submit(self):
		make_gl_entry(self, self.paid_from, 0, self.paid_amount)
		make_gl_entry(self, self.paid_to, self.paid_amount, 0)
Ejemplo n.º 9
0
 def on_submit(self):
     for entry in self.accounts:
         make_gl_entry(self, entry.account, entry.debit, entry.credit)
Ejemplo n.º 10
0
	def on_submit(self):
		default_expense_account = frappe.get_value('Company', self.company, 'default_expense_account')
		default_inventory_account = frappe.get_value('Company', self.company, 'default_inventory_account')
		make_gl_entry(self, default_expense_account, self.total_amount, flt(0))
		make_gl_entry(self, default_inventory_account, flt(0), self.total_amount)