แจ้งข่าว ทางเว็บบอร์ด openerpthailand.org ได้เปลี่ยนระบบเว็บบอร์ด ใหม่เป็น phpBB 3.1- บุคคลทั่วไป จะไม่สามารถเข้าอ่านกระทู้บางบอร์ด แนะนำให้ท่าน สมัครสมาชิกคลิกตามลิงค์นี้
- สมาชิกใหม่ ถ้ายังไม่ได้แนะนำตัวจะไม่สามารถ ตั้งกระทู้ และ ดาวน์โหลด ไฟล์จากเว็บบอร์ดได้ ท่านจำเป็นต้องแนะนำตัวที่หมวดนี้
- ถ้ามีปัญหาการใช้งาน หรือ ข้อเสนอแนะใดๆ แนะนำได้ที่นี่
- ปุ่มรูปหัวใจใต้โพส แต่ละโพส ท่านสามารถกดเพื่อสื่อถึงคนโพสนั้นถูกใจท่าน
- ห้ามลง E-mail, เบอร์โทรส่วนตัว, Line id หรือข้อมูลส่วนตัวอื่นๆ เพื่อป้องกันการแอบอ้างและโฆษณาแฝง โดยสามารถติดต่อสมาชิกท่านอื่นผ่านระบบ PM ของบอร์ด
- ท่านสามารถปิดการแจ้งนี้ได้ ที่มุมขวาของกล่องข้อความนี้
บุคคลทั่วไปสามาเข้าสู่ระบบ ด้วย Account ของ FaceBook ได้แล้ว คลิกที่นี่ได้เลย
การ Set Payment Term
การ Set Payment Term
ในกรณีที่ต้องการให้ตั้งการจ่ายเงินให้เป็น 50% แรกก่อนที่จะเริ่มทำงาน 7 วัน และ 50% หลังจากส่งมอบงานแล้ว มีวิธีการเซ็ตยังไงบ้างครับ
Re: การ Set Payment Term
ในการใช้ Payment Term Advanced ในระบบบัญชี
ต้องมีการ customize เพิ่มโดยการ ต่อเติมคลาส account.payment.term และ account.payment.term.line
เมื่อจัดการในส่วน Model เรียบร้อยแล้ว
ไว้ผมจะมาจัดการในส่วนของ Views เพื่อแสดงผลต่อนะครับ ^_^
ต้องมีการ customize เพิ่มโดยการ ต่อเติมคลาส account.payment.term และ account.payment.term.line
เมื่อจัดการในส่วน Model เรียบร้อยแล้ว
ไว้ผมจะมาจัดการในส่วนของ Views เพื่อแสดงผลต่อนะครับ ^_^
โค้ด: เลือกทั้งหมด
class account_payment_term(osv.osv):
_inherit="account.payment.term"
def compute(self, cr, uid, id, value, date_ref=False, context=None):
if isinstance(id, list):
id = id[0]
if not date_ref:
date_ref = datetime.now().strftime('%Y-%m-%d')
pt = self.browse(cr, uid, id, context=context)
amount = value
result = []
prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
for line in pt.line_ids:
if line.value == 'fixed':
amt = round(line.value_amount, prec)
elif line.value == 'procent':
amt = round(value * line.value_amount, prec)
elif line.value == 'balance':
amt = round(amount, prec)
elif line.value == 'division':
amt = round(value / line.value_amount, prec)
if amt:
next_date = datetime.strptime(date_ref, '%Y-%m-%d')
# Add months first
next_date += relativedelta(months=line.months or 0)
# Add days later
next_date += relativedelta(days=line.days)
if line.days2 < 0:
next_first_date = next_date + relativedelta(day=1,months=1) #Getting 1st of next month
next_date = next_first_date + relativedelta(days=line.days2)
if line.days2 > 0:
next_date += relativedelta(day=line.days2, months=1)
if line.exclude_month1 > 0:
if int(next_date.strftime('%m')) == line.exclude_month1:
next_date += relativedelta(months=1, day=line.exclude_day1)
if line.exclude_month2 > 0:
if int(next_date.strftime('%m')) == line.exclude_month2:
next_date += relativedelta(months=1, day=line.exclude_day2)
result.append( (next_date.strftime('%Y-%m-%d'), amt) )
amount -= amt
return result
account_payment_term()
class account_payment_term_line(osv.osv):
_inherit = 'account.payment.term.line'
_columns = {
'months': fields.integer('Number of Months', help="Number of months to add to invoice date."),
'exclude_month1': fields.integer('Trigger Month 1 ', help="First month to trigger the date."),
'exclude_day1': fields.integer('Day 1 Default', help="Day of the next Month to set."),
'exclude_month2': fields.integer('Trigger Month 2', help="Second month to trigger the date."),
'exclude_day2': fields.integer('Day 2 Default', help="Day of the next Month to set."),
'value': fields.selection([
('procent', 'Percent'),
('balance', 'Balance'),
('fixed', 'Fixed Amount'),
('division', 'Division'),
], 'Valuation', required=True, help="Select here the kind of valuation related to this payment term line. Note that you should have your last line with the type 'Balance' to ensure that the whole amount will be threated."),
'value_amount': fields.float('Value Amount', digits=(12,4), help="For Value percent enter % ratio between 0-1."),
}
account_payment_term_line()[b][color=#008000]รับปรึกษาปัญหาเทคนิค[/color] *** สายเซ็นผิดกฏ *** [/b]
Re: การ Set Payment Term
กำลังติดตามอยู่นะครับ ^ ^
Re: การ Set Payment Term
ขอบคุณมากๆ ครับ สุดยอดมากครับ ขอติดตามนะครับ
Re: การ Set Payment Term
โปรแกรม ไม่ต้องแก้เพิ่ม ก็ เปิด อินวอย เป็น เปอร์เช็นได้นะค่ะ
-
- Similar Topics
- ตอบกลับ
- แสดง
- โพสต์ล่าสุด
-
-
อยากเพิ่ม supplier payment term ครับ สามารถเพิ่มได้ที่ไหนครับ
โดย thanathorn » จันทร์ 10 ก.พ. 2014 10:27 pm » ใน เริ่มต้นกับโปรแกรม Odoo / OpenERP - 0
- 1655
-
โดย thanathorn
ดูข้อความล่าสุด
จันทร์ 10 ก.พ. 2014 10:27 pm
-
ผู้ใช้งานขณะนี้
กำลังดูบอร์ดนี้: 3 และ บุคคลทั่วไป 0 ท่าน
Log in with LINE
