AP Invoice v2: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1:
==Technical Specification==
==Rules in APInvoice==
# AccNo (Purchase A/C) cannot be empty or null.
# AccNo (Purchase A/C) cannot be Debtor or Creditor Account No.
# NetTotal cannot be in negative value.
# '''NetTotal''' is the sum of amount & GST from details, this field is '''ReadOnly'''.
# Total '''GST''' is the sum of GST & GST Adjustment from details, this field is '''ReadOnly'''.
# Do not set '''empty string''' to '''ProjNo''' and '''DeptNo''', when it is empty, set to '''null''' or '''DBNull.Value'''.
#*Note that when '''null''' is assigned to a field,:When the value of theProjNo and fieldDeptNo is convertedempty, set to '''null''' or '''DBNull.Value'''.<syntaxhighlight lang="csharp">
#*Note that when '''null''' is assigned to '''ProjNo''' and '''DeptNo''' in '''AR & AP''' that is an '''object''' type, the value of the field is converted to '''DBNull.Value'''.<syntaxhighlight lang="csharp" highlight="3,6">
//dtl.ProjNo in AR & AP is an object type, not string type
dtl.ProjNo = null;
if (dtl.ProjNo == null)
Line 14 ⟶ 16:
</syntaxhighlight>
#:The above code will always prompt "Project has value".
#*When change '''null''' to '''DBNull.Value''' inat the comparison<syntaxhighlight lang="csharp" highlight="2,3">
dtl.ProjNo = null;
if (dtl.ProjNo == DBNull.Value)
Line 27 ⟶ 29:
{{BaseReferenceAC20}}
'''AutoCount.ARAP.dll'''
 
<br />
==API Usage==
Line 76 ⟶ 77:
}
</syntaxhighlight>
 
===Edit AP Invoice===
<syntaxhighlight lang="csharp">
Line 130:
}
</syntaxhighlight>
 
===Cancel (void) AP Invoice===
<syntaxhighlight lang="csharp">
Line 173 ⟶ 172:
</syntaxhighlight>
 
==Sample with data model==
===Create new AP Invoice from DataModel===
<syntaxhighlight lang="csharp">
Line 277 ⟶ 276:
</syntaxhighlight>
 
{{SeeAlsoAPIAccount}}
{{SeeAlsoAccountV2}}
 
[[Category:Programmer]]
[[Category:API]]