Ejemplo n.º 1
0
	def make_JV1(self,sum_patient_amt,debit_to,patient_credit_to,company):
		jv=Document('Journal Voucher')
                jv.voucher_type='Bank Voucher'
                jv.posting_date=nowdate()
                jv.user_remark ='Payment Entry against '+self.doc.name
                jv.fiscal_year = '2013-14'
                jv.total_credit = jv.total_debit = sum_patient_amt
                jv.company = company
		jv.against_bill = self.doc.name
                jv.save()

                jvd = Document('Journal Voucher Detail')
                jvd.account = debit_to
                jvd.credit =  sum_patient_amt
		jvd.against_invoice=self.doc.name
                jvd.parent = jv.name
                jvd.save()

                jvd1 = Document('Journal Voucher Detail')
                jvd1.account = patient_credit_to
                jvd1.debit = sum_patient_amt
                jvd1.parent = jv.name
                jvd1.save()
Ejemplo n.º 2
0
	def make_JV(self,amount,referrer_physician_credit_to,referrer_physician_debit_to,company):
		
		jv=Document('Journal Voucher')
		jv.voucher_type='Bank Voucher'
		jv.posting_date=nowdate()
		jv.user_remark = 'Referrals Payment against bill '+ self.doc.name
		jv.fiscal_year = '2013-14'
		jv.total_credit = jv.total_debit = amount
		jv.company = company
		jv.against_bill = self.doc.name
		jv.save()

		jvd = Document('Journal Voucher Detail')
		jvd.account = referrer_physician_credit_to
		jvd.debit =  amount
		jvd.parent = jv.name
		jvd.save()

		jvd1 = Document('Journal Voucher Detail')
		jvd1.account = referrer_physician_debit_to
		jvd1.credit = amount
		jvd1.parent = jv.name
		jvd1.save()