AP Invoice v2: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(2 intermediate revisions 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''' andempty string'''DeptNo''', when it is empty, set to '''nullProjNo''' orand '''DBNull.ValueDeptNo'''.
#:When the value of ProjNo and DeptNo is empty, set to '''null''' or '''DBNull.Value'''.
#*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)
AutoCount.AppMessage.ShowMessage("Project is empty.");
else
AutoCount.AppMessage.ShowMessage("Project has value.");
</syntaxhighlight>
#:The above code will always prompt "Project has value".
#*When change '''null''' to '''DBNull.Value''' at the comparison<syntaxhighlight lang="csharp" highlight="2,3">
dtl.ProjNo = null;
if (dtl.ProjNo == DBNull.Value)
AutoCount.AppMessage.ShowMessage("Project is empty.");
else
AutoCount.AppMessage.ShowMessage("Project has value.");
</syntaxhighlight>
#:The above code will prompt "Project is empty."
 
<br />
==Assemblies References of AutoCount Accounting version 2.0==
{{BaseReferenceAC20}}
'''AutoCount.ARAP.dll'''
 
<br />
==API Usage==
Line 59 ⟶ 77:
}
</syntaxhighlight>
 
===Edit AP Invoice===
<syntaxhighlight lang="csharp">
Line 113 ⟶ 130:
}
</syntaxhighlight>
 
===Cancel (void) AP Invoice===
<syntaxhighlight lang="csharp">
Line 156 ⟶ 172:
</syntaxhighlight>
 
==Sample with data model==
===Create new AP Invoice from DataModel===
<syntaxhighlight lang="csharp">
Line 260 ⟶ 276:
</syntaxhighlight>
 
{{SeeAlsoAPIAccount}}
{{SeeAlsoAccountV2}}
 
[[Category:Programmer]]
[[Category:API]]