Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
invoice_details = request_data.copy()
document_header = invoice_details.get("document_header")
order_no = document_header.get("order_no")
status_value = semba_order_models.document_status.objects.get_by_natural_key("Invoiced").status_value
status_title = "Invoiced"
orginal_doc = semba_order_models.document_transaction_header.objects.get(document_no=order_no)
original_status_title = orginal_doc.document_status_title
original_status_value = orginal_doc.document_status_value
update = semba_order_models.document_transaction_header.objects.filter(document_no=order_no).update(
document_status_value=status_value,
document_status_title=status_title,
modified_on=datetime.datetime.now())
invoice = semba_order_models.document_transaction_header.objects.get(document_no=order_no)
invoice.pk = None
doc_seq = document_no_generator().sales_invoice_sequence()
invoice.document_no = doc_seq
invoice.original_document_no = order_no
invoice.created_on = datetime.datetime.now()
invoice.start_date = datetime.datetime.now()
invoice.end_date = datetime.datetime.now() + datetime.timedelta(days=100)
document_type = semba_order_models.document_transaction_type.objects.get_by_natural_key("POSTEDSALESINVOICE")
invoice.document2doc_transaction_type_id = document_type.id
invoice.document_title = document_type.title
invoice.document_status_value = original_status_value
invoice.document_status_title = original_status_title
# If status is payment Pending
if original_status_value == 2:
invoice.due_date = datetime.datetime.today()+datetime.timedelta(days=3)
invoice.save()
document_lines = semba_order_models.
transaction_document_line.objects.filter(line2transaction_header=orginal_doc.id)
for i in range(0, len(document_lines)):
document_lines[i].pk = None
document_lines[i].line2transaction_header = invoice
document_lines[i].created_on = datetime.datetime.now()
document_lines[i].modified_on = datetime.datetime.now()
document_lines[i].start_date = datetime.datetime.now()
document_lines[i].end_date = datetime.datetime.now() + datetime.timedelta(days=100)
document_lines[i].save()
success_msg = "SUCCESS"
helper.set_api_result(uuid=uid, result=smb_api_models.SUCCESS, message=success_msg)
return True
except Exception:
error_msg = str("Uploading invoice failed .please contact admin")
helper.set_api_result(uuid=uid, result=smb_api_models.FAILURE, message=error_msg)
return False
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team