How to know in Script if Any Vendor Bill is Voided? How to seprate Voided Bill?

Hi All,

When a company is purchasing something from Vendor , Vendor Create Quote for Company,
From vendor Side, that is quote or Sales order but from Company who is purchasing treat it as
Purchase Order.

After Creating PO , Company's Authorized person approves it or Reject it. If PO is approved
then it will go for Item Receipt and Then Vendor Bill.
If same Bill is in Vendor's System then Vendor Bill is like invoice for Vendor but for Company who is purchasing it is Vendor Bill.

We can void or cancel vendor bill. Now when we void vendor bill 2 things happen. 

1. In Memo Field: it shows VOID.

2. Total becomes 0.00 .


There is one more event which happens but not visible to everyone. If you are developer and you can read
Source Code, then you can find that under hidden fields there is a field voided which is T.
Means Netsuite is storing a value on form which helps Netsuite's internal scripts/coding to determine if current record is Voided or Not.

If Record is Voided and you want to change value and make it pending approval again then it throws a Error message saying "Voided bills can not be updated". Although, not sure why, Status field still visible.
Ideally it should be greyed out or no status or any direct status should come.

Now This cause real issue:
how to check if record is already voided or not?
     Answer: If amount is 0.00 and memo has VOID text then that is voided. 
  

Another Answer:
  This is based on situation , if you are able to get voided hidden field in Client Script on Init .
Store that value in new checkbox field and use that field for all you logic.


Please let us know if you know better way to do this.

Thanks
Abhi


Comments