(100,279,'en','How To Setup Zakat Calculation','<!--[if gte mso 9]><xml>\n <o:OfficeDocumentSettings>\n  <o:AllowPNG/>\n </o:OfficeDocumentSettings>\n</xml><![endif]--><ol><li>Go to<b> Zakat &amp; Wakaf </b>&gt; <b>Transaction</b> &gt; <b>Zakat Calculation</b>. The Zakat Calculation window appears.</li><li>Select the<b> Zakat Centre</b> from the drop down list.</li><li>Select the <b>Calculation Method</b> from the drop down list.</li><li>Select the <b>Year.</b></li><li>Click<b> Calculate Zakat Button.</b></li><li>Zakat Calculation Details will appears. You can see the details of Current Liabilities, Current Assets and the Amount.</li><li>All the calculation summary such as<i> </i>Zakat Rate, Muslim OwnershipShare Nisab, Net Current Asset, Total Net Asset Due For Zakat, Zakat Payable for The Year and Monthly Zakat <i>Payable</i> will be display under <b>Zakat Calculation Summary.</b><br></li></ol><!--[if gte mso 9]><xml>\n <w:WordDocument>\n  <w:View>Normal</w:View>\n  <w:Zoom>0</w:Zoom>\n  <w:TrackMoves/>\n  <w:TrackFormatting/>\n  <w:PunctuationKerning/>\n  <w:ValidateAgainstSchemas/>\n  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>\n  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>\n  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>\n  <w:DoNotPromoteQF/>\n  <w:LidThemeOther>PT-BR</w:LidThemeOther>\n  <w:LidThemeAsian>ZH-CN</w:LidThemeAsian>\n  <w:LidThemeComplexScript>AR-SA</w:LidThemeComplexScript>\n  <w:Compatibility>\n   <w:BreakWrappedTables/>\n   <w:SnapToGridInCell/>\n   <w:WrapTextWithPunct/>\n   <w:UseAsianBreakRules/>\n   <w:DontGrowAutofit/>\n   <w:SplitPgBreakAndParaMark/>\n   <w:EnableOpenTypeKerning/>\n   <w:DontFlipMirrorIndents/>\n   <w:OverrideTableStyleHps/>\n   <w:UseFELayout/>\n  </w:Compatibility>\n  <m:mathPr>\n   <m:mathFont m:val=\"Cambria Math\"/>\n   <m:brkBin m:val=\"before\"/>\n   <m:brkBinSub m:val=\"&#45;-\"/>\n   <m:smallFrac m:val=\"off\"/>\n   <m:dispDef/>\n   <m:lMargin m:val=\"0\"/>\n   <m:rMargin m:val=\"0\"/>\n   <m:defJc m:val=\"centerGroup\"/>\n   <m:wrapIndent m:val=\"1440\"/>\n   <m:intLim m:val=\"subSup\"/>\n   <m:naryLim m:val=\"undOvr\"/>\n  </m:mathPr></w:WordDocument>\n</xml><![endif]--><!--[if gte mso 9]><xml>\n <w:LatentStyles DefLockedState=\"false\" DefUnhideWhenUsed=\"false\"\n  DefSemiHidden=\"false\" DefQFormat=\"false\" DefPriority=\"99\"\n  LatentStyleCount=\"371\">\n  <w:LsdException Locked=\"false\" Priority=\"0\" QFormat=\"true\" Name=\"Normal\"/>\n  <w:LsdException Locked=\"false\" Priority=\"9\" QFormat=\"true\" Name=\"heading 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"9\" SemiHidden=\"true\"\n   UnhideWhenUsed=\"true\" QFormat=\"true\" Name=\"heading 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"9\" SemiHidden=\"true\"\n   UnhideWhenUsed=\"true\" QFormat=\"true\" Name=\"heading 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"9\" SemiHidden=\"true\"\n   UnhideWhenUsed=\"true\" QFormat=\"true\" Name=\"heading 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"9\" SemiHidden=\"true\"\n   UnhideWhenUsed=\"true\" QFormat=\"true\" Name=\"heading 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"9\" SemiHidden=\"true\"\n   UnhideWhenUsed=\"true\" QFormat=\"true\" Name=\"heading 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"9\" SemiHidden=\"true\"\n   UnhideWhenUsed=\"true\" QFormat=\"true\" Name=\"heading 7\"/>\n  <w:LsdException Locked=\"false\" Priority=\"9\" SemiHidden=\"true\"\n   UnhideWhenUsed=\"true\" QFormat=\"true\" Name=\"heading 8\"/>\n  <w:LsdException Locked=\"false\" Priority=\"9\" SemiHidden=\"true\"\n   UnhideWhenUsed=\"true\" QFormat=\"true\" Name=\"heading 9\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"index 1\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"index 2\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"index 3\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"index 4\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"index 5\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"index 6\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"index 7\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"index 8\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"index 9\"/>\n  <w:LsdException Locked=\"false\" Priority=\"39\" SemiHidden=\"true\"\n   UnhideWhenUsed=\"true\" Name=\"toc 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"39\" SemiHidden=\"true\"\n   UnhideWhenUsed=\"true\" Name=\"toc 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"39\" SemiHidden=\"true\"\n   UnhideWhenUsed=\"true\" Name=\"toc 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"39\" SemiHidden=\"true\"\n   UnhideWhenUsed=\"true\" Name=\"toc 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"39\" SemiHidden=\"true\"\n   UnhideWhenUsed=\"true\" Name=\"toc 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"39\" SemiHidden=\"true\"\n   UnhideWhenUsed=\"true\" Name=\"toc 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"39\" SemiHidden=\"true\"\n   UnhideWhenUsed=\"true\" Name=\"toc 7\"/>\n  <w:LsdException Locked=\"false\" Priority=\"39\" SemiHidden=\"true\"\n   UnhideWhenUsed=\"true\" Name=\"toc 8\"/>\n  <w:LsdException Locked=\"false\" Priority=\"39\" SemiHidden=\"true\"\n   UnhideWhenUsed=\"true\" Name=\"toc 9\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Normal Indent\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"footnote text\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"annotation text\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"header\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"footer\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"index heading\"/>\n  <w:LsdException Locked=\"false\" Priority=\"35\" SemiHidden=\"true\"\n   UnhideWhenUsed=\"true\" QFormat=\"true\" Name=\"caption\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"table of figures\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"envelope address\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"envelope return\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"footnote reference\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"annotation reference\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"line number\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"page number\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"endnote reference\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"endnote text\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"table of authorities\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"macro\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"toa heading\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"List\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"List Bullet\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"List Number\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"List 2\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"List 3\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"List 4\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"List 5\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"List Bullet 2\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"List Bullet 3\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"List Bullet 4\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"List Bullet 5\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"List Number 2\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"List Number 3\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"List Number 4\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"List Number 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"10\" QFormat=\"true\" Name=\"Title\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Closing\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Signature\"/>\n  <w:LsdException Locked=\"false\" Priority=\"1\" SemiHidden=\"true\"\n   UnhideWhenUsed=\"true\" Name=\"Default Paragraph Font\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Body Text\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Body Text Indent\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"List Continue\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"List Continue 2\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"List Continue 3\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"List Continue 4\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"List Continue 5\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Message Header\"/>\n  <w:LsdException Locked=\"false\" Priority=\"11\" QFormat=\"true\" Name=\"Subtitle\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Salutation\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Date\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Body Text First Indent\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Body Text First Indent 2\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Note Heading\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Body Text 2\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Body Text 3\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Body Text Indent 2\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Body Text Indent 3\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Block Text\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Hyperlink\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"FollowedHyperlink\"/>\n  <w:LsdException Locked=\"false\" Priority=\"22\" QFormat=\"true\" Name=\"Strong\"/>\n  <w:LsdException Locked=\"false\" Priority=\"20\" QFormat=\"true\" Name=\"Emphasis\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Document Map\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Plain Text\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"E-mail Signature\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"HTML Top of Form\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"HTML Bottom of Form\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Normal (Web)\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"HTML Acronym\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"HTML Address\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"HTML Cite\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"HTML Code\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"HTML Definition\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"HTML Keyboard\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"HTML Preformatted\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"HTML Sample\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"HTML Typewriter\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"HTML Variable\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Normal Table\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"annotation subject\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"No List\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Outline List 1\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Outline List 2\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Outline List 3\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Simple 1\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Simple 2\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Simple 3\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Classic 1\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Classic 2\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Classic 3\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Classic 4\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Colorful 1\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Colorful 2\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Colorful 3\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Columns 1\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Columns 2\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Columns 3\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Columns 4\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Columns 5\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Grid 1\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Grid 2\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Grid 3\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Grid 4\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Grid 5\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Grid 6\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Grid 7\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Grid 8\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table List 1\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table List 2\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table List 3\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table List 4\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table List 5\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table List 6\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table List 7\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table List 8\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table 3D effects 1\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table 3D effects 2\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table 3D effects 3\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Contemporary\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Elegant\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Professional\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Subtle 1\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Subtle 2\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Web 1\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Web 2\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Web 3\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Balloon Text\"/>\n  <w:LsdException Locked=\"false\" Priority=\"39\" Name=\"Table Grid\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" UnhideWhenUsed=\"true\"\n   Name=\"Table Theme\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" Name=\"Placeholder Text\"/>\n  <w:LsdException Locked=\"false\" Priority=\"1\" QFormat=\"true\" Name=\"No Spacing\"/>\n  <w:LsdException Locked=\"false\" Priority=\"60\" Name=\"Light Shading\"/>\n  <w:LsdException Locked=\"false\" Priority=\"61\" Name=\"Light List\"/>\n  <w:LsdException Locked=\"false\" Priority=\"62\" Name=\"Light Grid\"/>\n  <w:LsdException Locked=\"false\" Priority=\"63\" Name=\"Medium Shading 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"64\" Name=\"Medium Shading 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"65\" Name=\"Medium List 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"66\" Name=\"Medium List 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"67\" Name=\"Medium Grid 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"68\" Name=\"Medium Grid 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"69\" Name=\"Medium Grid 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"70\" Name=\"Dark List\"/>\n  <w:LsdException Locked=\"false\" Priority=\"71\" Name=\"Colorful Shading\"/>\n  <w:LsdException Locked=\"false\" Priority=\"72\" Name=\"Colorful List\"/>\n  <w:LsdException Locked=\"false\" Priority=\"73\" Name=\"Colorful Grid\"/>\n  <w:LsdException Locked=\"false\" Priority=\"60\" Name=\"Light Shading Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"61\" Name=\"Light List Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"62\" Name=\"Light Grid Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"63\" Name=\"Medium Shading 1 Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"64\" Name=\"Medium Shading 2 Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"65\" Name=\"Medium List 1 Accent 1\"/>\n  <w:LsdException Locked=\"false\" SemiHidden=\"true\" Name=\"Revision\"/>\n  <w:LsdException Locked=\"false\" Priority=\"34\" QFormat=\"true\"\n   Name=\"List Paragraph\"/>\n  <w:LsdException Locked=\"false\" Priority=\"29\" QFormat=\"true\" Name=\"Quote\"/>\n  <w:LsdException Locked=\"false\" Priority=\"30\" QFormat=\"true\"\n   Name=\"Intense Quote\"/>\n  <w:LsdException Locked=\"false\" Priority=\"66\" Name=\"Medium List 2 Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"67\" Name=\"Medium Grid 1 Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"68\" Name=\"Medium Grid 2 Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"69\" Name=\"Medium Grid 3 Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"70\" Name=\"Dark List Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"71\" Name=\"Colorful Shading Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"72\" Name=\"Colorful List Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"73\" Name=\"Colorful Grid Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"60\" Name=\"Light Shading Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"61\" Name=\"Light List Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"62\" Name=\"Light Grid Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"63\" Name=\"Medium Shading 1 Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"64\" Name=\"Medium Shading 2 Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"65\" Name=\"Medium List 1 Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"66\" Name=\"Medium List 2 Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"67\" Name=\"Medium Grid 1 Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"68\" Name=\"Medium Grid 2 Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"69\" Name=\"Medium Grid 3 Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"70\" Name=\"Dark List Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"71\" Name=\"Colorful Shading Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"72\" Name=\"Colorful List Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"73\" Name=\"Colorful Grid Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"60\" Name=\"Light Shading Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"61\" Name=\"Light List Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"62\" Name=\"Light Grid Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"63\" Name=\"Medium Shading 1 Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"64\" Name=\"Medium Shading 2 Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"65\" Name=\"Medium List 1 Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"66\" Name=\"Medium List 2 Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"67\" Name=\"Medium Grid 1 Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"68\" Name=\"Medium Grid 2 Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"69\" Name=\"Medium Grid 3 Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"70\" Name=\"Dark List Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"71\" Name=\"Colorful Shading Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"72\" Name=\"Colorful List Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"73\" Name=\"Colorful Grid Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"60\" Name=\"Light Shading Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"61\" Name=\"Light List Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"62\" Name=\"Light Grid Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"63\" Name=\"Medium Shading 1 Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"64\" Name=\"Medium Shading 2 Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"65\" Name=\"Medium List 1 Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"66\" Name=\"Medium List 2 Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"67\" Name=\"Medium Grid 1 Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"68\" Name=\"Medium Grid 2 Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"69\" Name=\"Medium Grid 3 Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"70\" Name=\"Dark List Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"71\" Name=\"Colorful Shading Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"72\" Name=\"Colorful List Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"73\" Name=\"Colorful Grid Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"60\" Name=\"Light Shading Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"61\" Name=\"Light List Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"62\" Name=\"Light Grid Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"63\" Name=\"Medium Shading 1 Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"64\" Name=\"Medium Shading 2 Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"65\" Name=\"Medium List 1 Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"66\" Name=\"Medium List 2 Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"67\" Name=\"Medium Grid 1 Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"68\" Name=\"Medium Grid 2 Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"69\" Name=\"Medium Grid 3 Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"70\" Name=\"Dark List Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"71\" Name=\"Colorful Shading Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"72\" Name=\"Colorful List Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"73\" Name=\"Colorful Grid Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"60\" Name=\"Light Shading Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"61\" Name=\"Light List Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"62\" Name=\"Light Grid Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"63\" Name=\"Medium Shading 1 Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"64\" Name=\"Medium Shading 2 Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"65\" Name=\"Medium List 1 Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"66\" Name=\"Medium List 2 Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"67\" Name=\"Medium Grid 1 Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"68\" Name=\"Medium Grid 2 Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"69\" Name=\"Medium Grid 3 Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"70\" Name=\"Dark List Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"71\" Name=\"Colorful Shading Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"72\" Name=\"Colorful List Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"73\" Name=\"Colorful Grid Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"19\" QFormat=\"true\"\n   Name=\"Subtle Emphasis\"/>\n  <w:LsdException Locked=\"false\" Priority=\"21\" QFormat=\"true\"\n   Name=\"Intense Emphasis\"/>\n  <w:LsdException Locked=\"false\" Priority=\"31\" QFormat=\"true\"\n   Name=\"Subtle Reference\"/>\n  <w:LsdException Locked=\"false\" Priority=\"32\" QFormat=\"true\"\n   Name=\"Intense Reference\"/>\n  <w:LsdException Locked=\"false\" Priority=\"33\" QFormat=\"true\" Name=\"Book Title\"/>\n  <w:LsdException Locked=\"false\" Priority=\"37\" SemiHidden=\"true\"\n   UnhideWhenUsed=\"true\" Name=\"Bibliography\"/>\n  <w:LsdException Locked=\"false\" Priority=\"39\" SemiHidden=\"true\"\n   UnhideWhenUsed=\"true\" QFormat=\"true\" Name=\"TOC Heading\"/>\n  <w:LsdException Locked=\"false\" Priority=\"41\" Name=\"Plain Table 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"42\" Name=\"Plain Table 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"43\" Name=\"Plain Table 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"44\" Name=\"Plain Table 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"45\" Name=\"Plain Table 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"40\" Name=\"Grid Table Light\"/>\n  <w:LsdException Locked=\"false\" Priority=\"46\" Name=\"Grid Table 1 Light\"/>\n  <w:LsdException Locked=\"false\" Priority=\"47\" Name=\"Grid Table 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"48\" Name=\"Grid Table 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"49\" Name=\"Grid Table 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"50\" Name=\"Grid Table 5 Dark\"/>\n  <w:LsdException Locked=\"false\" Priority=\"51\" Name=\"Grid Table 6 Colorful\"/>\n  <w:LsdException Locked=\"false\" Priority=\"52\" Name=\"Grid Table 7 Colorful\"/>\n  <w:LsdException Locked=\"false\" Priority=\"46\"\n   Name=\"Grid Table 1 Light Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"47\" Name=\"Grid Table 2 Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"48\" Name=\"Grid Table 3 Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"49\" Name=\"Grid Table 4 Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"50\" Name=\"Grid Table 5 Dark Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"51\"\n   Name=\"Grid Table 6 Colorful Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"52\"\n   Name=\"Grid Table 7 Colorful Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"46\"\n   Name=\"Grid Table 1 Light Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"47\" Name=\"Grid Table 2 Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"48\" Name=\"Grid Table 3 Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"49\" Name=\"Grid Table 4 Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"50\" Name=\"Grid Table 5 Dark Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"51\"\n   Name=\"Grid Table 6 Colorful Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"52\"\n   Name=\"Grid Table 7 Colorful Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"46\"\n   Name=\"Grid Table 1 Light Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"47\" Name=\"Grid Table 2 Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"48\" Name=\"Grid Table 3 Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"49\" Name=\"Grid Table 4 Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"50\" Name=\"Grid Table 5 Dark Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"51\"\n   Name=\"Grid Table 6 Colorful Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"52\"\n   Name=\"Grid Table 7 Colorful Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"46\"\n   Name=\"Grid Table 1 Light Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"47\" Name=\"Grid Table 2 Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"48\" Name=\"Grid Table 3 Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"49\" Name=\"Grid Table 4 Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"50\" Name=\"Grid Table 5 Dark Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"51\"\n   Name=\"Grid Table 6 Colorful Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"52\"\n   Name=\"Grid Table 7 Colorful Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"46\"\n   Name=\"Grid Table 1 Light Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"47\" Name=\"Grid Table 2 Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"48\" Name=\"Grid Table 3 Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"49\" Name=\"Grid Table 4 Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"50\" Name=\"Grid Table 5 Dark Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"51\"\n   Name=\"Grid Table 6 Colorful Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"52\"\n   Name=\"Grid Table 7 Colorful Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"46\"\n   Name=\"Grid Table 1 Light Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"47\" Name=\"Grid Table 2 Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"48\" Name=\"Grid Table 3 Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"49\" Name=\"Grid Table 4 Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"50\" Name=\"Grid Table 5 Dark Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"51\"\n   Name=\"Grid Table 6 Colorful Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"52\"\n   Name=\"Grid Table 7 Colorful Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"46\" Name=\"List Table 1 Light\"/>\n  <w:LsdException Locked=\"false\" Priority=\"47\" Name=\"List Table 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"48\" Name=\"List Table 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"49\" Name=\"List Table 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"50\" Name=\"List Table 5 Dark\"/>\n  <w:LsdException Locked=\"false\" Priority=\"51\" Name=\"List Table 6 Colorful\"/>\n  <w:LsdException Locked=\"false\" Priority=\"52\" Name=\"List Table 7 Colorful\"/>\n  <w:LsdException Locked=\"false\" Priority=\"46\"\n   Name=\"List Table 1 Light Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"47\" Name=\"List Table 2 Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"48\" Name=\"List Table 3 Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"49\" Name=\"List Table 4 Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"50\" Name=\"List Table 5 Dark Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"51\"\n   Name=\"List Table 6 Colorful Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"52\"\n   Name=\"List Table 7 Colorful Accent 1\"/>\n  <w:LsdException Locked=\"false\" Priority=\"46\"\n   Name=\"List Table 1 Light Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"47\" Name=\"List Table 2 Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"48\" Name=\"List Table 3 Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"49\" Name=\"List Table 4 Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"50\" Name=\"List Table 5 Dark Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"51\"\n   Name=\"List Table 6 Colorful Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"52\"\n   Name=\"List Table 7 Colorful Accent 2\"/>\n  <w:LsdException Locked=\"false\" Priority=\"46\"\n   Name=\"List Table 1 Light Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"47\" Name=\"List Table 2 Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"48\" Name=\"List Table 3 Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"49\" Name=\"List Table 4 Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"50\" Name=\"List Table 5 Dark Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"51\"\n   Name=\"List Table 6 Colorful Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"52\"\n   Name=\"List Table 7 Colorful Accent 3\"/>\n  <w:LsdException Locked=\"false\" Priority=\"46\"\n   Name=\"List Table 1 Light Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"47\" Name=\"List Table 2 Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"48\" Name=\"List Table 3 Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"49\" Name=\"List Table 4 Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"50\" Name=\"List Table 5 Dark Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"51\"\n   Name=\"List Table 6 Colorful Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"52\"\n   Name=\"List Table 7 Colorful Accent 4\"/>\n  <w:LsdException Locked=\"false\" Priority=\"46\"\n   Name=\"List Table 1 Light Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"47\" Name=\"List Table 2 Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"48\" Name=\"List Table 3 Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"49\" Name=\"List Table 4 Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"50\" Name=\"List Table 5 Dark Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"51\"\n   Name=\"List Table 6 Colorful Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"52\"\n   Name=\"List Table 7 Colorful Accent 5\"/>\n  <w:LsdException Locked=\"false\" Priority=\"46\"\n   Name=\"List Table 1 Light Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"47\" Name=\"List Table 2 Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"48\" Name=\"List Table 3 Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"49\" Name=\"List Table 4 Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"50\" Name=\"List Table 5 Dark Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"51\"\n   Name=\"List Table 6 Colorful Accent 6\"/>\n  <w:LsdException Locked=\"false\" Priority=\"52\"\n   Name=\"List Table 7 Colorful Accent 6\"/>\n </w:LatentStyles>\n</xml><![endif]--><!--[if gte mso 10]>\n<style>\n /* Style Definitions */\n table.MsoNormalTable\n	{mso-style-name:\"Table Normal\";\n	mso-tstyle-rowband-size:0;\n	mso-tstyle-colband-size:0;\n	mso-style-noshow:yes;\n	mso-style-priority:99;\n	mso-style-parent:\"\";\n	mso-padding-alt:0in 5.4pt 0in 5.4pt;\n	mso-para-margin-top:0in;\n	mso-para-margin-right:0in;\n	mso-para-margin-bottom:8.0pt;\n	mso-para-margin-left:0in;\n	line-height:107%;\n	mso-pagination:widow-orphan;\n	font-size:11.0pt;\n	font-family:\"Calibri\",sans-serif;\n	mso-ascii-font-family:Calibri;\n	mso-ascii-theme-font:minor-latin;\n	mso-hansi-font-family:Calibri;\n	mso-hansi-theme-font:minor-latin;\n	mso-fareast-language:JA;}\n</style>\n<![endif]-->'),(101,297,'en','How To Setup Wakaf Calculation','<ol><li>Go to Zakat &amp; Wakaf &gt; Transaction &gt; Wakaf Calculation. The Wakaf Calculation window appears.</li><li>Select Wakif from the drop down list.</li><li>Select the Wakaf Institution from the drop down list.</li><li>Select the Allocation Basis. You can choose the options either by<i> Lump Sum Amount, Percentage of Sale, Percentage Of Wakaf Acrual and Percentage of Profit.</i></li></ol><p><u><b>Lum Sum Amount</b></u></p>In this section, you can decide how much amount to donate as it’s an open account.<b><br></b><ol><li>Enter the <b>Amount.</b></li><li>To set the beneficiaries, click the + button and select the beneficiaries category.</li><li>Enter the Description and Percentage.</li><li>Amount will be automatically calculated when you have entered the percentage.</li><li>Then, Click Save.</li><li>If you wish to add more beneficiaries, click + button and repeat the same steps.</li><li>Then, click Submit.<br></li></ol><p><u><b>Percentage Of Sale</b></u></p><p>In this section, you can choose from your sales account and decide the percentage amount to donate.<br></p><ol><li>Enter the Period, From Period and To Period details.</li><li>Select the Sales Account Number from the list.</li><li>Enter the Percentage.</li><li>Sales Amount, Amount All and Amount Allocated will be automatically calculated.</li><li>To set the beneficiaries, click the + button and select the beneficiaries category.</li><li>Enter Description and Percentage.</li><li>Amount will be automatically calculated when you have entered the percentage.</li><li>Click Save.</li><li>If you wish to add more beneficiaries, click + button and repeat the same steps.</li></ol><p><u><b>Percentage Of Wakaf Acrual</b></u></p><p><u><b><br></b></u></p><p><u><b>Percentage Of Profit</b></u></p><p><u><b></b></u><br></p><p><br></p>'),(102,167,'en','How To Print Trial Balance','<ol><li>Go to General Ledger &gt; Reports &gt; Trial Balance</li><li>Select Year and Period.</li><li>Then, click Generate Report button.</li><li>All the details of Trial Balance for selected period will be listed.</li><li>To print out the trial balance report, click Print.</li></ol>'),(103,178,'en','How To Print Account Balance Summary','<ol><li>Go to General Ledger &gt; Reports &gt; Account Balance Summary</li><li>Select Year and Period.</li><li>Select the Account Number from the list.</li><li>Then, click Generate Report button at the top of header.</li><li>All the summary details will be listed.</li><li>To print out the summary report, click Print.</li></ol><br>'),(104,176,'en','How To Print Trial Balance Fiscal Year','<ol><li>Go to General Ledger &gt; Report &gt; Trial Balance Fiscal Year</li><li>&nbsp;Then, click Generate Report button.</li><li>Trial Balance for Fiscal for selected year will be listed.</li><li>&nbsp;To see the account details, click the link at Account Number field.</li><li>You will be directed to the pages where account details information is listed in Journal List.</li><li>To print out the report, click Print.</li></ol><br>'),(105,166,'en','How To Print Statement Of Financial Position','<ol><li>Go to General Ledger &gt; Reports &gt; Statement Of Financial Position</li><li>Select Year and Period.</li><li>Then, click Generate Report button.</li><li>All details for selected year and period will be listed.</li><li>To print out the report, click Print</li></ol><br>'),(106,189,'en','How To Print Statement Of Comprehensive Income','<ol><li>Go to General Ledger &gt; Reports &gt; Statement Of Comprehensive Income<br></li><li>Select Year of Income Statement</li><li>Then, click Generate Report button.</li><li>All details on selected year will be listed</li><li>You are allow to see the details on selected account details.</li><li>Click the link of Account Code. You will be directed to the pages where account details will be listed in Journal List.</li><li>To see more details on Journal Details, click the link of Journal No. </li><li>You will be directed to the pages to the pages where journal details is listed</li><li>To print out the report, click Print</li></ol><br>'),(107,175,'en','How To Print Unpost Journal List','<ol><li>Go to <b>General Ledger &gt; Reports &gt; Unpost Journal List</b></li><li>Select<b> Year </b>and <b>Period</b>, then click <b>Submit</b> button.</li><li>All unposted journal will be listed.</li><li>To see more details on each unposted journal, click the link of <b>Journal No. </b></li><li>You will be directed to the pages where account details will be listed in Journal Details.</li></ol><br>'),(108,198,'en','How To Print Budget List','<ol><li>Go to General Ledger &gt; Reports &gt; Budget List</li><li>Select Year</li><li>Click the Generate Report button</li><li>All the total of budget will be listed for each period</li></ol><br>'),(109,283,'en','How To Print Zakat Summary','<ol><li>Go to Zakat &amp; Wakaf &gt; Reports &gt; Zakat Summary</li><li>Select from the Zakat Summary List, which list need to be print out.</li><li>Then, click the Print button.</li><li>You will be direct to the report page.</li></ol>'),(110,282,'en','Setup Zakat Nisab','<div><br></div><div><ol><li><span style=\"line-height: 30px;\">Go to Zakat &amp; Wakaf &gt; Setup &gt; Zakat Nisab. The Zakat Nisab window appears.</span><br></li><li><span style=\"line-height: 30px;\">Select Zakat Centre from the drop down list.</span><br></li><li><span style=\"line-height: 30px;\">Select Year.</span><br></li><li><span style=\"line-height: 30px;\">Enter the Nisab for that current year.</span><br></li><li><span style=\"line-height: 30px;\">Click Submit button to save.</span><br></li></ol></div>'),(111,274,'en','Setup Zakat Nisab Group','<ul><li><span style=\"line-height: 30px;\">Go to Zakat &amp; Wakaf &gt; Setup &gt; Zakat Nisab Group. The Zakat Nisab Group window appears.</span><br></li><li><span style=\"line-height: 30px;\">Enter the name of Zakat Nisab Group.</span><br></li><li><span style=\"line-height: 30px;\">Enter Description.</span><br></li><li><span style=\"line-height: 30px;\">Select Parent from the drop down list.</span><br></li><li><span style=\"line-height: 30px;\">Insert Sequence Number.</span><br></li><li><span style=\"line-height: 30px;\">Click Submit button to save.</span><br></li></ul>'),(112,280,'en','Setup Zakat Centre','<ul><li><span style=\"line-height: 30px;\">Go to Zakat &amp; Wakaf &gt; Setup &gt; Zakat Centre</span></li><li><span style=\"line-height: 30px;\">Enter all information such as Short Name, Name, Address, City, Postcode, Country, State, Phone No, Fax No, Email and Website.</span></li><li><span style=\"line-height: 30px;\">Once completed, click Submit button to save.</span></li></ul>'),(113,41,'en','How To Setup Location Master','<b style=\"mso-bidi-font-weight:normal\"><u><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\">Add New Location Master<br></span></u></b><ol><li><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\">Go\nTo <b>Inventory Control</b> </span><span style=\"font-family:Wingdings;mso-ascii-font-family:Calibri;mso-ascii-theme-font:\nminor-latin;mso-hansi-font-family:Calibri;mso-hansi-theme-font:minor-latin;\nmso-char-type:symbol;mso-symbol-font-family:Wingdings\"><span style=\"mso-char-type:\nsymbol;mso-symbol-font-family:Wingdings\"></span></span><span style=\"mso-bidi-font-family:\n&quot;Times New Roman&quot;\"><b style=\"mso-bidi-font-weight:normal\">&gt; Setup &gt; Location Master</b>. The Location Master List window appears.</span></li><li><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\">Click on <b style=\"mso-bidi-font-weight:\nnormal\">+<i style=\"mso-bidi-font-style:normal\"> </i>button</b> on the top\nright-side of the page to add <b style=\"mso-bidi-font-weight:normal\">New Location Master.</b></span>\n\n</li><li><span style=\"font-family:\nWingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings\"><span style=\"mso-list:Ignore\"><span style=\"font:7.0pt &quot;Times New Roman&quot;\"></span></span></span><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\">You will be directed to the page\nwhere you can enter all the required information. </span></li><li>\n\n<span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\">After data entry, click <b style=\"mso-bidi-font-weight:normal\">Submit </b>button to save.</span></li></ol><p class=\"MsoNormal\" style=\"text-align:justify;text-justify:inter-ideograph;\nline-height:115%\"><b style=\"mso-bidi-font-weight:normal\"><u><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\">View Location Master<br></span></u></b></p>\n\n<ol><li><span style=\"font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:\nWingdings\"><span style=\"mso-list:Ignore\"><span style=\"font:7.0pt &quot;Times New Roman&quot;\"></span></span></span><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\">Go\nTo<b> Inventory Control</b> </span><span style=\"font-family:Wingdings;mso-ascii-font-family:Calibri;mso-ascii-theme-font:\nminor-latin;mso-hansi-font-family:Calibri;mso-hansi-theme-font:minor-latin;\nmso-char-type:symbol;mso-symbol-font-family:Wingdings\"><span style=\"mso-char-type:\nsymbol;mso-symbol-font-family:Wingdings\"><b>&gt; </b></span></span><b style=\"mso-bidi-font-weight:\nnormal\"><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\">Setup</span></b><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\"><b> &gt; Location Master.</b>The Location Master List window appears.</span></li><li><span style=\"font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:\nWingdings\"><span style=\"mso-list:Ignore\"><span style=\"font:7.0pt &quot;Times New Roman&quot;\"></span></span></span><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\">In\nthe Search field, search the location by entering the location code or name.<br></span></li><li><span style=\"font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:\nWingdings\"><span style=\"mso-list:Ignore\"><span style=\"font:7.0pt &quot;Times New Roman&quot;\"></span></span></span><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\">You\ncan choose the number of entries of location to be displayed. </span></li></ol>\n\n<p class=\"MsoNormal\" style=\"text-align:justify;text-justify:inter-ideograph;\nline-height:150%\"><b style=\"mso-bidi-font-weight:normal\"><u><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\">Edit Location Master<br></span></u></b></p>\n\n<ol><li><span style=\"font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:\nWingdings\"><span style=\"mso-list:Ignore\"><span style=\"font:7.0pt &quot;Times New Roman&quot;\"></span></span></span><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\">Go\nTo <b>Inventory Control</b> </span><span style=\"font-family:Wingdings;mso-ascii-font-family:Calibri;mso-ascii-theme-font:\nminor-latin;mso-hansi-font-family:Calibri;mso-hansi-theme-font:minor-latin;\nmso-char-type:symbol;mso-symbol-font-family:Wingdings\"><span style=\"mso-char-type:\nsymbol;mso-symbol-font-family:Wingdings\">&gt; </span></span><b style=\"mso-bidi-font-weight:\nnormal\"><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\">Setup</span></b><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\"> <b>&gt; Location Master</b>.The Location Master List window appears.</span></li><li><span style=\"font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:\nWingdings\"><span style=\"mso-list:Ignore\"><span style=\"font:7.0pt &quot;Times New Roman&quot;\"></span></span></span><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\">Click the <b>Edit button </b>that situated in the same of location row. The Edit dialog box will appear.</span></li><li><span style=\"font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:\nWingdings\"><span style=\"mso-list:Ignore\"><span style=\"font:7.0pt &quot;Times New Roman&quot;\"></span></span></span><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\">Click\n<b style=\"mso-bidi-font-weight:normal\">Continue</b>, the <b>Location Master</b> window\nappears. Edit the relevant information. </span></li><li><span style=\"font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:\nWingdings\"><span style=\"mso-list:Ignore\"><span style=\"font:7.0pt &quot;Times New Roman&quot;\"></span></span></span><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\">Once\ncompleted, click <b style=\"mso-bidi-font-weight:normal\">Submit </b>button to\nsave.</span></li></ol>\n\n<p class=\"MsoNormal\" style=\"text-align:justify;text-justify:inter-ideograph;\nline-height:150%\"><b style=\"mso-bidi-font-weight:normal\"><u><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\">Remove Location Master<br></span></u></b></p>\n\n<ol><li><span style=\"font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:\nWingdings\"><span style=\"mso-list:Ignore\"><span style=\"font:7.0pt &quot;Times New Roman&quot;\"></span></span></span><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\">Go\nTo <b>Inventory Control</b> </span><span style=\"font-family:Wingdings;mso-ascii-font-family:Calibri;mso-ascii-theme-font:\nminor-latin;mso-hansi-font-family:Calibri;mso-hansi-theme-font:minor-latin;\nmso-char-type:symbol;mso-symbol-font-family:Wingdings\"><span style=\"mso-char-type:\nsymbol;mso-symbol-font-family:Wingdings\"><b>&gt; </b></span></span><b style=\"mso-bidi-font-weight:\nnormal\"><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\">Setup</span></b><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\"><b> &gt; Location Master.</b><b style=\"mso-bidi-font-weight:\nnormal\"> </b>The Location Master List window appears.</span></li><li><span style=\"font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:\nWingdings\"><span style=\"mso-list:Ignore\"><span style=\"font:7.0pt &quot;Times New Roman&quot;\"></span></span></span><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\">To\nremove location from the list, identify the location row.</span></li><li><span style=\"font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:\nWingdings\"><span style=\"mso-list:Ignore\"><span style=\"font:7.0pt &quot;Times New Roman&quot;\"></span></span></span><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\">In\nthe Action field on the right-side of the row, click the <b style=\"mso-bidi-font-weight:\nnormal\">Delete </b>button (image). </span></li><li><span style=\"font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:\nWingdings\"><span style=\"mso-list:Ignore\"><span style=\"font:7.0pt &quot;Times New Roman&quot;\"></span></span></span><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\">Dialog\nbox of deletion confirmation appears, then click the <b style=\"mso-bidi-font-weight:\nnormal\">Delete</b> button.</span></li></ol>'),(114,334,'en','How To Setup Unit Measures','<ol><li>Go to Inventory Control &gt; Setup &gt; Unit Measures. The Unit Of Measure List window appears.</li><li><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\">Click on <b style=\"mso-bidi-font-weight:\nnormal\">+<i style=\"mso-bidi-font-style:normal\"> </i>button</b> on the top\nright-side of the page to add <b style=\"mso-bidi-font-weight:normal\">New Unit of Measure.</b></span></li><li><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\"><span style=\"mso-bidi-font-weight:normal\">Enter Code and Description.</span></span></li><li><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\"><span style=\"mso-bidi-font-weight:normal\">Once entered, click Save button.</span></span></li><li><span style=\"mso-bidi-font-family:&quot;Times New Roman&quot;\"><span style=\"mso-bidi-font-weight:normal\">To delete the list, click the delete button that situated in the same row of the Unit Measure List.</span></span></li></ol>'),(115,230,'en','Sales Debit Note Confirm','<ol><li>Go to Account Receivables <b>&gt;</b> Transaction <b>&gt;</b> Sales Debit Note Confirm. The Sales Debit Note Confirm window appears. </li><li>Select Year and Period and click Submit, the Sales Debit Note List will be displayed.</li><li>To edit the selected Debit Note, click the Debit Note No.</li><li>Note that, you can edit the Item(s) details and charges only.</li><li>If you are satisfied with the Sales Debit Note details and wish to confirm the transaction (entry). </li><li>Tick the box ? on the right-side of each row you want to confirm and click Posting button. </li><li>Note that, once the debit note has been posted, you are unable to re-edit the details.</li></ol><br>'),(116,231,'en','Sales Credit Note','<ol><li>Go to Account Receivables <b>&gt;</b> Transaction<b> &gt; </b>Sales Credit Note. The Add New Sales Credit Note window appears. </li><li>Select the Customer from the drop down list or click the drop down button to Add New Customer.</li><li>Select the Project from the drop down list or click the drop down button to Add New Project.</li><li>Once the Invoice No. has been selected, the customer PO. No will be displayed. </li><li>Enter the Exchange Rate.</li><li>In the Item(s) section, to edit the Type of Tax, click the Tax button. If you want to add new items, click Add New Details button.</li><li>In Charge(s) section, if you wish to Add New Charges and remove the other charges.</li><li>By entering the Item(s) details, you will get the Total Tax Amount and Total Credit Note.</li></ol><br>'),(117,232,'en','Sales Credit Note Confirm','<ol><li>Go to Account Receivables &gt; Transaction &gt; Sales Credit Note Confirm. The Sales Credit Note Confirm window appears. </li><li>Select Year and Period and click Submit, the Sales Credit Note List will be displayed.</li><li>To edit the selected Sales Credit Note, click the Credit Note No.</li><li>You can edit the Item(s) details and charges only.</li><li>If you are satisfied with the Sales Credit Note details and wish to confirm the transaction (entry). </li><li>Tick the box ? on the right-side of each row you want to confirm and click Posting button. </li><li>Note that, once the Sales Credit Note has been posted, you are unable to re-edit the details. </li></ol><br>'),(118,233,'en','Customer Payment Received','<ol><li>Go to Account Receivables &gt; Transaction &gt; Receive Payment. The New Receive Payment window appears.</li><li>Select name of the Payer from the drop down list. Payer is also known as Customer.</li><li>Select name of the Project from the drop down list.</li><li>Select the Bank from the drop down list. Once the bank’s name has been selected, Account No. will appear. </li><li>Select the payment method either Cash or Cheque from the drop down list.</li><li>Enter Reference No. for your reference or office use.</li><li>Out of Balance will be displayed (if applicable). </li><li>Amount Received will be automatically displayed. </li><li>In the List of Invoice(s) field, it will display all the list of invoices.</li><li>Tick the box ? on the right-side of each row to select any particular invoices you want to add Discount and Amount Applied. </li><li>Once the rows have been selected, the summary of Total Discount, Bank Charges, Total Other Charges, Total Received, Total Applied and Out of Balance will appear.</li><li>Click Save button to save it.</li><li>Once completed, click Go to Confirm Page. You will be directed to Sales Payment page.</li></ol>'),(119,234,'en','Customer Payment Received Confirm','<ol><li>Go to Account Receivables &gt; Transaction &gt; Receive Payment Confirm. The Receive Payment Confirm window appears.</li><li>Select Year and Period and click Submit, the Receive Payment Confirm List will be displayed.</li><li>To edit the selected Receive Payment details, click the link of Form No.??</li><li>You can edit the Item(s) details and charges only.</li><li>If you are satisfied with the Receive Payment details and wish to confirm the transaction (entry).</li><li>Tick the box ? on the right-side of each row you want to confirm and click Posting button. </li><li>Note that, once the receive payment has been posted, you are unable to re-edit the details.</li></ol><br>'),(120,316,'en','Cash Sale','<ol><li>Go to Account Receivables &gt; Transaction &gt; Cash Sales. The Cash Sales window appears.</li><li>Enter the Form No. </li><li>Enter the Payment From details. </li><li>Select the Bank from the drop down list.&nbsp; The Account No. will appear. </li><li>Select the Project from the drop down list or click Add New Project button.</li><li>Select the Location from the drop down list or click Add Location button.</li><li>Select the Project from the drop down list or click the drop down button to Add New Project</li><li>Enter the Amount Received and Reference No. for record and office use. </li><li>Select the Payment Method either Cash or Cheque or click Add Payment Method. </li><li>Once all details have been entered and selected, the details of items will be displayed in Item(s) section.</li><li>Tick the box (green button image) to proceed on the right-side of the row and enter all relevant fields.&nbsp; If you want to cancel the item list, click the cancel button (red button image). </li><li>Note that, if you wrongly entered the data, Last Message! Data incorrect or invalid warning will appear. </li><li>If you want to add new item Last Message! Please do save the current details before adding a new one will also appear.</li><li>You can write memo in the Memo section.</li><li>Once completed, Total Allocated, Total Tax Amount, Total Received and Out of Balance will be displayed. </li></ol><br>'),(121,288,'en','Copy Purchase Invoice','In this section, you will create a new purchase invoice. <br><ol><li>Go to <b>Account Payable</b> &gt;<b> Transaction</b> &gt; <b>Copy Purchase Invoice</b></li><li>Select <b>Year</b> and <b>Period</b>, then click Submit button.</li><li>Select the<b> Purchase Invoice</b> that you want to duplicate.</li><li>Then, click <b>Clone Invoice</b> button.</li><li>Please be noted, the <b>Clone Invoice</b> only<b> enabled</b> for<b> Direct Purchase</b> only.</li><li>If normal invoice, Clone Invoice will be disabled.<br></li></ol><br>'),(122,335,'en','Purchase Invoice Confirm','In this section, you will create a new purchase invoice. <br><ol><li>Go to <b>Account Payable &gt; Transaction &gt; Purchase Invoice Confirm</b></li><li>Select<b> Year</b> and <b>Period </b>and click submit to get the <b>Purchase Invoice List.</b></li><li>Select the particular row, to edit the selected <b>Purchase Invoice</b> by click the <b>link of Invoice No.</b></li><li>Select the particular row of invoices that you are <b>confirm to do a Posting</b>. Click <b>Post Purchase Invoice</b> button to proceed the posting. </li><li>Please be noted, once the purchase invoice has been posted, you are unable to reedit the details.</li></ol><br>'),(123,196,'en','Cash Purchase List','<ol><li>Go to<b> Account Payables &gt; Reports &gt; Payment Advise List</b></li><li>Select <b>Date From</b> and <b>Date To.</b></li><li>All payment advise list will be listed.</li><li>To print out all the record, click <b>Print.</b></li><li>To print selected payment advise list record, click the Print button that situated in the same row.</li></ol><br>');


--
-- Table structure for table `ug_relatedtopic`
--

CREATE TABLE `ug_relatedtopic` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `ugID` int(11) NOT NULL,
  `relatedUgID` int(11) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ug_relatedtopic`
--

INSERT INTO `ug_relatedtopic` VALUES (3,1,197),(4,1,278),(5,1,7),(6,304,67),(7,304,50),(8,179,179),(9,224,114),(10,224,157),(11,224,156),(12,224,156),(13,157,224);

--
-- Table structure for table `ug_topic`
--

CREATE TABLE `ug_topic` (
  `fldid` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(8) CHARACTER SET utf8 DEFAULT NULL,
  `name` varchar(30) CHARACTER SET utf8 DEFAULT NULL,
  `parents` varchar(8) CHARACTER SET utf8 DEFAULT '0',
  `module` varchar(8) CHARACTER SET utf8 DEFAULT '0',
  `submenu` smallint(1) DEFAULT '0',
  `urls` varchar(100) CHARACTER SET utf8 DEFAULT '0',
  `urls2` varchar(100) CHARACTER SET utf8 DEFAULT '0',
  `access` varchar(100) CHARACTER SET utf8 DEFAULT NULL,
  `seq` int(11) NOT NULL,
  `display` smallint(1) DEFAULT '1',
  `icons` varchar(32) CHARACTER SET utf8 DEFAULT 'i-film',
  `language` varchar(3) CHARACTER SET utf8 DEFAULT 'EN',
  PRIMARY KEY (`fldid`)
) ENGINE=InnoDB AUTO_INCREMENT=339 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ug_topic`
--

INSERT INTO `ug_topic` VALUES (1,'DB','Dashboard','0','0',0,'home','home','ALL',1,1,'icon-ug-intro.png','EN'),(2,NULL,'CompanyNew','93','0',0,'0','0',NULL,4,1,'i-film','EN'),(5,'STP','AdminSetup','0','10',1,'#','0','ALL',20,1,'iconsetup.png','EN'),(6,'UM','UserMaster','12','9',0,'admin/usermaster','0','ALL',1,1,'icon-usermaster.png','EN'),(7,'UML','UserMasterList','12','9',0,'admin/usermasterlist','0','ALL',2,1,'icon-usermaster.png','EN'),(12,'ADM','Admin','0','9',1,'#','0','ADMIN',500,1,'iconadmin.png','EN'),(14,'MUL','MenuList','12','9',0,'admin/menumasterlist','0','ALL',4,1,'icon-menulist.png','EN'),(41,'MSLM','LocationMaster','91','4',0,'setting/locationlist','0','ALL',70,1,'iconsetupsub.png','EN'),(45,'GLM','GeneralLedger','0','1',1,'#','0','ALL',100,1,'icongeneralledger.png','EN'),(46,'GLSETUP','GLSetup','45','1',1,'#','0','ALL',90,1,'iconsubsetup.png','EN'),(50,'PUR','Purchasing','0','8',1,'#','0','ALL',30,1,'iconpurchasing.png','EN'),(51,'PURSETUP','PurSetup','50','5',1,'#','0','ALL',90,1,'iconsubsetup.png','EN'),(52,'PURRPT','PurReports','50','5',1,'#','0','ALL',70,1,'iconsubreport.png','EN'),(54,'PURSTSPL','Supplierslist','51','5',0,'supplier/supplierList','0','ALL',51,1,'iconsetupsub.png','EN'),(68,'PURSTUMC','PurUOMCONV','51','5',0,'purchasesetting/umconversionlist','0','ALL',56,1,'iconsetupsub.png','EN'),(80,'ARDASHB','AccountReceivables','0','2',1,'#','0','ALL',80,1,'iconaccountreceivables.png','EN'),(81,'APDASHB','AccountPayables','0','3',1,'#','0','ALL',40,1,'iconaccountpayables.png','EN'),(82,'SALES','SalesOrders','0','5',1,'#','0','ALL',70,1,'iconsalesorder.png','EN'),(83,'GST','GST','0','6',1,'#','0','ALL',70,1,'icongoodserviestax.png','EN'),(84,'ZAKAT','Zakat','0','7',1,'#','0','ALL',400,1,'iconzakatwakaf.png','EN'),(85,'APSETUP','APSetup','81','3',1,'#','0','ALL',90,1,'iconsubsetup.png','EN'),(86,'ARSETUP','ARSetup','80','2',1,'#','0','ALL',90,1,'iconsubsetup.png','EN'),(87,'APRPT','APReports','81','3',1,'#','0','ALL',80,1,'iconsubreport.png','EN'),(88,'GLRPT','GLReports','45','1',1,'#','0','ALL',80,1,'iconsubreport.png','EN'),(89,'ARRPT','ARReports','80','2',1,'#','0','ALL',80,1,'iconsubreport.png','EN'),(90,'INVCTRL','InventoryControl','0','4',1,'#','0','ALL',200,1,'iconinventorycontrol.png','EN'),(91,'ICSETUP','IcSetup','90','4',1,'#','0','ALL',90,1,'iconsubsetup.png','EN'),(92,'ICRPT','IcReports','90','4',1,'#','0','ALL',80,1,'iconsubreport.png','EN'),(93,'MSTRCOMP','CompanySetup','5','10',1,'company/setup','0','ALL',5,1,'icon-com-setup.png','EN'),(94,'GLMCAL','Fycalendar','46','1',0,'glsetting/createCalendar','0','ALL',10,1,'iconsetupsub.png','EN'),(95,'GLHOME','GLHome','45','1',0,'userGuide/GeneralLedger','0','ALL',1,1,'iconsubhome.png','EN'),(96,'ARHOME','ArHome','80','2',0,'AccountReceivables','0','ALL',1,1,'iconsubhome.png','EN'),(97,'APHOME','ApHome','81','3',0,'#','0','ALL',1,1,'iconsubhome.png','EN'),(98,'ICHOME','IcHome','90','4',0,'#','0','ALL',1,1,'iconsubhome.png','EN'),(99,'PURHOME','PurHome','50','5',0,'#','0','ALL',1,1,'iconsubhome.png','EN'),(100,'GSTHOME','GstHome','83','6',0,'#','0','ALL',1,1,'iconsubhome.png','EN'),(102,'GSTSETUP','GstSetup','83','6',1,'#','0','ALL',90,1,'iconsubsetup.png','EN'),(103,'GSTRPT','GstReports','83','6',1,'#','0','ALL',80,1,'iconsubreport.png','EN'),(104,'SOHOME','SoHome','82','5',0,'SalesOrder','0','ALL',1,1,'iconsubhome.png','EN'),(105,'SOSETUP','SoSetup','82','5',1,'#','0','ALL',90,1,'iconsubsetup.png','EN'),(106,'SORPT','SoReports','82','5',1,'#','0','ALL',80,1,'iconsubreport.png','EN'),(107,'ZKTHOME','ZktHome','84','7',0,'#','0','ALL',1,1,'iconsubhome.png','EN'),(108,'ZKTSETUP','ZktSetup','84','7',1,'#','0','ALL',90,1,'iconsubsetup.png','EN'),(109,'ZKTRPT','ZktReports','84','7',1,'#','0','ALL',80,1,'iconsubreport.png','EN'),(110,'MSTRCOMP','CompanyList','93','10',0,'setting/companyList','0','ALL',10,1,'iconcompanysetup.png','EN'),(114,'MSTRSUPP','SupplierSetup','85','3',0,'supplier/supplierList','0','ALL',11,1,'iconsetupsub.png','EN'),(124,'APTRANS','ApTransaction','81','3',1,'#','0','ALL',10,1,'iconsubtransaction.png','EN'),(129,'APSUPPAY','SupplierPayment','124','3',0,'aptransaction/payment','0','ALL',50,1,'icon-transaction.png','EN'),(130,'ARSETCUS','CustomerSetup','86','2',0,'customerSetup/customerList','0','ALL',5,1,'iconsetupsub.png','EN'),(131,'ARTRANS','ArTransaction','80','2',1,'#','0','ALL',10,1,'iconsubtransaction.png','EN'),(141,'APPURDN','PurchaseDebitNote','124','3',0,'aptransaction/newDebitNote','0','ALL',23,1,'icon-transaction.png','EN'),(142,'APPURCN','PurchaseCreditNote','124','3',0,'aptransaction/newCreditNote','0','ALL',25,1,'icon-transaction.png','EN'),(143,'ITEMCAT','ItemCategory','91','4',0,'icsetting/itemCategoryList','0','ALL',5,1,'iconsetupsub.png','EN'),(144,'ITEMTYP','ItemType','91','4',0,'icsetting/itemTypeList','0','ALL',10,1,'iconsetupsub.png','EN'),(145,'ITEMSET','ItemSetup','91','4',0,'icsetting/itemList','0','ALL',25,1,'iconsetupsub.png','EN'),(147,'PURTRANS','PurTransaction','50','5',1,'#','0','ALL',5,1,'iconsubtransaction.png','EN'),(148,'ICTRANS','IcTransaction','90','4',1,'#','0','ALL',5,1,'iconsubtransaction.png','EN'),(150,'GLTRANS','GLTransaction','45','1',1,'#','0','ALL',5,1,'iconsubtransaction.png','EN'),(151,'GSTTRANS','GstTransaction','83','6',1,'#','0','ALL',5,1,'iconsubtransaction.png','EN'),(152,'SOTRANS','SoTransaction','82','5',1,'#','0','ALL',5,1,'iconsubtransaction.png','EN'),(153,'SOQUOT','SalesQuotation','152','5',0,'sotransaction/SalesQuotationList','0','ALL',1,1,'icon-transaction.png','EN'),(154,'GLTRJRNL','JlEntry','150','1',0,'gltransaction/journal','0','',5,1,'icon-transaction.png','EN'),(155,'GLMCALL','Fycalendarlist','46','1',0,'glsetting/financialCalendarList','0','ALL',10,1,'iconsetupsub.png','EN'),(156,'PROJECT','ProjectList','5','0',0,'project/projectlist','0','ALL',50,1,'icon-project.png','EN'),(157,'TERM','Terms','5','0',0,'term/termlist','0','ALL',60,1,'icon-term.png','EN'),(158,'GSTMSTR','Gsttable','102','6',0,'tax/taxtableList','0','ALL',1,1,'iconsetupsub.png','EN'),(159,'GSTTYPE','taxclass','102','6',0,'tax/classList','0','ALL',30,1,'iconsetupsub.png','EN'),(160,'GSTGROUP','taxgroup','102','6',0,'tax/groupList','0','ALL',31,1,'iconsetupsub.png','EN'),(161,'GSTTYPE','taxtype','102','6',0,'tax/typeList','0','ALL',32,1,'iconsetupsub.png','EN'),(162,'INVUM','invuom','91','4',0,'icsetting/unitmeasurelist','0','ALL',70,1,'iconsetupsub.png','EN'),(166,'GLRPBS','Financialposition','88','1',0,'glreports/financialposition','0','',20,1,'iconreport.png','EN'),(167,'GLRPTB','Trialbalance','88','1',0,'glreports/trialBalance','0','ALL',5,1,'iconreport.png','EN'),(168,'GLSTCOA','ChartOfAccount','46','1',0,'glsetting/chartOfAcctList','0','ALL',60,1,'iconsetupsub.png','EN'),(172,'GLTRJlRV','JlReverse','150','1',0,'Gltransaction/reverse','0','',30,1,'icon-transaction.png','EN'),(173,'GLTRPOST','JlPosting','150','1',0,'Gltransaction/posting','0','',40,1,'icon-transaction.png','EN'),(174,'GLRPJLPS','Jlpost','88','1',0,'glreports/postedjournal','0','',40,1,'iconreport.png','EN'),(175,'GLRPJLUP','Jlunposted','88','1',0,'glreports/unpostedjournal','0','',35,1,'iconreport.png','EN'),(176,'GLRPTBFC','Trialbalancefc','88','1',0,'glreports/trialbalanceFiscalyear','0','',7,1,'iconreport.png','EN'),(178,'GLRPABSM','Accountbalancesummary','88','1',0,'glreports/accountBalanceSummary','0','',2,1,'iconreport.png','EN'),(179,'EMP','employeeSetup','5','0',0,'employeeSetup/employeeList','0','',7,1,'icon-employee2.png','EN'),(180,'APPURDNL','PurchaseDebitNoteList','87','3',0,'apreports/debitnoteList','0','',26,1,'iconreport.png','EN'),(181,'APPURDNC','PurchaseDebitNoteConfirm','124','3',0,'aptransaction/debitnotePost','0','',24,1,'icon-transaction.png','EN'),(184,'APPURCNL','PurchaseCreditNoteList','87','3',0,'apreports/creditnoteList','0','',27,1,'iconreport.png','EN'),(185,'APPURCNC','PurchaseCreditNoteConfirm','124','3',0,'aptransaction/creditnotePost','0','',27,1,'icon-transaction.png','EN'),(186,'APPAYCFM','SupplierPaymentConfirm','124','3',0,'aptransaction/supplierpaymentList','0','',51,1,'icon-transaction.png','EN'),(187,'APSUPPAY','SupplierPaymentList','87','3',0,'apreports/supplierpaymentlist','0','',52,1,'iconreport.png','EN'),(189,'GLRPPNLM','Profitnloss','88','1',0,'glreports/profitNloss','0','',30,1,'iconreport.png','EN'),(190,'FORM','formSetup','93','0',0,'companySetup/formSetup','0','',30,1,'i-pen ','EN'),(191,'GLSTBDGT','Budget','46','1',0,'glsetting/budgetEntry','0','',20,1,'iconsetupsub.png','EN'),(192,'APOPWI','NewOtherPaymentWithItem','124','3',0,'othersPayment/newPayWithItem','0','',54,1,'i-pen ','EN'),(193,'APPAYICM','NewOtherPaymentWithItemConfirm','124','3',0,'aptransaction/otherpaywithItemPost','0','',55,1,'icon-transaction.png','EN'),(196,'APRPTOPW','OtherPaymentWithItemList','87','3',0,'othersPayment/otherpaywithList','0','',58,1,'iconreport.png','EN'),(198,'GLRPBGLT','Budgetlist','88','1',0,'glreports/budgetList','0','',70,1,'iconreport.png','EN'),(200,'SOTRNWSO','SalesOrder','152','5',0,'sotransaction/salesOrderList','0','',10,1,'icon-transaction.png','EN'),(201,'INVLOCTR','LocationTransfer','148','4',0,'locationtransfer/add','0','',6,1,'i-film','EN'),(203,'INVPURPR','PurchasePricing','51','8',0,'purchasepricing','0','',10,1,'i-pen ','EN'),(204,'INVITEMC','ItemCountAdjust','148','4',0,'itemcountadjust','0','',8,1,'i-pen ','EN'),(207,'CSSYSGEN','SystemGeneral','93','0',0,'systemgeneral/generalSetup','0','',31,1,'i-pen ','EN'),(208,'APRPTSTL','SupplierStatementList','87','3',0,'supplierStatement/supplierList','0','',53,1,'iconreport.png','EN'),(209,'SOTRQOLT','Salesquotelist','106','5',0,'soreport/SalesQuotationList','0','ALL',17,1,'iconreport.png','EN'),(210,'SOSTSLPC','SoSalesprice','105','5',0,'sosetup/SalesPrice','0','',10,1,'iconsetupsub.png','EN'),(211,'SORPPCLT','SrSalesprice','106','5',0,'soreport/SalesPriceList','0','',10,1,'iconreport.png','EN'),(212,'CHAOFACC','ChartOfAccountSetup','93','1',0,'setting/chartOfAccountsSetup','0','',29,1,'i-film','EN'),(216,'SOTRDOLT','DeliveryOrderList','106','5',0,'sotransaction/SalesDOList','0','ALL',19,1,'iconreport.png','EN'),(217,'SOTRDO','DeliveryOrder','152','5',0,'sotransaction/SalesDO','0','ALL',40,1,'icon-transaction.png','EN'),(218,'PURORDER','PurchaseOrder','147','5',0,'PO_Transaction/newPO','0','',6,1,'icon-transaction.png','EN'),(219,'PURORLST','PurchaseOrderList','52','5',0,'purchaseReports/poLIST/rpt','0','',7,1,'iconreport.png','EN'),(220,'PURRCV','PurchaseReceive','147','5',0,'receiveItems/newITemReceived','0','',9,1,'i-pen ','EN'),(224,'APPURINV','PurchaseInvoice','124','3',0,'purchaseinvoice','0','',19,1,'i-pen ','EN'),(225,'APDIRINV','DirectPurchaseInvoice','124','3',0,'Aptransaction/invoices','0','',20,1,'icon-transaction.png','EN'),(227,'ARSALINV','SalesInvoice','131','2',0,'artransaction/salesinvoice','0','',10,1,'icon-transaction.png','EN'),(229,'ARSDBN','SalesDebitNote','131','2',0,'artransaction/newSaleDebitNote','0','',19,1,'icon-transaction.png','EN'),(230,'ARDBNC','SalesDebitNoteConfirm','131','2',0,'artransaction/salesdebitnotePost','0','',20,1,'i-pen ','EN'),(231,'ARSCN','SalesCreditNote','131','2',0,'artransaction/newSaleCreditNote','0','',21,1,'i-pen ','EN'),(232,'ARSCNC','SalesCreditNoteConfirm','131','2',0,'artransaction/salescreditnotePost','0','',22,1,'icon-transaction.png','EN'),(233,'ARRCVP','ReceivePayment','131','2',0,'artransaction/newReceivePayment','0','',23,1,'icon-transaction.png','EN'),(234,'ARRCVPC','ReceivePaymentConfirm','131','2',0,'artransaction/receivedPaymentPost','0','',24,1,'icon-transaction.png','EN'),(235,'ARINVLST','DirectSalesInvoiceList','89','2',0,'salesInvoice/salesInvoiceList','0','',18,1,'iconreport.png','EN'),(236,'ARDBNLST','SalesDebitNoteList','89','2',0,'salesInvoice/salesdebitnotelist','0','',26,1,'iconreport.png','EN'),(237,'ARCDNLST','SalesCreditNoteList','89','2',0,'salesInvoice/salescreditnoteList','0','',27,1,'iconreport.png','EN'),(238,'ARRCVPLS','ReceivePaymentList','89','2',0,'arReports/compRecPaymentList','0','',28,1,'iconreport.png','EN'),(239,'ARDSLINV','NewDirectSaleInvoice','131','2',0,'arTransaction/newDirectSaleInvoice','0','',13,1,'icon-transaction.png','EN'),(240,'AGENTSTP','AgentSetup','5','0',0,'saleagentSetup/agentList','0','',32,1,'icon-agent.png','EN'),(241,'SOTRSOLT','Saleslist','106','5',0,'soreport/SalesOrderList','0','ALL',18,1,'iconreport.png','EN'),(243,'INVPLNRP','InventoryPlanningReport','92','4',0,'inventory/rptstatus','0','',81,1,'iconreport.png','EN'),(244,'INVVALRP','InventoryValuationReport','92','4',0,'inventory/rptinventorysummary','0','',82,1,'iconreport.png','EN'),(245,'INVSTORP','StockCheckReport','92','4',0,'inventory/stocklist','0','',84,1,'iconreport.png','EN'),(248,'INVOUTRP','InvOutstandingGRNReport','92','4',0,'inventory/rptgrnvaluationFromInventory','0','',87,1,'iconreport.png','EN'),(249,'INVMOVRP','InventoryMovementReport','92','4',0,'inventory/rptmovement','0','',88,1,'iconreport.png','EN'),(250,'INVLSTRP','InventoryList','92','4',0,'inventory/rptbylocation','0','',89,1,'iconreport.png','EN'),(251,'PURORDCF','PurchaseOrderConfirm','147','5',0,'po_transaction/poList/post','0','',8,1,'icon-transaction.png','EN'),(252,'PURRCVC','PurchaseReceiveConfirm','147','5',0,'purchasetransaction/receiveItemPosting','0','',10,1,'icon-transaction.png','EN'),(253,'PURRCVLS','PurchaseReceiveList','52','5',0,'receiveItems/receiveItemList2','0','',8,1,'iconreport.png','EN'),(255,'GLSTCURC','Currencyconversion','46','1',0,'glsetting/currencyConvertion','0','',50,1,'iconsetupsub.png','EN'),(256,'ARDRSINV','SaleInvoiceConfirm','131','2',0,'artransaction/directsalesinvPost','0','',15,1,'icon-transaction.png','EN'),(257,'TXTRPROC','GAFFiles','151','0',0,'taxTransaction/processGAF','0','',10,1,'icon-transaction.png','EN'),(258,'APPURINV','PurchaseInvoiceList','87','3',0,'purchasetransaction/purchaseinvoicelist','0','',25,1,'iconreport.png','EN'),(259,'SORPSOCU','Salesbycustomer','106','5',0,'soreport/SalesByCustomer','0','',20,1,'iconreport.png','EN'),(260,'DELCNFRM','DeliveryOrderConfirm','152','0',0,'sotransaction/salesDOPost','0','',42,1,'icon-transaction.png','EN'),(261,'SORPYRSL','SalesbycustomerYears','106','5',0,'soreport/SalesByCustomerYears','0','',25,1,'iconreport.png','EN'),(263,'SORPSLIT','Salesbyitem','106','5',0,'soreport/SalesByItem','0','',26,1,'iconreport.png','EN'),(264,'INVLOCTC','LocationTransferConfirm','148','4',0,'locationtransfer/locationtransfer','0','',7,1,'i-film','EN'),(265,'INVITCC','ItemCountAdjustConfirm','148','4',0,'itemcountadjust/confirm','0','',9,1,'i-film','EN'),(268,'IVSTCKCS','StockCountSheet','92','4',0,'countsheet','0','',83,1,'iconreport.png','EN'),(269,'LTL','LocationTransferList','92','4',0,'locationtransfer/report','0','',10,1,'iconreport.png','EN'),(270,'ICAA','ItemCountAndAdjustmentList','92','4',0,'itemcountadjust/report','0','',20,1,'iconreport.png','EN'),(272,'BNKSETUP','BankSetup','5','10',0,'bankSetup/bankList','0','',78,1,'icon-bank.png','EN'),(274,'ZKTSTGRP','Zakatgroup','108','7',0,'zakatsetup/Group','0','',30,1,'iconsetupsub.png','EN'),(275,'ZKTSTNSB','nisab','108','7',0,'zakatsetup/nisab','0',NULL,20,1,'iconsetupsub.png','EN'),(276,'ZKTRGPLT','Zakatgrouplist','109','7',0,'zakatreport/groupList','0','',20,1,'iconreport.png','EN'),(277,'ZKTSTNSD','Nisabdetails','108','7',0,'zakatsetup/NisabDetails','0','',10,1,'iconsetupsub.png','EN'),(278,'ZKTTRANS','ZktTransaction','84','7',1,'#','0','',20,1,'iconsubtransaction.png','EN'),(279,'ZKTTRCAL','Zakatcalculate','278','7',0,'zakatTransaction/Calculation','0','',10,1,'icon-transaction.png','EN'),(280,'ZKSTCNTR','ZcZakatcenter','108','7',0,'zakatsetup/Center','0','',55,1,'iconsetupsub.png','EN'),(281,'ZKRPCTRL','ZrZakatcenter','109','7',0,'zakatreport/centerList','0','',10,1,'iconreport.png','EN'),(282,'ZKRPNBLT','Zakatnisab','109','7',0,'zakatreport/nisabList','0','',5,1,'iconreport.png','EN'),(283,'ZKRPSMLT','Zakatsummary','109','7',0,'zakatreport/zakatSummaryList','0','',80,1,'iconreport.png','EN'),(284,'PUROUTGR','PurOutstandingGRNReport','52','5',0,'inventory/rptgrnvaluationFromPurchase','0','',10,1,'iconreport.png','EN'),(285,'WKSTMSTR','Wakafsetup','108','7',0,'wakafsetup/wakaf_acrual_list','0','',60,1,'iconsetupsub.png','EN'),(286,'ARCUSTST','CustomerStatement','89','2',0,'customerStatement/customerList','0','',29,1,'iconreport.png','EN'),(287,'ARCPYSI','copySalesInvoice','131','2',0,'arinvoiceclone','0','',14,1,'i-film','EN'),(288,'APCPYPI','copyPurchaseInvoice','124','3',0,'apinvoiceclone','0','',21,1,'i-film','EN'),(289,'SORPORCT','Salesorderbycustomer','106','5',0,'soreport/SalesOrderByCustomer','0','',60,1,'iconreport.png','EN'),(290,'SORPSOIT','Salesorderbyitem','106','5',0,'soreport/SalesOrderByItem','0','',65,1,'iconreport.png','EN'),(292,'SORPOROT','Salesorderoutstandingbyitem','106','5',0,'soreport/SalesOrderOutstandingByItem','0','',75,1,'iconreport.png','EN'),(295,'WCQCNTR','WaqafCenter','108','0',0,'waqafsetup/waqaflist','0','',61,1,'iconsetupsub.png','EN'),(297,'WKFCAL','wakafCalculation','278','0',0,'wakafSetup/newwakaf','0','',11,1,'i-film','EN'),(298,'WKFLST','wakafList','109','0',0,'wakafSetup/wakafList','0','',81,1,'iconreport.png','EN'),(299,'APDRNOTE','PurchaseDebitNoteEdit','124','3',0,'aptransaction/editDebitNote','0','',100,0,'icon-transaction.png','EN'),(302,'GLTRYECL','YearEndClose','150','1',0,'Gltransaction/YearEndClose','0','0',90,1,'icon-transaction.png','EN'),(304,'LOGRPT','LogReport','12','9',0,'logreport','0','0',5,1,'icon-log.png','EN'),(305,'INSTALL','installation','0','0',0,'0','0',NULL,10,1,'icon-ug-install.png','EN'),(306,'HTS','HowToStart','0','0',0,'0','0',NULL,15,1,'icon-how-to.png','EN'),(307,'GSTBDREL','baddebtrelief','151','0',0,'0','0',' ',11,1,'icon-transaction.png','EN'),(308,'BDBTRLC','baddebtreliefcon','151','0',0,'0','0',NULL,12,1,'icon-transaction.png','EN'),(309,'BADBTRCV','baddebtrecover','151','0',0,'0','0',NULL,13,1,'icon-transaction.png','EN'),(310,'BDBTRCCF','baddebtrecovercon','151','0',0,'0','0',NULL,14,1,'icon-transaction.png','EN'),(311,'GSTREPT','gstReport','103','0',0,'0','0',NULL,81,1,'iconsubreport.png','EN'),(312,'GST03','gst03','103','0',0,'0','0',NULL,82,1,'iconreport.png','EN'),(313,'BDRL','baddebtreliefrpt','103','0',0,'0','0',NULL,83,1,'iconreport.png','EN'),(314,'BDRCLRPT','baddebtrecoverrpt','103','0',0,'0','0',NULL,84,1,'iconreport.png','EN'),(315,'ARCSHS','CashSalesRpt','89','2',0,'arreports/cashsalelist','0',NULL,31,1,'i-film','EN'),(316,'ARCASH','CashSale','131','2',0,'arTransaction/newcashsale','0',NULL,25,1,'i-film','EN'),(317,'ARCASHSC','CashSalesConfirm','131','2',0,'artransaction/cashsalePost','0',NULL,26,1,'i-film','EN'),(318,'APOPWOI','NewOtherPaymentWithoutItem','150','1',0,'gltransaction/newPayWithoutItem','0',NULL,56,1,'i-film','EN'),(319,'OTRPAY','otherpaymentconfirm','150','1',0,'gltransaction/otherpaymentConfirm','0',NULL,57,1,'i-film','EN'),(320,'OTHRCV','othersReceive','150','1',0,'gltransaction/newotherreceive','0',NULL,58,1,'i-film','EN'),(321,'OTRCVCON','othersReceiveConfirm','150','1',0,'gltransaction/otherreceiveConfirm','0',NULL,59,1,'i-film','EN'),(322,'APBANKRE','BankReconciliation','88','1',0,'BankReconciliation','0',NULL,57,1,'i-film','EN'),(323,'GLBNKRCL','bankreconlist','88','1',0,'bankreconciliation/concilelist','0',NULL,58,1,'i-film','EN'),(324,'APRPTOPW','ArOtherPaymentWithoutItemList','88','1',0,'glreports/otherpaywithoutList','0',NULL,59,1,'i-film','EN'),(325,'OTRCVLST','othersReceiveList','88','1',0,'glreports/othersreceiveList','0',NULL,71,1,'i-film','EN'),(326,'PURRRPT','purchasePricingReport','52','5',0,'purchasepricing/report','0',NULL,5,1,'i-film','EN'),(327,'PURRCVCA','purchaseReceiveCancel','52','8',0,'receiveItems/receivecancel','0',NULL,9,1,'i-film','EN'),(328,'PURCNCL','purchaseOrderCancel','52','8',0,'purchaseReports/poCancelList','0',NULL,10,1,'i-film','EN'),(329,'ShipToST','shiptosetup','5','1',0,'setting/shiptoList','0',NULL,79,1,'icon-ship.png','EN'),(331,'BACKUP','backup','12','9',0,'backup','0',NULL,6,1,'icon-backup.png','EN'),(332,'ARCUSTAG','CustomerAging','89','2',0,'arreports/customerAging','0',NULL,30,1,'i-film','EN'),(334,'IVUNTMSR','unitmeasures','91','4',0,'icsetting/unitmeasurelist','0',NULL,71,1,'i-film','EN'),(335,'APDRINVC','PurchaseInvoiceConfirm','124','3',0,'aptransaction/invoicesConfirm','0',NULL,22,1,'i-film','EN'),(336,'ItemDetR','Itemdetails','92','4',0,'icsetting/ItemDetails','0',NULL,6,1,'i-film','EN'),(337,'GLOPNBAL','glopeningbalance','46','1',0,'glsetting/openingBalance','0',NULL,61,1,'i-film','EN'),(338,NULL,'resetpassword','0','0',0,'0','0',NULL,16,1,'icon-how-to.png','EN');

--
-- Table structure for table `ug_video`
--

CREATE TABLE `ug_video` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `ugID` int(11) NOT NULL,
  `title` varchar(64) NOT NULL,
  `videoLink` varchar(128) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ug_video`
--

INSERT INTO `ug_video` VALUES (58,304,'How to make a video intro','/ug_video/How_to_make_a_Video_Intro_online_Intro_Maker_IntroMaker.mp4'),(59,304,'hello world','/ug_video/How_to_make_a_Video_Intro_online_Intro_Maker_IntroMaker.mp4'),(60,306,'How To Start','/ug_video/how to start.avi'),(62,1,'welcome','/ug_video/video-sps.mp4'),(63,1,'Are you ready?','/ug_video/Final-Mia-video.mp4');

--
-- Table structure for table `user`
--

CREATE TABLE `user` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `userName` varchar(32) NOT NULL,
  `password` varchar(64) NOT NULL,
  `fullName` varchar(64) NOT NULL,
  `telephoneNo` varchar(16) NOT NULL,
  `emailAddress` varchar(16) NOT NULL,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `user`
--


--
-- Table structure for table `user_module_access`
--

CREATE TABLE `user_module_access` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) DEFAULT NULL,
  `userID` int(11) NOT NULL,
  `moduleID` int(11) NOT NULL,
  `transaction` smallint(2) NOT NULL DEFAULT '0',
  `reports` smallint(2) NOT NULL DEFAULT '0',
  `setup` smallint(2) NOT NULL DEFAULT '0',
  `accessRight` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=120 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `user_module_access`
--

INSERT INTO `user_module_access` VALUES (1,1,1,1,1,1,1,0,1,'2015-07-13 04:40:33',1,'2015-07-13 04:40:33'),(2,1,1,2,1,1,1,0,1,'2015-07-13 04:40:33',1,'2015-07-13 04:40:33'),(3,1,1,3,1,1,1,0,1,'2015-07-13 04:40:33',1,'2015-07-13 04:40:33'),(4,1,1,4,1,1,1,0,1,'2015-07-13 04:40:33',1,'2015-07-13 04:40:33'),(5,1,1,5,1,1,1,0,1,'2015-07-13 04:40:33',1,'2015-07-13 04:40:33'),(6,1,1,6,1,1,1,0,1,'2015-07-13 04:40:33',1,'2015-07-13 04:40:33'),(7,1,1,7,1,1,1,0,1,'2015-07-13 04:40:33',1,'2015-07-13 04:40:33'),(8,1,1,8,1,1,1,0,1,'2015-07-13 04:40:33',1,'2015-07-13 04:40:33'),(9,1,1,9,1,1,1,0,1,'2015-07-13 04:40:33',1,'2015-07-13 04:40:33'),(10,1,1,10,1,1,1,0,1,'2015-07-13 04:40:33',1,'2015-07-13 04:40:33'),(11,1,1,0,0,0,0,0,1,'2015-07-13 04:40:33',1,'2015-07-13 04:40:33'),(100,3,2,1,1,1,1,0,1,'2015-07-13 04:53:22',0,'2015-07-13 04:53:22'),(101,3,2,2,1,1,1,0,1,'2015-07-13 04:53:26',0,'2015-07-13 04:53:26'),(102,3,2,3,1,1,1,0,1,'2015-07-13 04:53:30',0,'2015-07-13 04:53:30'),(103,3,2,4,1,1,1,0,1,'2015-07-13 04:53:33',0,'2015-07-13 04:53:33'),(104,3,2,5,1,1,1,0,1,'2015-07-13 04:53:37',0,'2015-07-13 04:53:37'),(105,3,2,6,1,1,1,0,1,'2015-07-13 04:53:40',0,'2015-07-13 04:53:40'),(106,3,2,7,1,1,1,0,1,'2015-07-13 04:53:42',0,'2015-07-13 04:53:42'),(107,3,2,8,1,1,1,0,1,'2015-07-13 04:53:44',0,'2015-07-13 04:53:44'),(108,3,2,9,1,1,1,0,1,'2015-07-13 04:53:47',0,'2015-07-13 04:53:47'),(109,3,2,10,1,1,1,0,1,'2015-07-13 04:53:49',0,'2015-07-13 04:53:49'),(110,2,2,1,1,1,1,0,1,'2015-07-13 04:54:34',0,'2015-07-13 04:54:34'),(111,2,2,2,1,1,1,0,1,'2015-07-13 04:54:37',0,'2015-07-13 04:54:37'),(112,2,2,3,1,1,1,0,1,'2015-07-13 04:54:41',0,'2015-07-13 04:54:41'),(113,2,2,4,1,1,1,0,1,'2015-07-13 04:54:43',0,'2015-07-13 04:54:43'),(114,2,2,5,1,1,1,0,1,'2015-07-13 04:54:46',0,'2015-07-13 04:54:46'),(115,2,2,6,1,1,1,0,1,'2015-07-13 04:54:49',2,'2015-08-05 04:33:41'),(116,2,2,7,1,1,1,0,1,'2015-07-13 04:54:51',0,'2015-07-13 04:54:51'),(117,2,2,8,1,1,1,0,1,'2015-07-13 04:54:53',0,'2015-07-13 04:54:53'),(118,2,2,9,1,1,1,0,1,'2015-07-13 04:54:55',0,'2015-07-13 04:54:55'),(119,2,2,10,1,1,1,0,1,'2015-07-13 04:54:57',0,'2015-07-13 04:54:57');

--
-- Table structure for table `user_module_access_details`
--

CREATE TABLE `user_module_access_details` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) DEFAULT NULL,
  `userID` int(11) NOT NULL,
  `menuCode` varchar(8) NOT NULL,
  `accessRight` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=2836 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;

--
-- Dumping data for table `user_module_access_details`
--

INSERT INTO `user_module_access_details` VALUES (1,1,1,'ARINVLST',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(2,1,1,'ARDBNLST',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(3,1,1,'ARCDNLST',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(4,1,1,'ARRCVPLS',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(5,1,1,'ARCUSTST',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(6,1,1,'APSUPPAY',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(7,1,1,'APPURDN',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(8,1,1,'APPURCN',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(9,1,1,'APPURDNC',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(10,1,1,'APPURCNC',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(11,1,1,'APOPWI',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(12,1,1,'APOPWIC',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(13,1,1,'APOPWOI',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(14,1,1,'APPURINV',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(15,1,1,'APDIRINV',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(16,1,1,'APCPYPI',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(17,1,1,'APBANKRE',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(18,1,1,'APPAYCFM',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(19,1,1,'APPAYICM',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(20,1,1,'APDRNOTE',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(21,1,1,'GLTRJRNL',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(22,1,1,'GLTRJlCY',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(23,1,1,'GLTRJlRV',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(24,1,1,'GLTRPOST',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(25,1,1,'GLRPBS',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(26,1,1,'GLRPTB',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(27,1,1,'GLRPJLPS',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(28,1,1,'GLRPJLUP',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(29,1,1,'GLRPTBFC',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(30,1,1,'GLRPABSM',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(31,1,1,'GLRPPNLM',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(32,1,1,'GLRPBGLT',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(33,1,1,'GLMCAL',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(34,1,1,'GLMCALL',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(35,1,1,'GLSTCOA',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(36,1,1,'GLSTBDGT',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(37,1,1,'GLSTCURC',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(38,1,1,'ARSALINV',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(39,1,1,'ARSDBN',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(40,1,1,'ARDBNC',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(41,1,1,'ARSCN',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(42,1,1,'ARSCNC',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(43,1,1,'ARRCVP',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(44,1,1,'ARRCVPC',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(45,1,1,'ARDSLINV',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(46,1,1,'ARDRSINV',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(47,1,1,'ARCPYSI',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(48,1,1,'ARSETCUS',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(49,1,1,'MSTRSUPP',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(50,1,1,'APPURDNL',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(51,1,1,'APPURCNL',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(52,1,1,'APRPTOPW',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(53,1,1,'APRPTSTL',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(54,1,1,'APTRETCR',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(55,1,1,'APTRPYIE',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(56,1,1,'UM',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(57,1,1,'UML',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(58,1,1,'MUL',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(59,1,1,'LOGRPT',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(60,1,1,'UMACCSS',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(61,1,1,'MSCL',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(62,1,1,'MSSL',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(63,1,1,'MSTRCOMP',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(64,1,1,'PROJECT',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(65,1,1,'TERM',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(66,1,1,'MSMTRCD',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(67,1,1,'EMP',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(68,1,1,'AGENTSTP',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(69,1,1,'BNKSETUP',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(70,1,1,'ADMMENU',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(71,1,1,'APTRPYOE',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(72,1,1,'INVPLNRP',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(73,1,1,'INVVALRP',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(74,1,1,'INVSTORP',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(75,1,1,'INVOUTRP',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(76,1,1,'INVMOVRP',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(77,1,1,'INVLSTRP',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(78,1,1,'IVSTCKCS',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(79,1,1,'LTL',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(80,1,1,'ICAA',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(81,1,1,'MSLM',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(82,1,1,'ITEMCAT',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(83,1,1,'ITEMTYP',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(84,1,1,'ITEMSET',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(85,1,1,'INVUM',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(86,1,1,'INVUMCOV',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(87,1,1,'INUMCVLS',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(88,1,1,'ICSTIDTL',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(89,1,1,'ARNWCUST',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(90,1,1,'ARSHIP2L',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(91,1,1,'ARSHIP2N',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(92,1,1,'ADMBNKMS',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(93,1,1,'ARTRINED',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(94,1,1,'AREDSLDR',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(95,1,1,'AREDCR',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(96,1,1,'ARPAYEDT',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(97,1,1,'PURORDER',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(98,1,1,'PURRCV',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(99,1,1,'PURORDCF',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(100,1,1,'PURRCVC',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(101,1,1,'GSPRJNW',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(102,1,1,'ZKTSTGRP',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(103,1,1,'ZKTSTNSB',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(104,1,1,'ZKTSTNSD',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(105,1,1,'ZKSTCNTR',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(106,1,1,'WKSTMSTR',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(107,1,1,'WCQCNTR',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(108,1,1,'APNEWSUP',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(109,1,1,'APNWSHP2',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(110,1,1,'GLTRYECL',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(111,1,1,'INVLOCTR',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(112,1,1,'INVSALEP',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(113,1,1,'INVPURPR',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(114,1,1,'INVITEMC',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(115,1,1,'INVLOCTC',0,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(116,1,1,'INVITCC',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(117,1,1,'INVSALC',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(118,1,1,'INVPURCC',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(119,1,1,'ItemDetR',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(120,1,1,'INEDITEM',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(121,1,1,'INNWITEM',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(122,1,1,'PURSTSPL',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(123,1,1,'PURSTUM',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(124,1,1,'PURSTUMC',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(125,1,1,'UMCONVNW',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(126,1,1,'SOSTSLPC',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(127,1,1,'PURORLST',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(128,1,1,'PURRCVLS',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(129,1,1,'PUROUTGR',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(130,1,1,'PUPRRPT',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(131,1,1,'TERMNEW',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(132,1,1,'APDRINVC',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(133,1,1,'SOQUOT',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(134,1,1,'SOTRNWSO',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(135,1,1,'SOTRDO',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(136,1,1,'DELCNFRM',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(137,1,1,'ZKTTRCAL',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(138,1,1,'WKFCAL',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(139,1,1,'ZKTRGPLT',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(140,1,1,'ZKRPCTRL',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(141,1,1,'ZKRPNBLT',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(142,1,1,'ZKRPSMLT',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(143,1,1,'WKFLST',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(144,1,1,'WCQCTRNW',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(145,1,1,'TXTRPROC',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(146,1,1,'GST03',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(147,1,1,'gstrpt',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(148,1,1,'null',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(149,1,1,'GSTMSTR',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(150,1,1,'GSTTYPE',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(151,1,1,'GSTGROUP',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(152,1,1,'SOTRQOLT',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(153,1,1,'SORPPCLT',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(154,1,1,'SOTRDOLT',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(155,1,1,'SOTRSOLT',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(156,1,1,'SORPSOCU',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(157,1,1,'SORPYRSL',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(158,1,1,'SORPSLIT',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(159,1,1,'SORPORCT',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(160,1,1,'SORPSOIT',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(161,1,1,'SORPOROT',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(162,1,1,'ARCUSTAG',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(163,1,1,'GSTCLASS',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(164,1,1,'TAXMSNW',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(165,1,1,'SOSLSPRC',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(166,1,1,'ARCASH',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(167,1,1,'ARCASHSC',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(168,1,1,'OTRPAY',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(169,1,1,'OTHRCV',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(170,1,1,'OTRCVCON',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(171,1,1,'ARCSHS',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(172,1,1,'OTRCVLST',1,1,'2015-07-13 04:40:35',1,'2015-07-13 04:40:35'),(2479,3,2,'GLTRJRNL',1,1,'2015-07-13 04:53:22',0,'2015-07-13 04:53:22'),(2480,3,2,'GLTRJlCY',1,1,'2015-07-13 04:53:22',0,'2015-07-13 04:53:22'),(2481,3,2,'GLTRJlRV',1,1,'2015-07-13 04:53:22',0,'2015-07-13 04:53:22'),(2482,3,2,'GLTRPOST',1,1,'2015-07-13 04:53:22',0,'2015-07-13 04:53:22'),(2483,3,2,'APOPWOI',1,1,'2015-07-13 04:53:22',0,'2015-07-13 04:53:22'),(2484,3,2,'GLTRYECL',1,1,'2015-07-13 04:53:22',0,'2015-07-13 04:53:22'),(2485,3,2,'OTRPAY',1,1,'2015-07-13 04:53:22',0,'2015-07-13 04:53:22'),(2486,3,2,'OTHRCV',1,1,'2015-07-13 04:53:22',0,'2015-07-13 04:53:22'),(2487,3,2,'OTRCVCON',1,1,'2015-07-13 04:53:22',0,'2015-07-13 04:53:22'),(2488,3,2,'GLRPBS',1,1,'2015-07-13 04:53:22',0,'2015-07-13 04:53:22'),(2489,3,2,'GLRPTB',1,1,'2015-07-13 04:53:22',0,'2015-07-13 04:53:22'),(2490,3,2,'GLRPJLPS',1,1,'2015-07-13 04:53:22',0,'2015-07-13 04:53:22'),(2491,3,2,'GLRPJLUP',1,1,'2015-07-13 04:53:23',0,'2015-07-13 04:53:23'),(2492,3,2,'GLRPTBFC',1,1,'2015-07-13 04:53:23',0,'2015-07-13 04:53:23'),(2493,3,2,'GLRPABSM',1,1,'2015-07-13 04:53:23',0,'2015-07-13 04:53:23'),(2494,3,2,'GLRPPNLM',1,1,'2015-07-13 04:53:23',0,'2015-07-13 04:53:23'),(2495,3,2,'APRPTOPW',1,1,'2015-07-13 04:53:23',0,'2015-07-13 04:53:23'),(2496,3,2,'GLRPBGLT',1,1,'2015-07-13 04:53:23',0,'2015-07-13 04:53:23'),(2497,3,2,'APBANKRE',1,1,'2015-07-13 04:53:23',0,'2015-07-13 04:53:23'),(2498,3,2,'OTRCVLST',1,1,'2015-07-13 04:53:23',0,'2015-07-13 04:53:23'),(2499,3,2,'GLBNKRCL',1,1,'2015-07-13 04:53:23',0,'2015-07-13 04:53:23'),(2500,3,2,'TRSCSUMM',1,1,'2015-07-13 04:53:23',0,'2015-07-13 04:53:23'),(2501,3,2,'GLMCAL',1,1,'2015-07-13 04:53:23',0,'2015-07-13 04:53:23'),(2502,3,2,'GLMCALL',1,1,'2015-07-13 04:53:23',0,'2015-07-13 04:53:23'),(2503,3,2,'GLSTCOA',1,1,'2015-07-13 04:53:23',0,'2015-07-13 04:53:23'),(2504,3,2,'GLSTBDGT',1,1,'2015-07-13 04:53:23',0,'2015-07-13 04:53:23'),(2505,3,2,'GLSTCURC',1,1,'2015-07-13 04:53:23',0,'2015-07-13 04:53:23'),(2506,3,2,'GLOPNBAL',1,1,'2015-07-13 04:53:23',0,'2015-07-13 04:53:23'),(2507,3,2,'GLUNPRES',1,1,'2015-07-13 04:53:23',0,'2015-07-13 04:53:23'),(2508,3,2,'ARSALINV',1,1,'2015-07-13 04:53:26',0,'2015-07-13 04:53:26'),(2509,3,2,'ARSDBN',1,1,'2015-07-13 04:53:26',0,'2015-07-13 04:53:26'),(2510,3,2,'ARDBNC',1,1,'2015-07-13 04:53:26',0,'2015-07-13 04:53:26'),(2511,3,2,'ARSCN',1,1,'2015-07-13 04:53:26',0,'2015-07-13 04:53:26'),(2512,3,2,'ARSCNC',1,1,'2015-07-13 04:53:26',0,'2015-07-13 04:53:26'),(2513,3,2,'ARRCVP',1,1,'2015-07-13 04:53:26',0,'2015-07-13 04:53:26'),(2514,3,2,'ARRCVPC',1,1,'2015-07-13 04:53:26',0,'2015-07-13 04:53:26'),(2515,3,2,'ARDSLINV',1,1,'2015-07-13 04:53:26',0,'2015-07-13 04:53:26'),(2516,3,2,'ARDRSINV',1,1,'2015-07-13 04:53:26',0,'2015-07-13 04:53:26'),(2517,3,2,'ARCPYSI',1,1,'2015-07-13 04:53:26',0,'2015-07-13 04:53:26'),(2518,3,2,'ARTRINED',1,1,'2015-07-13 04:53:26',0,'2015-07-13 04:53:26'),(2519,3,2,'AREDSLDR',1,1,'2015-07-13 04:53:26',0,'2015-07-13 04:53:26'),(2520,3,2,'AREDCR',1,1,'2015-07-13 04:53:27',0,'2015-07-13 04:53:27'),(2521,3,2,'ARPAYEDT',1,1,'2015-07-13 04:53:27',0,'2015-07-13 04:53:27'),(2522,3,2,'ARCASH',1,1,'2015-07-13 04:53:27',0,'2015-07-13 04:53:27'),(2523,3,2,'ARCASHSC',1,1,'2015-07-13 04:53:27',0,'2015-07-13 04:53:27'),(2524,3,2,'ARINVLST',1,1,'2015-07-13 04:53:27',0,'2015-07-13 04:53:27'),(2525,3,2,'ARDBNLST',1,1,'2015-07-13 04:53:27',0,'2015-07-13 04:53:27'),(2526,3,2,'ARCDNLST',1,1,'2015-07-13 04:53:27',0,'2015-07-13 04:53:27'),(2527,3,2,'ARRCVPLS',1,1,'2015-07-13 04:53:27',0,'2015-07-13 04:53:27'),(2528,3,2,'ARCUSTST',1,1,'2015-07-13 04:53:27',0,'2015-07-13 04:53:27'),(2529,3,2,'ARCUSTAG',1,1,'2015-07-13 04:53:27',0,'2015-07-13 04:53:27'),(2530,3,2,'ARCSHS',1,1,'2015-07-13 04:53:27',0,'2015-07-13 04:53:27'),(2531,3,2,'ARSETCUS',1,1,'2015-07-13 04:53:27',0,'2015-07-13 04:53:27'),(2532,3,2,'ARNWCUST',1,1,'2015-07-13 04:53:27',0,'2015-07-13 04:53:27'),(2533,3,2,'ARSHIP2L',1,1,'2015-07-13 04:53:27',0,'2015-07-13 04:53:27'),(2534,3,2,'ARSHIP2N',1,1,'2015-07-13 04:53:27',0,'2015-07-13 04:53:27'),(2535,3,2,'APSUPPAY',1,1,'2015-07-13 04:53:30',0,'2015-07-13 04:53:30'),(2536,3,2,'APPURDN',1,1,'2015-07-13 04:53:30',0,'2015-07-13 04:53:30'),(2537,3,2,'APPURCN',1,1,'2015-07-13 04:53:30',0,'2015-07-13 04:53:30'),(2538,3,2,'APPURDNC',1,1,'2015-07-13 04:53:30',0,'2015-07-13 04:53:30'),(2539,3,2,'APPURCNC',1,1,'2015-07-13 04:53:30',0,'2015-07-13 04:53:30'),(2540,3,2,'APPAYCFM',1,1,'2015-07-13 04:53:30',0,'2015-07-13 04:53:30'),(2541,3,2,'APOPWI',1,1,'2015-07-13 04:53:30',0,'2015-07-13 04:53:30'),(2542,3,2,'APPAYICM',1,1,'2015-07-13 04:53:30',0,'2015-07-13 04:53:30'),(2543,3,2,'APPURINV',1,1,'2015-07-13 04:53:30',0,'2015-07-13 04:53:30'),(2544,3,2,'APDIRINV',1,1,'2015-07-13 04:53:30',0,'2015-07-13 04:53:30'),(2545,3,2,'APDRINVC',1,1,'2015-07-13 04:53:30',0,'2015-07-13 04:53:30'),(2546,3,2,'APCPYPI',1,1,'2015-07-13 04:53:30',0,'2015-07-13 04:53:30'),(2547,3,2,'APDRNOTE',1,1,'2015-07-13 04:53:30',0,'2015-07-13 04:53:30'),(2548,3,2,'APTRETCR',1,1,'2015-07-13 04:53:30',0,'2015-07-13 04:53:30'),(2549,3,2,'APTRPYIE',1,1,'2015-07-13 04:53:30',0,'2015-07-13 04:53:30'),(2550,3,2,'APTRPYOE',1,1,'2015-07-13 04:53:30',0,'2015-07-13 04:53:30'),(2551,3,2,'APPURDNL',1,1,'2015-07-13 04:53:30',0,'2015-07-13 04:53:30'),(2552,3,2,'APPURCNL',1,1,'2015-07-13 04:53:30',0,'2015-07-13 04:53:30'),(2553,3,2,'APRPTSTL',1,1,'2015-07-13 04:53:31',0,'2015-07-13 04:53:31'),(2554,3,2,'MSTRSUPP',1,1,'2015-07-13 04:53:31',0,'2015-07-13 04:53:31'),(2555,3,2,'APNEWSUP',1,1,'2015-07-13 04:53:31',0,'2015-07-13 04:53:31'),(2556,3,2,'APNWSHP2',1,1,'2015-07-13 04:53:31',0,'2015-07-13 04:53:31'),(2557,3,2,'INVLOCTR',1,1,'2015-07-13 04:53:33',0,'2015-07-13 04:53:33'),(2558,3,2,'INVITEMC',1,1,'2015-07-13 04:53:33',0,'2015-07-13 04:53:33'),(2559,3,2,'INVLOCTC',1,1,'2015-07-13 04:53:33',0,'2015-07-13 04:53:33'),(2560,3,2,'INVITCC',1,1,'2015-07-13 04:53:33',0,'2015-07-13 04:53:33'),(2561,3,2,'INVPLNRP',1,1,'2015-07-13 04:53:33',0,'2015-07-13 04:53:33'),(2562,3,2,'INVVALRP',1,1,'2015-07-13 04:53:33',0,'2015-07-13 04:53:33'),(2563,3,2,'INVSTORP',1,1,'2015-07-13 04:53:33',0,'2015-07-13 04:53:33'),(2564,3,2,'INVOUTRP',1,1,'2015-07-13 04:53:34',0,'2015-07-13 04:53:34'),(2565,3,2,'INVMOVRP',1,1,'2015-07-13 04:53:34',0,'2015-07-13 04:53:34'),(2566,3,2,'INVLSTRP',1,1,'2015-07-13 04:53:34',0,'2015-07-13 04:53:34'),(2567,3,2,'IVSTCKCS',1,1,'2015-07-13 04:53:34',0,'2015-07-13 04:53:34'),(2568,3,2,'LTL',1,1,'2015-07-13 04:53:34',0,'2015-07-13 04:53:34'),(2569,3,2,'ICAA',1,1,'2015-07-13 04:53:34',0,'2015-07-13 04:53:34'),(2570,3,2,'ItemDetR',1,1,'2015-07-13 04:53:34',0,'2015-07-13 04:53:34'),(2571,3,2,'MSLM',1,1,'2015-07-13 04:53:34',0,'2015-07-13 04:53:34'),(2572,3,2,'ITEMCAT',1,1,'2015-07-13 04:53:34',0,'2015-07-13 04:53:34'),(2573,3,2,'ITEMTYP',1,1,'2015-07-13 04:53:34',0,'2015-07-13 04:53:34'),(2574,3,2,'ITEMSET',1,1,'2015-07-13 04:53:34',0,'2015-07-13 04:53:34'),(2575,3,2,'INVUM',1,1,'2015-07-13 04:53:34',0,'2015-07-13 04:53:34'),(2576,3,2,'INEDITEM',1,1,'2015-07-13 04:53:34',0,'2015-07-13 04:53:34'),(2577,3,2,'INNWITEM',1,1,'2015-07-13 04:53:34',0,'2015-07-13 04:53:34'),(2578,3,2,'IVUNTMSR',1,1,'2015-07-13 04:53:34',0,'2015-07-13 04:53:34'),(2579,3,2,'OPNBALIN',1,1,'2015-07-13 04:53:34',0,'2015-07-13 04:53:34'),(2580,3,2,'SOQUOT',1,1,'2015-07-13 04:53:37',0,'2015-07-13 04:53:37'),(2581,3,2,'SOTRNWSO',1,1,'2015-07-13 04:53:37',0,'2015-07-13 04:53:37'),(2582,3,2,'SOTRDO',1,1,'2015-07-13 04:53:37',0,'2015-07-13 04:53:37'),(2583,3,2,'DELCNFRM',1,1,'2015-07-13 04:53:37',0,'2015-07-13 04:53:37'),(2584,3,2,'SOTRQOLT',1,1,'2015-07-13 04:53:37',0,'2015-07-13 04:53:37'),(2585,3,2,'SORPPCLT',1,1,'2015-07-13 04:53:37',0,'2015-07-13 04:53:37'),(2586,3,2,'SOTRDOLT',1,1,'2015-07-13 04:53:37',0,'2015-07-13 04:53:37'),(2587,3,2,'SOTRSOLT',1,1,'2015-07-13 04:53:37',0,'2015-07-13 04:53:37'),(2588,3,2,'SORPSOCU',1,1,'2015-07-13 04:53:37',0,'2015-07-13 04:53:37'),(2589,3,2,'SORPYRSL',1,1,'2015-07-13 04:53:37',0,'2015-07-13 04:53:37'),(2590,3,2,'SORPSLIT',1,1,'2015-07-13 04:53:37',0,'2015-07-13 04:53:37'),(2591,3,2,'SORPORCT',1,1,'2015-07-13 04:53:37',0,'2015-07-13 04:53:37'),(2592,3,2,'SORPSOIT',1,1,'2015-07-13 04:53:37',0,'2015-07-13 04:53:37'),(2593,3,2,'SORPOROT',1,1,'2015-07-13 04:53:37',0,'2015-07-13 04:53:37'),(2594,3,2,'SOSTSLPC',1,1,'2015-07-13 04:53:37',0,'2015-07-13 04:53:37'),(2595,3,2,'TXTRPROC',1,1,'2015-07-13 04:53:40',0,'2015-07-13 04:53:40'),(2596,3,2,'GSBADRLF',1,1,'2015-07-13 04:53:40',0,'2015-07-13 04:53:40'),(2597,3,2,'BADBTRLC',1,1,'2015-07-13 04:53:40',0,'2015-07-13 04:53:40'),(2598,3,2,'GSBADBTR',1,1,'2015-07-13 04:53:40',0,'2015-07-13 04:53:40'),(2599,3,2,'BDEBRCCO',1,1,'2015-07-13 04:53:40',0,'2015-07-13 04:53:40'),(2600,3,2,'GST03',1,1,'2015-07-13 04:53:40',0,'2015-07-13 04:53:40'),(2601,3,2,'GSTRPT01',1,1,'2015-07-13 04:53:40',0,'2015-07-13 04:53:40'),(2602,3,2,'BDRETRPT',1,1,'2015-07-13 04:53:40',0,'2015-07-13 04:53:40'),(2603,3,2,'BDRCVRPT',1,1,'2015-07-13 04:53:40',0,'2015-07-13 04:53:40'),(2604,3,2,'GSTMSTR',1,1,'2015-07-13 04:53:40',0,'2015-07-13 04:53:40'),(2605,3,2,'GSTCLASS',1,1,'2015-07-13 04:53:40',0,'2015-07-13 04:53:40'),(2606,3,2,'GSTGROUP',1,1,'2015-07-13 04:53:40',0,'2015-07-13 04:53:40'),(2607,3,2,'GSTTYPE',1,1,'2015-07-13 04:53:40',0,'2015-07-13 04:53:40'),(2608,3,2,'ZKTTRCAL',1,1,'2015-07-13 04:53:42',0,'2015-07-13 04:53:42'),(2609,3,2,'WKFCAL',1,1,'2015-07-13 04:53:42',0,'2015-07-13 04:53:42'),(2610,3,2,'ZKTRGPLT',1,1,'2015-07-13 04:53:42',0,'2015-07-13 04:53:42'),(2611,3,2,'ZKRPCTRL',1,1,'2015-07-13 04:53:42',0,'2015-07-13 04:53:42'),(2612,3,2,'ZKRPNBLT',1,1,'2015-07-13 04:53:42',0,'2015-07-13 04:53:42'),(2613,3,2,'ZKRPSMLT',1,1,'2015-07-13 04:53:42',0,'2015-07-13 04:53:42'),(2614,3,2,'WKFLST',1,1,'2015-07-13 04:53:42',0,'2015-07-13 04:53:42'),(2615,3,2,'ZKTSTGRP',1,1,'2015-07-13 04:53:42',0,'2015-07-13 04:53:42'),(2616,3,2,'ZKTSTNSB',1,1,'2015-07-13 04:53:42',0,'2015-07-13 04:53:42'),(2617,3,2,'ZKTSTNSD',1,1,'2015-07-13 04:53:42',0,'2015-07-13 04:53:42'),(2618,3,2,'ZKSTCNTR',1,1,'2015-07-13 04:53:42',0,'2015-07-13 04:53:42'),(2619,3,2,'WKSTMSTR',1,1,'2015-07-13 04:53:42',0,'2015-07-13 04:53:42'),(2620,3,2,'WCQCNTR',1,1,'2015-07-13 04:53:42',0,'2015-07-13 04:53:42'),(2621,3,2,'PURORDER',1,1,'2015-07-13 04:53:44',0,'2015-07-13 04:53:44'),(2622,3,2,'PURRCV',1,1,'2015-07-13 04:53:44',0,'2015-07-13 04:53:44'),(2623,3,2,'PURORDCF',1,1,'2015-07-13 04:53:44',0,'2015-07-13 04:53:44'),(2624,3,2,'PURRCVC',1,1,'2015-07-13 04:53:44',0,'2015-07-13 04:53:44'),(2625,3,2,'PURORLST',1,1,'2015-07-13 04:53:45',0,'2015-07-13 04:53:45'),(2626,3,2,'PURRCVLS',1,1,'2015-07-13 04:53:45',0,'2015-07-13 04:53:45'),(2627,3,2,'PUROUTGR',1,1,'2015-07-13 04:53:45',0,'2015-07-13 04:53:45'),(2628,3,2,'PUPRRPT',1,1,'2015-07-13 04:53:45',0,'2015-07-13 04:53:45'),(2629,3,2,'PURCNCL',1,1,'2015-07-13 04:53:45',0,'2015-07-13 04:53:45'),(2630,3,2,'PURRCVCA',1,1,'2015-07-13 04:53:45',0,'2015-07-13 04:53:45'),(2631,3,2,'PURSTSPL',1,1,'2015-07-13 04:53:45',0,'2015-07-13 04:53:45'),(2632,3,2,'INVPURPR',1,1,'2015-07-13 04:53:45',0,'2015-07-13 04:53:45'),(2633,3,2,'UMCONVNW',1,1,'2015-07-13 04:53:45',0,'2015-07-13 04:53:45'),(2634,3,2,'PURUOMLS',1,1,'2015-07-13 04:53:45',0,'2015-07-13 04:53:45'),(2635,3,2,'UM',1,1,'2015-07-13 04:53:47',0,'2015-07-13 04:53:47'),(2636,3,2,'UML',1,1,'2015-07-13 04:53:47',0,'2015-07-13 04:53:47'),(2637,3,2,'MUL',1,1,'2015-07-13 04:53:47',0,'2015-07-13 04:53:47'),(2638,3,2,'LOGRPT',1,1,'2015-07-13 04:53:47',0,'2015-07-13 04:53:47'),(2639,3,2,'UMACCSS',1,1,'2015-07-13 04:53:47',0,'2015-07-13 04:53:47'),(2640,3,2,'ADMMENU',1,1,'2015-07-13 04:53:47',0,'2015-07-13 04:53:47'),(2641,3,2,'USRADD',1,1,'2015-07-13 04:53:47',0,'2015-07-13 04:53:47'),(2642,3,2,'BACKUP',1,1,'2015-07-13 04:53:47',0,'2015-07-13 04:53:47'),(2643,3,2,'updversi',1,1,'2015-07-13 04:53:47',0,'2015-07-13 04:53:47'),(2644,3,2,'upgraden',1,1,'2015-07-13 04:53:47',0,'2015-07-13 04:53:47'),(2645,3,2,'MSTRCOMP',1,1,'2015-07-13 04:53:49',0,'2015-07-13 04:53:49'),(2646,3,2,'PROJECT',1,1,'2015-07-13 04:53:49',0,'2015-07-13 04:53:49'),(2647,3,2,'TERM',1,1,'2015-07-13 04:53:49',0,'2015-07-13 04:53:49'),(2648,3,2,'MSMTRCD',1,1,'2015-07-13 04:53:49',0,'2015-07-13 04:53:49'),(2649,3,2,'EMP',1,1,'2015-07-13 04:53:49',0,'2015-07-13 04:53:49'),(2650,3,2,'AGENTSTP',1,1,'2015-07-13 04:53:49',0,'2015-07-13 04:53:49'),(2651,3,2,'BNKSETUP',1,1,'2015-07-13 04:53:49',0,'2015-07-13 04:53:49'),(2652,3,2,'ShipToST',1,1,'2015-07-13 04:53:49',0,'2015-07-13 04:53:49'),(2653,2,2,'GLTRJRNL',1,1,'2015-07-13 04:54:34',0,'2015-07-13 04:54:34'),(2654,2,2,'GLTRJlCY',1,1,'2015-07-13 04:54:34',0,'2015-07-13 04:54:34'),(2655,2,2,'GLTRJlRV',1,1,'2015-07-13 04:54:34',0,'2015-07-13 04:54:34'),(2656,2,2,'GLTRPOST',1,1,'2015-07-13 04:54:34',0,'2015-07-13 04:54:34'),(2657,2,2,'APOPWOI',1,1,'2015-07-13 04:54:34',0,'2015-07-13 04:54:34'),(2658,2,2,'GLTRYECL',1,1,'2015-07-13 04:54:34',0,'2015-07-13 04:54:34'),(2659,2,2,'OTRPAY',1,1,'2015-07-13 04:54:34',0,'2015-07-13 04:54:34'),(2660,2,2,'OTHRCV',1,1,'2015-07-13 04:54:34',0,'2015-07-13 04:54:34'),(2661,2,2,'OTRCVCON',1,1,'2015-07-13 04:54:34',0,'2015-07-13 04:54:34'),(2662,2,2,'GLRPBS',1,1,'2015-07-13 04:54:34',0,'2015-07-13 04:54:34'),(2663,2,2,'GLRPTB',1,1,'2015-07-13 04:54:34',0,'2015-07-13 04:54:34'),(2664,2,2,'GLRPJLPS',1,1,'2015-07-13 04:54:35',0,'2015-07-13 04:54:35'),(2665,2,2,'GLRPJLUP',1,1,'2015-07-13 04:54:35',0,'2015-07-13 04:54:35'),(2666,2,2,'GLRPTBFC',1,1,'2015-07-13 04:54:35',0,'2015-07-13 04:54:35'),(2667,2,2,'GLRPABSM',1,1,'2015-07-13 04:54:35',0,'2015-07-13 04:54:35'),(2668,2,2,'GLRPPNLM',1,1,'2015-07-13 04:54:35',0,'2015-07-13 04:54:35'),(2669,2,2,'APRPTOPW',1,1,'2015-07-13 04:54:35',0,'2015-07-13 04:54:35'),(2670,2,2,'GLRPBGLT',1,1,'2015-07-13 04:54:35',0,'2015-07-13 04:54:35'),(2671,2,2,'APBANKRE',1,1,'2015-07-13 04:54:35',0,'2015-07-13 04:54:35'),(2672,2,2,'OTRCVLST',1,1,'2015-07-13 04:54:35',0,'2015-07-13 04:54:35'),(2673,2,2,'GLBNKRCL',1,1,'2015-07-13 04:54:35',0,'2015-07-13 04:54:35'),(2674,2,2,'TRSCSUMM',1,1,'2015-07-13 04:54:35',0,'2015-07-13 04:54:35'),(2675,2,2,'GLMCAL',1,1,'2015-07-13 04:54:35',0,'2015-07-13 04:54:35'),(2676,2,2,'GLMCALL',1,1,'2015-07-13 04:54:35',0,'2015-07-13 04:54:35'),(2677,2,2,'GLSTCOA',1,1,'2015-07-13 04:54:35',0,'2015-07-13 04:54:35'),(2678,2,2,'GLSTBDGT',1,1,'2015-07-13 04:54:35',0,'2015-07-13 04:54:35'),(2679,2,2,'GLSTCURC',1,1,'2015-07-13 04:54:35',0,'2015-07-13 04:54:35'),(2680,2,2,'GLOPNBAL',1,1,'2015-07-13 04:54:35',0,'2015-07-13 04:54:35'),(2681,2,2,'GLUNPRES',1,1,'2015-07-13 04:54:35',0,'2015-07-13 04:54:35'),(2682,2,2,'ARSALINV',1,1,'2015-07-13 04:54:37',0,'2015-07-13 04:54:37'),(2683,2,2,'ARSDBN',1,1,'2015-07-13 04:54:37',0,'2015-07-13 04:54:37'),(2684,2,2,'ARDBNC',1,1,'2015-07-13 04:54:37',0,'2015-07-13 04:54:37'),(2685,2,2,'ARSCN',1,1,'2015-07-13 04:54:38',0,'2015-07-13 04:54:38'),(2686,2,2,'ARSCNC',1,1,'2015-07-13 04:54:38',0,'2015-07-13 04:54:38'),(2687,2,2,'ARRCVP',1,1,'2015-07-13 04:54:38',0,'2015-07-13 04:54:38'),(2688,2,2,'ARRCVPC',1,1,'2015-07-13 04:54:38',0,'2015-07-13 04:54:38'),(2689,2,2,'ARDSLINV',1,1,'2015-07-13 04:54:38',0,'2015-07-13 04:54:38'),(2690,2,2,'ARDRSINV',1,1,'2015-07-13 04:54:38',0,'2015-07-13 04:54:38'),(2691,2,2,'ARCPYSI',1,1,'2015-07-13 04:54:38',0,'2015-07-13 04:54:38'),(2692,2,2,'ARTRINED',1,1,'2015-07-13 04:54:38',0,'2015-07-13 04:54:38'),(2693,2,2,'AREDSLDR',1,1,'2015-07-13 04:54:38',0,'2015-07-13 04:54:38'),(2694,2,2,'AREDCR',1,1,'2015-07-13 04:54:38',0,'2015-07-13 04:54:38'),(2695,2,2,'ARPAYEDT',1,1,'2015-07-13 04:54:38',0,'2015-07-13 04:54:38'),(2696,2,2,'ARCASH',1,1,'2015-07-13 04:54:38',0,'2015-07-13 04:54:38'),(2697,2,2,'ARCASHSC',1,1,'2015-07-13 04:54:38',0,'2015-07-13 04:54:38'),(2698,2,2,'ARINVLST',1,1,'2015-07-13 04:54:38',0,'2015-07-13 04:54:38'),(2699,2,2,'ARDBNLST',1,1,'2015-07-13 04:54:38',0,'2015-07-13 04:54:38'),(2700,2,2,'ARCDNLST',1,1,'2015-07-13 04:54:38',0,'2015-07-13 04:54:38'),(2701,2,2,'ARRCVPLS',1,1,'2015-07-13 04:54:38',0,'2015-07-13 04:54:38'),(2702,2,2,'ARCUSTST',1,1,'2015-07-13 04:54:38',0,'2015-07-13 04:54:38'),(2703,2,2,'ARCUSTAG',1,1,'2015-07-13 04:54:38',0,'2015-07-13 04:54:38'),(2704,2,2,'ARCSHS',1,1,'2015-07-13 04:54:38',0,'2015-07-13 04:54:38'),(2705,2,2,'ARSETCUS',1,1,'2015-07-13 04:54:38',0,'2015-07-13 04:54:38'),(2706,2,2,'ARNWCUST',1,1,'2015-07-13 04:54:38',0,'2015-07-13 04:54:38'),(2707,2,2,'ARSHIP2L',1,1,'2015-07-13 04:54:38',0,'2015-07-13 04:54:38'),(2708,2,2,'ARSHIP2N',1,1,'2015-07-13 04:54:38',0,'2015-07-13 04:54:38'),(2709,2,2,'APSUPPAY',1,1,'2015-07-13 04:54:41',0,'2015-07-13 04:54:41'),(2710,2,2,'APPURDN',1,1,'2015-07-13 04:54:41',0,'2015-07-13 04:54:41'),(2711,2,2,'APPURCN',1,1,'2015-07-13 04:54:41',0,'2015-07-13 04:54:41'),(2712,2,2,'APPURDNC',1,1,'2015-07-13 04:54:41',0,'2015-07-13 04:54:41'),(2713,2,2,'APPURCNC',1,1,'2015-07-13 04:54:41',0,'2015-07-13 04:54:41'),(2714,2,2,'APPAYCFM',1,1,'2015-07-13 04:54:41',0,'2015-07-13 04:54:41'),(2715,2,2,'APOPWI',1,1,'2015-07-13 04:54:41',0,'2015-07-13 04:54:41'),(2716,2,2,'APPAYICM',1,1,'2015-07-13 04:54:41',0,'2015-07-13 04:54:41'),(2717,2,2,'APPURINV',1,1,'2015-07-13 04:54:41',0,'2015-07-13 04:54:41'),(2718,2,2,'APDIRINV',1,1,'2015-07-13 04:54:41',0,'2015-07-13 04:54:41'),(2719,2,2,'APDRINVC',1,1,'2015-07-13 04:54:41',0,'2015-07-13 04:54:41'),(2720,2,2,'APCPYPI',1,1,'2015-07-13 04:54:41',0,'2015-07-13 04:54:41'),(2721,2,2,'APDRNOTE',1,1,'2015-07-13 04:54:41',0,'2015-07-13 04:54:41'),(2722,2,2,'APTRETCR',1,1,'2015-07-13 04:54:41',0,'2015-07-13 04:54:41'),(2723,2,2,'APTRPYIE',1,1,'2015-07-13 04:54:41',0,'2015-07-13 04:54:41'),(2724,2,2,'APTRPYOE',1,1,'2015-07-13 04:54:41',0,'2015-07-13 04:54:41'),(2725,2,2,'APPURDNL',1,1,'2015-07-13 04:54:41',0,'2015-07-13 04:54:41'),(2726,2,2,'APPURCNL',1,1,'2015-07-13 04:54:41',0,'2015-07-13 04:54:41'),(2727,2,2,'APRPTSTL',1,1,'2015-07-13 04:54:41',0,'2015-07-13 04:54:41'),(2728,2,2,'MSTRSUPP',1,1,'2015-07-13 04:54:41',0,'2015-07-13 04:54:41'),(2729,2,2,'APNEWSUP',1,1,'2015-07-13 04:54:41',0,'2015-07-13 04:54:41'),(2730,2,2,'APNWSHP2',1,1,'2015-07-13 04:54:41',0,'2015-07-13 04:54:41'),(2731,2,2,'INVLOCTR',1,1,'2015-07-13 04:54:43',0,'2015-07-13 04:54:43'),(2732,2,2,'INVITEMC',1,1,'2015-07-13 04:54:43',0,'2015-07-13 04:54:43'),(2733,2,2,'INVLOCTC',1,1,'2015-07-13 04:54:43',0,'2015-07-13 04:54:43'),(2734,2,2,'INVITCC',1,1,'2015-07-13 04:54:44',0,'2015-07-13 04:54:44'),(2735,2,2,'INVPLNRP',1,1,'2015-07-13 04:54:44',0,'2015-07-13 04:54:44'),(2736,2,2,'INVVALRP',1,1,'2015-07-13 04:54:44',0,'2015-07-13 04:54:44'),(2737,2,2,'INVSTORP',1,1,'2015-07-13 04:54:44',0,'2015-07-13 04:54:44'),(2738,2,2,'INVOUTRP',1,1,'2015-07-13 04:54:44',0,'2015-07-13 04:54:44'),(2739,2,2,'INVMOVRP',1,1,'2015-07-13 04:54:44',0,'2015-07-13 04:54:44'),(2740,2,2,'INVLSTRP',1,1,'2015-07-13 04:54:44',0,'2015-07-13 04:54:44'),(2741,2,2,'IVSTCKCS',1,1,'2015-07-13 04:54:44',0,'2015-07-13 04:54:44'),(2742,2,2,'LTL',1,1,'2015-07-13 04:54:44',0,'2015-07-13 04:54:44'),(2743,2,2,'ICAA',1,1,'2015-07-13 04:54:44',0,'2015-07-13 04:54:44'),(2744,2,2,'ItemDetR',1,1,'2015-07-13 04:54:44',0,'2015-07-13 04:54:44'),(2745,2,2,'MSLM',1,1,'2015-07-13 04:54:44',0,'2015-07-13 04:54:44'),(2746,2,2,'ITEMCAT',1,1,'2015-07-13 04:54:44',0,'2015-07-13 04:54:44'),(2747,2,2,'ITEMTYP',1,1,'2015-07-13 04:54:44',0,'2015-07-13 04:54:44'),(2748,2,2,'ITEMSET',1,1,'2015-07-13 04:54:44',0,'2015-07-13 04:54:44'),(2749,2,2,'INVUM',1,1,'2015-07-13 04:54:44',0,'2015-07-13 04:54:44'),(2750,2,2,'INEDITEM',1,1,'2015-07-13 04:54:44',0,'2015-07-13 04:54:44'),(2751,2,2,'INNWITEM',1,1,'2015-07-13 04:54:44',0,'2015-07-13 04:54:44'),(2752,2,2,'IVUNTMSR',1,1,'2015-07-13 04:54:44',0,'2015-07-13 04:54:44'),(2753,2,2,'OPNBALIN',1,1,'2015-07-13 04:54:44',0,'2015-07-13 04:54:44'),(2754,2,2,'SOQUOT',1,1,'2015-07-13 04:54:46',0,'2015-07-13 04:54:46'),(2755,2,2,'SOTRNWSO',1,1,'2015-07-13 04:54:46',0,'2015-07-13 04:54:46'),(2756,2,2,'SOTRDO',1,1,'2015-07-13 04:54:46',0,'2015-07-13 04:54:46'),(2757,2,2,'DELCNFRM',1,1,'2015-07-13 04:54:46',0,'2015-07-13 04:54:46'),(2758,2,2,'SOTRQOLT',1,1,'2015-07-13 04:54:46',0,'2015-07-13 04:54:46'),(2759,2,2,'SORPPCLT',1,1,'2015-07-13 04:54:46',0,'2015-07-13 04:54:46'),(2760,2,2,'SOTRDOLT',1,1,'2015-07-13 04:54:47',0,'2015-07-13 04:54:47'),(2761,2,2,'SOTRSOLT',1,1,'2015-07-13 04:54:47',0,'2015-07-13 04:54:47'),(2762,2,2,'SORPSOCU',1,1,'2015-07-13 04:54:47',0,'2015-07-13 04:54:47'),(2763,2,2,'SORPYRSL',1,1,'2015-07-13 04:54:47',0,'2015-07-13 04:54:47'),(2764,2,2,'SORPSLIT',1,1,'2015-07-13 04:54:47',0,'2015-07-13 04:54:47'),(2765,2,2,'SORPORCT',1,1,'2015-07-13 04:54:47',0,'2015-07-13 04:54:47'),(2766,2,2,'SORPSOIT',1,1,'2015-07-13 04:54:47',0,'2015-07-13 04:54:47'),(2767,2,2,'SORPOROT',1,1,'2015-07-13 04:54:47',0,'2015-07-13 04:54:47'),(2768,2,2,'SOSTSLPC',1,1,'2015-07-13 04:54:47',0,'2015-07-13 04:54:47'),(2769,2,2,'TXTRPROC',1,1,'2015-07-13 04:54:49',2,'2015-08-05 04:33:41'),(2770,2,2,'GSBADRLF',1,1,'2015-07-13 04:54:49',2,'2015-08-05 04:33:43'),(2771,2,2,'BADBTRLC',1,1,'2015-07-13 04:54:49',2,'2015-08-05 04:33:44'),(2772,2,2,'GSBADBTR',1,1,'2015-07-13 04:54:49',2,'2015-08-05 04:33:44'),(2773,2,2,'BDEBRCCO',1,1,'2015-07-13 04:54:49',2,'2015-08-05 04:33:45'),(2774,2,2,'GST03',1,1,'2015-07-13 04:54:49',2,'2015-08-05 04:33:59'),(2775,2,2,'GSTRPT01',1,1,'2015-07-13 04:54:49',2,'2015-08-05 04:34:01'),(2776,2,2,'BDRETRPT',1,1,'2015-07-13 04:54:49',2,'2015-08-05 04:34:02'),(2777,2,2,'BDRCVRPT',1,1,'2015-07-13 04:54:49',2,'2015-08-05 04:34:03'),(2778,2,2,'GSTMSTR',1,1,'2015-07-13 04:54:49',0,'2015-07-13 04:54:49'),(2779,2,2,'GSTCLASS',1,1,'2015-07-13 04:54:49',0,'2015-07-13 04:54:49'),(2780,2,2,'GSTGROUP',1,1,'2015-07-13 04:54:49',0,'2015-07-13 04:54:49'),(2781,2,2,'GSTTYPE',1,1,'2015-07-13 04:54:49',0,'2015-07-13 04:54:49'),(2782,2,2,'ZKTTRCAL',1,1,'2015-07-13 04:54:51',0,'2015-07-13 04:54:51'),(2783,2,2,'WKFCAL',1,1,'2015-07-13 04:54:51',0,'2015-07-13 04:54:51'),(2784,2,2,'ZKTRGPLT',1,1,'2015-07-13 04:54:51',0,'2015-07-13 04:54:51'),(2785,2,2,'ZKRPCTRL',1,1,'2015-07-13 04:54:51',0,'2015-07-13 04:54:51'),(2786,2,2,'ZKRPNBLT',1,1,'2015-07-13 04:54:51',0,'2015-07-13 04:54:51'),(2787,2,2,'ZKRPSMLT',1,1,'2015-07-13 04:54:51',0,'2015-07-13 04:54:51'),(2788,2,2,'WKFLST',1,1,'2015-07-13 04:54:51',0,'2015-07-13 04:54:51'),(2789,2,2,'ZKTSTGRP',1,1,'2015-07-13 04:54:51',0,'2015-07-13 04:54:51'),(2790,2,2,'ZKTSTNSB',1,1,'2015-07-13 04:54:51',0,'2015-07-13 04:54:51'),(2791,2,2,'ZKTSTNSD',1,1,'2015-07-13 04:54:51',0,'2015-07-13 04:54:51'),(2792,2,2,'ZKSTCNTR',1,1,'2015-07-13 04:54:51',0,'2015-07-13 04:54:51'),(2793,2,2,'WKSTMSTR',1,1,'2015-07-13 04:54:51',0,'2015-07-13 04:54:51'),(2794,2,2,'WCQCNTR',1,1,'2015-07-13 04:54:51',0,'2015-07-13 04:54:51'),(2795,2,2,'PURORDER',1,1,'2015-07-13 04:54:53',0,'2015-07-13 04:54:53'),(2796,2,2,'PURRCV',1,1,'2015-07-13 04:54:53',0,'2015-07-13 04:54:53'),(2797,2,2,'PURORDCF',1,1,'2015-07-13 04:54:53',0,'2015-07-13 04:54:53'),(2798,2,2,'PURRCVC',1,1,'2015-07-13 04:54:53',0,'2015-07-13 04:54:53'),(2799,2,2,'PURORLST',1,1,'2015-07-13 04:54:53',0,'2015-07-13 04:54:53'),(2800,2,2,'PURRCVLS',1,1,'2015-07-13 04:54:53',0,'2015-07-13 04:54:53'),(2801,2,2,'PUROUTGR',1,1,'2015-07-13 04:54:53',0,'2015-07-13 04:54:53'),(2802,2,2,'PUPRRPT',1,1,'2015-07-13 04:54:53',0,'2015-07-13 04:54:53'),(2803,2,2,'PURCNCL',1,1,'2015-07-13 04:54:53',0,'2015-07-13 04:54:53'),(2804,2,2,'PURRCVCA',1,1,'2015-07-13 04:54:53',0,'2015-07-13 04:54:53'),(2805,2,2,'PURSTSPL',1,1,'2015-07-13 04:54:53',0,'2015-07-13 04:54:53'),(2806,2,2,'INVPURPR',1,1,'2015-07-13 04:54:54',0,'2015-07-13 04:54:54'),(2807,2,2,'UMCONVNW',1,1,'2015-07-13 04:54:54',0,'2015-07-13 04:54:54'),(2808,2,2,'PURUOMLS',1,1,'2015-07-13 04:54:54',0,'2015-07-13 04:54:54'),(2809,2,2,'UM',1,1,'2015-07-13 04:54:55',0,'2015-07-13 04:54:55'),(2810,2,2,'UML',1,1,'2015-07-13 04:54:55',0,'2015-07-13 04:54:55'),(2811,2,2,'MUL',1,1,'2015-07-13 04:54:55',0,'2015-07-13 04:54:55'),(2812,2,2,'LOGRPT',1,1,'2015-07-13 04:54:55',0,'2015-07-13 04:54:55'),(2813,2,2,'UMACCSS',1,1,'2015-07-13 04:54:55',0,'2015-07-13 04:54:55'),(2814,2,2,'ADMMENU',1,1,'2015-07-13 04:54:55',0,'2015-07-13 04:54:55'),(2815,2,2,'USRADD',1,1,'2015-07-13 04:54:55',0,'2015-07-13 04:54:55'),(2816,2,2,'BACKUP',1,1,'2015-07-13 04:54:56',0,'2015-07-13 04:54:56'),(2817,2,2,'updversi',1,1,'2015-07-13 04:54:56',0,'2015-07-13 04:54:56'),(2818,2,2,'upgraden',1,1,'2015-07-13 04:54:56',0,'2015-07-13 04:54:56'),(2819,2,2,'MSTRCOMP',1,1,'2015-07-13 04:54:57',0,'2015-07-13 04:54:57'),(2820,2,2,'PROJECT',1,1,'2015-07-13 04:54:57',0,'2015-07-13 04:54:57'),(2821,2,2,'TERM',1,1,'2015-07-13 04:54:57',0,'2015-07-13 04:54:57'),(2822,2,2,'MSMTRCD',1,1,'2015-07-13 04:54:57',0,'2015-07-13 04:54:57'),(2823,2,2,'EMP',1,1,'2015-07-13 04:54:57',0,'2015-07-13 04:54:57'),(2824,2,2,'AGENTSTP',1,1,'2015-07-13 04:54:57',0,'2015-07-13 04:54:57'),(2825,2,2,'BNKSETUP',1,1,'2015-07-13 04:54:57',0,'2015-07-13 04:54:57'),(2826,2,2,'ShipToST',1,1,'2015-07-13 04:54:57',0,'2015-07-13 04:54:57'),(2827,2,2,'GTSJNL',1,2,'2015-08-05 04:33:45',0,'2015-08-05 04:33:45'),(2828,2,2,'GSTJCNF',1,2,'2015-08-05 04:33:46',0,'2015-08-05 04:33:46'),(2829,2,2,'SUPBDRLF',1,2,'2015-08-05 04:33:46',0,'2015-08-05 04:33:46'),(2830,2,2,'SPBDRLC',1,2,'2015-08-05 04:33:47',0,'2015-08-05 04:33:47'),(2831,2,2,'SBDEBRCV',1,2,'2015-08-05 04:33:47',0,'2015-08-05 04:33:47'),(2832,2,2,'SPBDRCNF',1,2,'2015-08-05 04:33:48',0,'2015-08-05 04:33:48'),(2833,2,2,'GSTRPTSU',1,2,'2015-08-05 04:34:03',0,'2015-08-05 04:34:03'),(2834,2,2,'GST03SUM',1,2,'2015-08-05 04:34:04',2,'2015-08-05 04:36:59'),(2835,2,2,'GSTRTSUM',1,2,'2015-08-05 04:37:00',0,'2015-08-05 04:37:00');

--
-- Temporary view structure for view `view_account_balance`
--

/*!50001 DROP VIEW IF EXISTS `view_account_balance`*/;
/*!50001 CREATE VIEW `view_account_balance` AS SELECT 
 1 AS `companyID`,
 1 AS `acctID`,
 1 AS `acctName`,
 1 AS `year`,
 1 AS `period`,
 1 AS `closing`*/;

--
-- Temporary view structure for view `view_ar_inventory`
--

/*!50001 DROP VIEW IF EXISTS `view_ar_inventory`*/;
/*!50001 CREATE VIEW `view_ar_inventory` AS SELECT 
 1 AS `companyID`,
 1 AS `customerID`,
 1 AS `formNo`,
 1 AS `salesinvoiceDate`,
 1 AS `totalReceivable`*/;

--
-- Temporary view structure for view `view_ar_open_position`
--

/*!50001 DROP VIEW IF EXISTS `view_ar_open_position`*/;
/*!50001 CREATE VIEW `view_ar_open_position` AS SELECT 
 1 AS `companyID`,
 1 AS `customerID`,
 1 AS `customerName`,
 1 AS `phoneNumber1`,
 1 AS `email`,
 1 AS `due120`,
 1 AS `due90`,
 1 AS `due60`,
 1 AS `due30`,
 1 AS `due0`,
 1 AS `pastDue30`,
 1 AS `pastDue60`,
 1 AS `pastDue90`,
 1 AS `pastDue120`,
 1 AS `pastDue`*/;

--
-- Temporary view structure for view `view_balance_sheet`
--

/*!50001 DROP VIEW IF EXISTS `view_balance_sheet`*/;
/*!50001 CREATE VIEW `view_balance_sheet` AS SELECT 
 1 AS `acctCode`,
 1 AS `acctName`,
 1 AS `acctGroupID`,
 1 AS `currentyeardebit`,
 1 AS `currentyearcredit`,
 1 AS `lastyeardebit`,
 1 AS `lastyearcredit`*/;

--
-- Temporary view structure for view `view_bank_reconcile`
--

/*!50001 DROP VIEW IF EXISTS `view_bank_reconcile`*/;
/*!50001 CREATE VIEW `view_bank_reconcile` AS SELECT 
 1 AS `ID`,
 1 AS `companyid`,
 1 AS `tableName`,
 1 AS `bankid`,
 1 AS `referenceNo`,
 1 AS `transDate`,
 1 AS `formNo`,
 1 AS `description`,
 1 AS `debitAmount`,
 1 AS `creditAmount`*/;

--
-- Temporary view structure for view `view_bank_reconcile_reverse`
--

/*!50001 DROP VIEW IF EXISTS `view_bank_reconcile_reverse`*/;
/*!50001 CREATE VIEW `view_bank_reconcile_reverse` AS SELECT 
 1 AS `bankReconcileID`,
 1 AS `ID`,
 1 AS `companyID`,
 1 AS `tableName`,
 1 AS `bankID`,
 1 AS `referenceNo`,
 1 AS `transDate`,
 1 AS `formNo`,
 1 AS `description`,
 1 AS `debitAmount`,
 1 AS `creditAmount`*/;

--
-- Temporary view structure for view `view_chart_of_acct_updateable`
--

/*!50001 DROP VIEW IF EXISTS `view_chart_of_acct_updateable`*/;
/*!50001 CREATE VIEW `view_chart_of_acct_updateable` AS SELECT 
 1 AS `ID`,
 1 AS `companyID`,
 1 AS `acctGroupID`,
 1 AS `acctCode`,
 1 AS `acctName`,
 1 AS `acctDesc`,
 1 AS `updateable`*/;

--
-- Temporary view structure for view `view_comp_acc_det`
--

/*!50001 DROP VIEW IF EXISTS `view_comp_acc_det`*/;
/*!50001 CREATE VIEW `view_comp_acc_det` AS SELECT 
 1 AS `ID`,
 1 AS `companyID`,
 1 AS `acctGroupID`,
 1 AS `acctID`,
 1 AS `year`,
 1 AS `period`,
 1 AS `amountdr`,
 1 AS `amountcr`,
 1 AS `total`,
 1 AS `createdBy`,
 1 AS `createdTS`,
 1 AS `updatedBy`,
 1 AS `updatedTS`,
 1 AS `is_delete`*/;

--
-- Temporary view structure for view `view_customer_aging`
--

/*!50001 DROP VIEW IF EXISTS `view_customer_aging`*/;
/*!50001 CREATE VIEW `view_customer_aging` AS SELECT 
 1 AS `companyID`,
 1 AS `customerID`,
 1 AS `customerName`,
 1 AS `phoneNumber1`,
 1 AS `email`,
 1 AS `current`,
 1 AS `month1`,
 1 AS `month2`,
 1 AS `month3`,
 1 AS `month4`,
 1 AS `month5`,
 1 AS `month6`,
 1 AS `month7`,
 1 AS `month8`,
 1 AS `month9`,
 1 AS `month10`,
 1 AS `month11`*/;

--
-- Temporary view structure for view `view_customer_statement`
--

/*!50001 DROP VIEW IF EXISTS `view_customer_statement`*/;
/*!50001 CREATE VIEW `view_customer_statement` AS SELECT 
 1 AS `ID`,
 1 AS `parent`,
 1 AS `companyID`,
 1 AS `customerID`,
 1 AS `transType`,
 1 AS `transDate`,
 1 AS `refNo`,
 1 AS `formNo`,
 1 AS `dr`,
 1 AS `cr`,
 1 AS `seq`*/;

--
-- Temporary view structure for view `view_expence_and_income`
--

/*!50001 DROP VIEW IF EXISTS `view_expence_and_income`*/;
/*!50001 CREATE VIEW `view_expence_and_income` AS SELECT 
 1 AS `companyid`,
 1 AS `year`,
 1 AS `period`,
 1 AS `groupID`,
 1 AS `acctType`,
 1 AS `totalDr`,
 1 AS `totalCr`,
 1 AS `balance`*/;

--
-- Temporary view structure for view `view_gaf`
--

/*!50001 DROP VIEW IF EXISTS `view_gaf`*/;
/*!50001 CREATE VIEW `view_gaf` AS SELECT 
 1 AS `companyID`,
 1 AS `col1`,
 1 AS `col2`,
 1 AS `col3`,
 1 AS `col4`,
 1 AS `col5`,
 1 AS `col6`,
 1 AS `col7`,
 1 AS `col8`,
 1 AS `col9`,
 1 AS `col10`,
 1 AS `col11`,
 1 AS `col12`,
 1 AS `col13`,
 1 AS `col14`*/;

--
-- Temporary view structure for view `view_grn_report`
--

/*!50001 DROP VIEW IF EXISTS `view_grn_report`*/;
/*!50001 CREATE VIEW `view_grn_report` AS SELECT 
 1 AS `companyID`,
 1 AS `unitMesure`,
 1 AS `ID`,
 1 AS `itemCode`,
 1 AS `itemName`,
 1 AS `poNo`,
 1 AS `PoDate`,
 1 AS `unitPrice`,
 1 AS `quantityOrder`,
 1 AS `total`,
 1 AS `totalRcv`,
 1 AS `QtyLeft`,
 1 AS `itemID`*/;

--
-- Temporary view structure for view `view_gst_report`
--

/*!50001 DROP VIEW IF EXISTS `view_gst_report`*/;
/*!50001 CREATE VIEW `view_gst_report` AS SELECT 
 1 AS `companyid`,
 1 AS `gstRegisteredDate`,
 1 AS `taxablePeriod`,
 1 AS `financialYear`,
 1 AS `startDate`,
 1 AS `endDate`,
 1 AS `period`,
 1 AS `A1`,
 1 AS `A2`,
 1 AS `B5a`,
 1 AS `B5b`,
 1 AS `B6a`,
 1 AS `B6b`,
 1 AS `B7`,
 1 AS `B8`,
 1 AS `C10`,
 1 AS `C11`,
 1 AS `C12`,
 1 AS `C13`,
 1 AS `C14`,
 1 AS `C15`,
 1 AS `C16`,
 1 AS `C17`,
 1 AS `month6`,
 1 AS `C18`*/;

--
-- Temporary view structure for view `view_gst_tax`
--

/*!50001 DROP VIEW IF EXISTS `view_gst_tax`*/;
/*!50001 CREATE VIEW `view_gst_tax` AS SELECT 
 1 AS `lineNo`,
 1 AS `companyID`,
 1 AS `taxClass`,
 1 AS `taxClassName`,
 1 AS `taxGroup`,
 1 AS `taxGroupName`,
 1 AS `taxType`,
 1 AS `taxTypeName`,
 1 AS `transType`,
 1 AS `ref`,
 1 AS `transDate`,
 1 AS `customerID`,
 1 AS `customerName`,
 1 AS `itemName`,
 1 AS `amountExcludedTax`,
 1 AS `taxRate`,
 1 AS `taxAmount`,
 1 AS `amountIncludedTax`,
 1 AS `taxID`,
 1 AS `gst`,
 1 AS `journalID`,
 1 AS `formNo`*/;

--
-- Temporary view structure for view `view_inventory_statement`
--

/*!50001 DROP VIEW IF EXISTS `view_inventory_statement`*/;
/*!50001 CREATE VIEW `view_inventory_statement` AS SELECT 
 1 AS `companyID`,
 1 AS `transactionDate`,
 1 AS `itemID`,
 1 AS `name`,
 1 AS `supplierCustomer`,
 1 AS `transactionCode`,
 1 AS `transactionType`,
 1 AS `formNo`,
 1 AS `locationID`,
 1 AS `location`,
 1 AS `unitOfMeasure`,
 1 AS `quantityIn`,
 1 AS `quantityOut`,
 1 AS `updateable`*/;

--
-- Temporary view structure for view `view_inventory_transaction`
--

/*!50001 DROP VIEW IF EXISTS `view_inventory_transaction`*/;
/*!50001 CREATE VIEW `view_inventory_transaction` AS SELECT 
 1 AS `indexing`,
 1 AS `ID`,
 1 AS `companyID`,
 1 AS `itemID`,
 1 AS `locationID`,
 1 AS `createdTS`,
 1 AS `supplierName`,
 1 AS `formNo`,
 1 AS `transDate`,
 1 AS `um`,
 1 AS `transType`,
 1 AS `qtyIn`,
 1 AS `qtyOut`*/;

--
-- Temporary view structure for view `view_inventorylist_subtotal`
--

/*!50001 DROP VIEW IF EXISTS `view_inventorylist_subtotal`*/;
/*!50001 CREATE VIEW `view_inventorylist_subtotal` AS SELECT 
 1 AS `companyid`,
 1 AS `quantity`,
 1 AS `locationid`,
 1 AS `itemID`,
 1 AS `itemName`,
 1 AS `category`,
 1 AS `description`,
 1 AS `stockValue`*/;

--
-- Temporary view structure for view `view_item_details`
--

/*!50001 DROP VIEW IF EXISTS `view_item_details`*/;
/*!50001 CREATE VIEW `view_item_details` AS SELECT 
 1 AS `companyid`,
 1 AS `itemid`,
 1 AS `itemName`,
 1 AS `description`,
 1 AS `locationid`,
 1 AS `onHandQty`,
 1 AS `umID`,
 1 AS `acctID`,
 1 AS `location`,
 1 AS `unitOfMeasure`*/;

--
-- Temporary view structure for view `view_item_quantityonhand`
--

/*!50001 DROP VIEW IF EXISTS `view_item_quantityonhand`*/;
/*!50001 CREATE VIEW `view_item_quantityonhand` AS SELECT 
 1 AS `companyID`,
 1 AS `locationID`,
 1 AS `itemID`,
 1 AS `itemCode`,
 1 AS `itemName`,
 1 AS `umID`,
 1 AS `quantityOnHand`*/;

--
-- Temporary view structure for view `view_item_quantityonhand_confirm`
--

/*!50001 DROP VIEW IF EXISTS `view_item_quantityonhand_confirm`*/;
/*!50001 CREATE VIEW `view_item_quantityonhand_confirm` AS SELECT 
 1 AS `companyID`,
 1 AS `locationID`,
 1 AS `itemID`,
 1 AS `itemCode`,
 1 AS `itemName`,
 1 AS `umID`,
 1 AS `quantityOnHand`*/;

--
-- Temporary view structure for view `view_journal_table`
--

/*!50001 DROP VIEW IF EXISTS `view_journal_table`*/;
/*!50001 CREATE VIEW `view_journal_table` AS SELECT 
 1 AS `ID`,
 1 AS `companyID`,
 1 AS `referenceNo`,
 1 AS `tableName`,
 1 AS `journalID`,
 1 AS `formNo`*/;

--
-- Temporary view structure for view `view_open_ar_invoice`
--

/*!50001 DROP VIEW IF EXISTS `view_open_ar_invoice`*/;
/*!50001 CREATE VIEW `view_open_ar_invoice` AS SELECT 
 1 AS `companyID`,
 1 AS `salesInvoiceDate`,
 1 AS `salesYear`,
 1 AS `salesMonth`,
 1 AS `slsMonth`,
 1 AS `totalAmount`*/;

--
-- Temporary view structure for view `view_salescreditnote`
--

/*!50001 DROP VIEW IF EXISTS `view_salescreditnote`*/;
/*!50001 CREATE VIEW `view_salescreditnote` AS SELECT 
 1 AS `invoiceDetailID`,
 1 AS `unitOfMeasure`,
 1 AS `ID`,
 1 AS `invoiceID`,
 1 AS `doID`,
 1 AS `lineNo`,
 1 AS `itemID`,
 1 AS `umID`,
 1 AS `quantity`,
 1 AS `unitPrice`,
 1 AS `amountExcludedTax`,
 1 AS `taxID`,
 1 AS `taxRate`,
 1 AS `taxAmount`,
 1 AS `amountIncludedTax`,
 1 AS `accountID`,
 1 AS `createdBy`,
 1 AS `createdTS`,
 1 AS `updatedBy`,
 1 AS `updatedTS`,
 1 AS `code`,
 1 AS `itemCode`,
 1 AS `name`,
 1 AS `description`,
 1 AS `exactQty`*/;

--
-- Temporary view structure for view `view_salesdebitnote`
--

/*!50001 DROP VIEW IF EXISTS `view_salesdebitnote`*/;
/*!50001 CREATE VIEW `view_salesdebitnote` AS SELECT 
 1 AS `invoiceDetailID`,
 1 AS `unitOfMeasure`,
 1 AS `ID`,
 1 AS `invoiceID`,
 1 AS `doID`,
 1 AS `lineNo`,
 1 AS `itemID`,
 1 AS `umID`,
 1 AS `quantity`,
 1 AS `unitPrice`,
 1 AS `amountExcludedTax`,
 1 AS `taxID`,
 1 AS `taxRate`,
 1 AS `taxAmount`,
 1 AS `amountIncludedTax`,
 1 AS `accountID`,
 1 AS `createdBy`,
 1 AS `createdTS`,
 1 AS `updatedBy`,
 1 AS `updatedTS`,
 1 AS `code`,
 1 AS `itemCode`,
 1 AS `name`,
 1 AS `description`,
 1 AS `exactQty`*/;

--
-- Temporary view structure for view `view_search`
--

/*!50001 DROP VIEW IF EXISTS `view_search`*/;
/*!50001 CREATE VIEW `view_search` AS SELECT 
 1 AS `ID`,
 1 AS `companyID`,
 1 AS `searchLink`,
 1 AS `searchKey`,
 1 AS `transDate`*/;

--
-- Temporary view structure for view `view_serial_comp_cash_sales`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_cash_sales`*/;
/*!50001 CREATE VIEW `view_serial_comp_cash_sales` AS SELECT 
 1 AS `companyID`,
 1 AS `nextSerialNo`*/;

--
-- Temporary view structure for view `view_serial_comp_delivery_order`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_delivery_order`*/;
/*!50001 CREATE VIEW `view_serial_comp_delivery_order` AS SELECT 
 1 AS `companyID`,
 1 AS `nextSerialNo`*/;

--
-- Temporary view structure for view `view_serial_comp_gst_transaction`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_gst_transaction`*/;
/*!50001 CREATE VIEW `view_serial_comp_gst_transaction` AS SELECT 
 1 AS `companyID`,
 1 AS `nextSerialNo`*/;

--
-- Temporary view structure for view `view_serial_comp_historical_customer_invoice`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_historical_customer_invoice`*/;
/*!50001 CREATE VIEW `view_serial_comp_historical_customer_invoice` AS SELECT 
 1 AS `companyID`,
 1 AS `nextSerialNo`*/;

--
-- Temporary view structure for view `view_serial_comp_historical_supplier_invoice`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_historical_supplier_invoice`*/;
/*!50001 CREATE VIEW `view_serial_comp_historical_supplier_invoice` AS SELECT 
 1 AS `companyID`,
 1 AS `nextSerialNo`*/;

--
-- Temporary view structure for view `view_serial_comp_location_transfer`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_location_transfer`*/;
/*!50001 CREATE VIEW `view_serial_comp_location_transfer` AS SELECT 
 1 AS `companyID`,
 1 AS `nextSerialNo`*/;

--
-- Temporary view structure for view `view_serial_comp_payment`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_payment`*/;
/*!50001 CREATE VIEW `view_serial_comp_payment` AS SELECT 
 1 AS `companyID`,
 1 AS `nextSerialNo`*/;

--
-- Temporary view structure for view `view_serial_comp_payment_others`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_payment_others`*/;
/*!50001 CREATE VIEW `view_serial_comp_payment_others` AS SELECT 
 1 AS `companyID`,
 1 AS `nextSerialNo`*/;

--
-- Temporary view structure for view `view_serial_comp_purchase_order`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_purchase_order`*/;
/*!50001 CREATE VIEW `view_serial_comp_purchase_order` AS SELECT 
 1 AS `companyID`,
 1 AS `nextSerialNo`*/;

--
-- Temporary view structure for view `view_serial_comp_quotation`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_quotation`*/;
/*!50001 CREATE VIEW `view_serial_comp_quotation` AS SELECT 
 1 AS `companyID`,
 1 AS `nextSerialNo`*/;

--
-- Temporary view structure for view `view_serial_comp_receive_item`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_receive_item`*/;
/*!50001 CREATE VIEW `view_serial_comp_receive_item` AS SELECT 
 1 AS `companyID`,
 1 AS `nextSerialNo`*/;

--
-- Temporary view structure for view `view_serial_comp_receive_payment`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_receive_payment`*/;
/*!50001 CREATE VIEW `view_serial_comp_receive_payment` AS SELECT 
 1 AS `companyID`,
 1 AS `nextSerialNo`*/;

--
-- Temporary view structure for view `view_serial_comp_receive_payment_others`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_receive_payment_others`*/;
/*!50001 CREATE VIEW `view_serial_comp_receive_payment_others` AS SELECT 
 1 AS `companyID`,
 1 AS `nextSerialNo`*/;

--
-- Temporary view structure for view `view_serial_comp_sales_creditnote`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_sales_creditnote`*/;
/*!50001 CREATE VIEW `view_serial_comp_sales_creditnote` AS SELECT 
 1 AS `companyID`,
 1 AS `nextSerialNo`*/;

--
-- Temporary view structure for view `view_serial_comp_sales_debitnote`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_sales_debitnote`*/;
/*!50001 CREATE VIEW `view_serial_comp_sales_debitnote` AS SELECT 
 1 AS `companyID`,
 1 AS `nextSerialNo`*/;

--
-- Temporary view structure for view `view_serial_comp_sales_invoice`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_sales_invoice`*/;
/*!50001 CREATE VIEW `view_serial_comp_sales_invoice` AS SELECT 
 1 AS `companyID`,
 1 AS `nextSerialNo`*/;

--
-- Temporary view structure for view `view_serial_comp_sales_order`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_sales_order`*/;
/*!50001 CREATE VIEW `view_serial_comp_sales_order` AS SELECT 
 1 AS `companyID`,
 1 AS `nextSerialNo`*/;

--
-- Temporary view structure for view `view_serial_comp_supplier_creditnote`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_supplier_creditnote`*/;
/*!50001 CREATE VIEW `view_serial_comp_supplier_creditnote` AS SELECT 
 1 AS `companyID`,
 1 AS `nextSerialNo`*/;

--
-- Temporary view structure for view `view_serial_comp_supplier_debitnote`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_supplier_debitnote`*/;
/*!50001 CREATE VIEW `view_serial_comp_supplier_debitnote` AS SELECT 
 1 AS `companyID`,
 1 AS `nextSerialNo`*/;

--
-- Temporary view structure for view `view_serial_comp_supplier_invoice`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_supplier_invoice`*/;
/*!50001 CREATE VIEW `view_serial_comp_supplier_invoice` AS SELECT 
 1 AS `companyID`,
 1 AS `nextSerialNo`*/;

--
-- Temporary view structure for view `view_supplier_aging`
--

/*!50001 DROP VIEW IF EXISTS `view_supplier_aging`*/;
/*!50001 CREATE VIEW `view_supplier_aging` AS SELECT 
 1 AS `companyID`,
 1 AS `supplierID`,
 1 AS `current`,
 1 AS `month1`,
 1 AS `month2`,
 1 AS `month3`,
 1 AS `month4`,
 1 AS `month5`,
 1 AS `month6`,
 1 AS `month7`,
 1 AS `month8`,
 1 AS `month9`,
 1 AS `month10`,
 1 AS `month11`*/;

--
-- Temporary view structure for view `view_supplier_statement`
--

/*!50001 DROP VIEW IF EXISTS `view_supplier_statement`*/;
/*!50001 CREATE VIEW `view_supplier_statement` AS SELECT 
 1 AS `ID`,
 1 AS `parent`,
 1 AS `companyID`,
 1 AS `supplierID`,
 1 AS `transType`,
 1 AS `transDate`,
 1 AS `refNo`,
 1 AS `formNo`,
 1 AS `dr`,
 1 AS `cr`,
 1 AS `seq`*/;

--
-- Temporary view structure for view `view_suppliercreditnote`
--

/*!50001 DROP VIEW IF EXISTS `view_suppliercreditnote`*/;
/*!50001 CREATE VIEW `view_suppliercreditnote` AS SELECT 
 1 AS `invoiceDetailID`,
 1 AS `invoiceUm`,
 1 AS `ID`,
 1 AS `invoiceID`,
 1 AS `receiveID`,
 1 AS `lineNo`,
 1 AS `itemID`,
 1 AS `itemname`,
 1 AS `itemdescription`,
 1 AS `umID`,
 1 AS `quantity`,
 1 AS `unitPrice`,
 1 AS `amountExcludedTax`,
 1 AS `taxID`,
 1 AS `taxRate`,
 1 AS `taxAmount`,
 1 AS `amountIncludedTax`,
 1 AS `accountID`,
 1 AS `createdBy`,
 1 AS `createdTS`,
 1 AS `updatedBy`,
 1 AS `updatedTS`,
 1 AS `exactQty`,
 1 AS `unitOfMeasure`,
 1 AS `receiveDetailID`,
 1 AS `code`,
 1 AS `itemCode`,
 1 AS `name`,
 1 AS `description`*/;

--
-- Temporary view structure for view `view_supplierdebitnote`
--

/*!50001 DROP VIEW IF EXISTS `view_supplierdebitnote`*/;
/*!50001 CREATE VIEW `view_supplierdebitnote` AS SELECT 
 1 AS `invoiceDetailID`,
 1 AS `ID`,
 1 AS `invoiceID`,
 1 AS `receiveID`,
 1 AS `lineNo`,
 1 AS `itemID`,
 1 AS `itemname`,
 1 AS `itemdescription`,
 1 AS `umID`,
 1 AS `quantity`,
 1 AS `unitPrice`,
 1 AS `amountExcludedTax`,
 1 AS `taxID`,
 1 AS `taxRate`,
 1 AS `taxAmount`,
 1 AS `amountIncludedTax`,
 1 AS `accountID`,
 1 AS `createdBy`,
 1 AS `createdTS`,
 1 AS `updatedBy`,
 1 AS `updatedTS`,
 1 AS `unitOfMeasure`,
 1 AS `receiveDetailID`,
 1 AS `code`,
 1 AS `itemCode`,
 1 AS `name`,
 1 AS `description`,
 1 AS `exactQty`*/;

--
-- Temporary view structure for view `view_total_comp_sales_creditnote`
--

/*!50001 DROP VIEW IF EXISTS `view_total_comp_sales_creditnote`*/;
/*!50001 CREATE VIEW `view_total_comp_sales_creditnote` AS SELECT 
 1 AS `ID`,
 1 AS `totalTaxAmount`,
 1 AS `totalAmount`*/;

--
-- Temporary view structure for view `view_total_comp_sales_debitnote`
--

/*!50001 DROP VIEW IF EXISTS `view_total_comp_sales_debitnote`*/;
/*!50001 CREATE VIEW `view_total_comp_sales_debitnote` AS SELECT 
 1 AS `ID`,
 1 AS `totalTaxAmount`,
 1 AS `totalAmount`*/;

--
-- Temporary view structure for view `view_total_comp_sales_invoice`
--

/*!50001 DROP VIEW IF EXISTS `view_total_comp_sales_invoice`*/;
/*!50001 CREATE VIEW `view_total_comp_sales_invoice` AS SELECT 
 1 AS `ID`,
 1 AS `totalTaxAmount`,
 1 AS `totalAmount`*/;

--
-- Temporary view structure for view `view_total_comp_supplier_creditnote`
--

/*!50001 DROP VIEW IF EXISTS `view_total_comp_supplier_creditnote`*/;
/*!50001 CREATE VIEW `view_total_comp_supplier_creditnote` AS SELECT 
 1 AS `ID`,
 1 AS `totalTaxAmount`,
 1 AS `totalAmount`*/;

--
-- Temporary view structure for view `view_total_comp_supplier_debitnote`
--

/*!50001 DROP VIEW IF EXISTS `view_total_comp_supplier_debitnote`*/;
/*!50001 CREATE VIEW `view_total_comp_supplier_debitnote` AS SELECT 
 1 AS `ID`,
 1 AS `totalTaxAmount`,
 1 AS `totalAmount`*/;

--
-- Temporary view structure for view `view_total_comp_supplier_invoice`
--

/*!50001 DROP VIEW IF EXISTS `view_total_comp_supplier_invoice`*/;
/*!50001 CREATE VIEW `view_total_comp_supplier_invoice` AS SELECT 
 1 AS `ID`,
 1 AS `totalTaxAmount`,
 1 AS `totalAmount`*/;

--
-- Temporary view structure for view `view_transaction_summary`
--

/*!50001 DROP VIEW IF EXISTS `view_transaction_summary`*/;
/*!50001 CREATE VIEW `view_transaction_summary` AS SELECT 
 1 AS `tableName`,
 1 AS `transID`,
 1 AS `companyid`,
 1 AS `year`,
 1 AS `Jan`,
 1 AS `Feb`,
 1 AS `Mar`,
 1 AS `Apr`,
 1 AS `may`,
 1 AS `Jun`,
 1 AS `Jul`,
 1 AS `Aug`,
 1 AS `Sept`,
 1 AS `Oct`,
 1 AS `Nov`,
 1 AS `Dec`*/;

--
-- Temporary view structure for view `view_unpost_ap_creditnote`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_ap_creditnote`*/;
/*!50001 CREATE VIEW `view_unpost_ap_creditnote` AS SELECT 
 1 AS `supplier`,
 1 AS `creditnoteID`,
 1 AS `lineNo`,
 1 AS `projectID`,
 1 AS `supplierInvoiceID`,
 1 AS `formNo`,
 1 AS `companyID`,
 1 AS `supplierID`,
 1 AS `supplierInvoiceNo`,
 1 AS `locationID`,
 1 AS `umID`,
 1 AS `quantity`,
 1 AS `itemID`,
 1 AS `itemName`,
 1 AS `amountExcludedtax`,
 1 AS `taxid`,
 1 AS `taxamount`,
 1 AS `drAccountID`,
 1 AS `crAccountID`,
 1 AS `drTaxAccountID`,
 1 AS `crTaxAccountID`*/;

--
-- Temporary view structure for view `view_unpost_ap_debitnote`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_ap_debitnote`*/;
/*!50001 CREATE VIEW `view_unpost_ap_debitnote` AS SELECT 
 1 AS `supplier`,
 1 AS `debitnoteID`,
 1 AS `lineNo`,
 1 AS `projectID`,
 1 AS `typeID`,
 1 AS `typeDetailID`,
 1 AS `formNo`,
 1 AS `companyID`,
 1 AS `supplierID`,
 1 AS `supplierInvoiceNo`,
 1 AS `locationID`,
 1 AS `umID`,
 1 AS `quantity`,
 1 AS `itemID`,
 1 AS `itemName`,
 1 AS `amountExcludedtax`,
 1 AS `taxid`,
 1 AS `taxamount`,
 1 AS `drAccountID`,
 1 AS `crAccountID`,
 1 AS `drTaxAccountID`,
 1 AS `crTaxAccountID`,
 1 AS `cogsAcctID`,
 1 AS `inventoriesAcctID`*/;

--
-- Temporary view structure for view `view_unpost_ap_invoice`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_ap_invoice`*/;
/*!50001 CREATE VIEW `view_unpost_ap_invoice` AS SELECT 
 1 AS `supplier`,
 1 AS `invoiceID`,
 1 AS `formNo`,
 1 AS `companyID`,
 1 AS `supplierID`,
 1 AS `lineNo`,
 1 AS `itemID`,
 1 AS `itemName`,
 1 AS `amountExcludedtax`,
 1 AS `taxid`,
 1 AS `taxamount`,
 1 AS `drAccountID`,
 1 AS `crAccountID`,
 1 AS `drTaxAccountID`,
 1 AS `crTaxAccountID`*/;

--
-- Temporary view structure for view `view_unpost_ar_creditnote`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_ar_creditnote`*/;
/*!50001 CREATE VIEW `view_unpost_ar_creditnote` AS SELECT 
 1 AS `customer`,
 1 AS `salesinvoiceID`,
 1 AS `creditnoteID`,
 1 AS `projectID`,
 1 AS `typeID`,
 1 AS `typeDetailID`,
 1 AS `formNo`,
 1 AS `companyID`,
 1 AS `customerID`,
 1 AS `locationID`,
 1 AS `salesInvoiceNo`,
 1 AS `lineNo`,
 1 AS `itemID`,
 1 AS `umID`,
 1 AS `quantity`,
 1 AS `itemName`,
 1 AS `amountExcludedtax`,
 1 AS `taxid`,
 1 AS `taxamount`,
 1 AS `drAccountID`,
 1 AS `crAccountID`,
 1 AS `drTaxAccountID`,
 1 AS `crTaxAccountID`,
 1 AS `cogsAcctID`,
 1 AS `inventoriesAcctID`*/;

--
-- Temporary view structure for view `view_unpost_ar_debitnote`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_ar_debitnote`*/;
/*!50001 CREATE VIEW `view_unpost_ar_debitnote` AS SELECT 
 1 AS `customer`,
 1 AS `salesinvoiceID`,
 1 AS `debitnoteID`,
 1 AS `projectID`,
 1 AS `typeID`,
 1 AS `typeDetailID`,
 1 AS `formNo`,
 1 AS `companyID`,
 1 AS `customerID`,
 1 AS `locationID`,
 1 AS `salesInvoiceNo`,
 1 AS `lineNo`,
 1 AS `itemID`,
 1 AS `umID`,
 1 AS `quantity`,
 1 AS `itemName`,
 1 AS `amountExcludedtax`,
 1 AS `taxid`,
 1 AS `taxamount`,
 1 AS `currencyID`,
 1 AS `drAccountID`,
 1 AS `crAccountID`,
 1 AS `drTaxAccountID`,
 1 AS `crTaxAccountID`,
 1 AS `cogsAcctID`,
 1 AS `inventoriesAcctID`*/;

--
-- Temporary view structure for view `view_unpost_ar_invoice`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_ar_invoice`*/;
/*!50001 CREATE VIEW `view_unpost_ar_invoice` AS SELECT 
 1 AS `projectID`,
 1 AS `customer`,
 1 AS `invoiceID`,
 1 AS `formNo`,
 1 AS `companyID`,
 1 AS `customerID`,
 1 AS `itemID`,
 1 AS `lineNo`,
 1 AS `itemName`,
 1 AS `amountExcludedtax`,
 1 AS `taxid`,
 1 AS `taxamount`,
 1 AS `drAccountID`,
 1 AS `crAccountID`,
 1 AS `drTaxAccountID`,
 1 AS `crTaxAccountID`*/;

--
-- Temporary view structure for view `view_unpost_ar_payment`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_ar_payment`*/;
/*!50001 CREATE VIEW `view_unpost_ar_payment` AS SELECT 
 1 AS `paymentID`,
 1 AS `formNo`,
 1 AS `companyID`,
 1 AS `customerID`,
 1 AS `purchaseInvoiceID`,
 1 AS `customerName`,
 1 AS `lineNo`,
 1 AS `paymentDetailID`,
 1 AS `item`,
 1 AS `amtPaid_amtAppl`,
 1 AS `discount_bankCharges`,
 1 AS `drAccountID`,
 1 AS `crAccountID`,
 1 AS `drDiscountAccountID`,
 1 AS `crDiscountAccountID`*/;

--
-- Temporary view structure for view `view_unpost_cash_purchase`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_cash_purchase`*/;
/*!50001 CREATE VIEW `view_unpost_cash_purchase` AS SELECT 
 1 AS `lineNo`,
 1 AS `quantity`,
 1 AS `unitPrice`,
 1 AS `itemID`,
 1 AS `itemdescription`,
 1 AS `umID`,
 1 AS `locationID`,
 1 AS `othersPaymentID`,
 1 AS `formNo`,
 1 AS `companyID`,
 1 AS `supplierID`,
 1 AS `purchaseInvoiceID`,
 1 AS `paymentDetailID`,
 1 AS `supplierInvoiceNo`,
 1 AS `ID`,
 1 AS `itemName`,
 1 AS `amountExcludedTax`,
 1 AS `taxid`,
 1 AS `taxAmount`,
 1 AS `projectID`,
 1 AS `itemTypeID`,
 1 AS `drAccountID`,
 1 AS `crAccountID`,
 1 AS `drDiscountAccountID`,
 1 AS `crDiscountAccountID`*/;

--
-- Temporary view structure for view `view_unpost_cash_sale`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_cash_sale`*/;
/*!50001 CREATE VIEW `view_unpost_cash_sale` AS SELECT 
 1 AS `projectID`,
 1 AS `customer`,
 1 AS `invoiceID`,
 1 AS `typeID`,
 1 AS `typeDetailID`,
 1 AS `locationID`,
 1 AS `quantity`,
 1 AS `formNo`,
 1 AS `companyID`,
 1 AS `itemID`,
 1 AS `umID`,
 1 AS `lineNo`,
 1 AS `currencyID`,
 1 AS `itemName`,
 1 AS `amountExcludedtax`,
 1 AS `taxid`,
 1 AS `taxamount`,
 1 AS `drAccountID`,
 1 AS `crAccountID`,
 1 AS `drTaxAccountID`,
 1 AS `crTaxAccountID`,
 1 AS `cogsAcctID`,
 1 AS `inventoriesAcctID`*/;

--
-- Temporary view structure for view `view_unpost_do`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_do`*/;
/*!50001 CREATE VIEW `view_unpost_do` AS SELECT 
 1 AS `deliveryOrderID`,
 1 AS `customerID`,
 1 AS `projectID`,
 1 AS `customer`,
 1 AS `invoiceID`,
 1 AS `typeID`,
 1 AS `typeDetailID`,
 1 AS `locationID`,
 1 AS `quantity`,
 1 AS `formNo`,
 1 AS `companyID`,
 1 AS `itemID`,
 1 AS `itemName`,
 1 AS `amountExcludedtax`,
 1 AS `taxid`,
 1 AS `taxamount`,
 1 AS `drAccountID`,
 1 AS `crAccountID`,
 1 AS `drTaxAccountID`,
 1 AS `crTaxAccountID`,
 1 AS `cogsAcctID`,
 1 AS `inventoriesAcctID`*/;

--
-- Temporary view structure for view `view_unpost_gst_transaction`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_gst_transaction`*/;
/*!50001 CREATE VIEW `view_unpost_gst_transaction` AS SELECT 
 1 AS `paymentID`,
 1 AS `formNo`,
 1 AS `companyID`,
 1 AS `supplierID`,
 1 AS `purchaseInvoiceID`,
 1 AS `supplierName`,
 1 AS `lineNo`,
 1 AS `paymentDetailID`,
 1 AS `supplierInvoiceNo`,
 1 AS `item`,
 1 AS `amtPaid_amtAppl`,
 1 AS `discount_bankCharges`,
 1 AS `drAccountID`,
 1 AS `crAccountID`,
 1 AS `drDiscountAccountID`,
 1 AS `crDiscountAccountID`*/;

--
-- Temporary view structure for view `view_unpost_other_payment`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_other_payment`*/;
/*!50001 CREATE VIEW `view_unpost_other_payment` AS SELECT 
 1 AS `othersPaymentID`,
 1 AS `formNo`,
 1 AS `companyID`,
 1 AS `supplierID`,
 1 AS `purchaseInvoiceID`,
 1 AS `paymentDetailID`,
 1 AS `supplierInvoiceNo`,
 1 AS `lineNo`,
 1 AS `itemdescription`,
 1 AS `amountExcludedtax`,
 1 AS `taxid`,
 1 AS `taxamount`,
 1 AS `drAccountID`,
 1 AS `crAccountID`,
 1 AS `drTaxAccountID`,
 1 AS `crTaxAccountID`*/;

--
-- Temporary view structure for view `view_unpost_other_receive`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_other_receive`*/;
/*!50001 CREATE VIEW `view_unpost_other_receive` AS SELECT 
 1 AS `projectID`,
 1 AS `receiveFrom`,
 1 AS `otherReceiveID`,
 1 AS `formNo`,
 1 AS `companyID`,
 1 AS `NULL`,
 1 AS `itemdescription`,
 1 AS `amountExcludedtax`,
 1 AS `taxid`,
 1 AS `taxamount`,
 1 AS `drAccountID`,
 1 AS `crAccountID`,
 1 AS `drTaxAccountID`,
 1 AS `crTaxAccountID`*/;

--
-- Temporary view structure for view `view_unpost_payment`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_payment`*/;
/*!50001 CREATE VIEW `view_unpost_payment` AS SELECT 
 1 AS `paymentID`,
 1 AS `formNo`,
 1 AS `companyID`,
 1 AS `supplierID`,
 1 AS `purchaseInvoiceID`,
 1 AS `supplierName`,
 1 AS `lineNo`,
 1 AS `paymentDetailID`,
 1 AS `supplierInvoiceNo`,
 1 AS `item`,
 1 AS `amtPaid_amtAppl`,
 1 AS `discount_bankCharges`,
 1 AS `drAccountID`,
 1 AS `crAccountID`,
 1 AS `drDiscountAccountID`,
 1 AS `crDiscountAccountID`*/;

--
-- Temporary view structure for view `view_unpost_receive_item`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_receive_item`*/;
/*!50001 CREATE VIEW `view_unpost_receive_item` AS SELECT 
 1 AS `receiveID`,
 1 AS `companyID`,
 1 AS `locationID`,
 1 AS `transactionDate`,
 1 AS `supplierID`,
 1 AS `formNo`,
 1 AS `lineNo`,
 1 AS `itemID`,
 1 AS `itemName`,
 1 AS `exchangeRate`,
 1 AS `unitPrice`,
 1 AS `quantityReceived`,
 1 AS `umID`,
 1 AS `amount`,
 1 AS `drAccountID`,
 1 AS `crAccountID`*/;

--
-- Temporary view structure for view `view_wakaf_accrual`
--

/*!50001 DROP VIEW IF EXISTS `view_wakaf_accrual`*/;
/*!50001 CREATE VIEW `view_wakaf_accrual` AS SELECT 
 1 AS `companyID`,
 1 AS `acctID`,
 1 AS `year`,
 1 AS `totalAmount`*/;

--
-- Temporary view structure for view `view_wakaf_from_profit`
--

/*!50001 DROP VIEW IF EXISTS `view_wakaf_from_profit`*/;
/*!50001 CREATE VIEW `view_wakaf_from_profit` AS SELECT 
 1 AS `companyid`,
 1 AS `year`,
 1 AS `acctType`,
 1 AS `totalDr`,
 1 AS `totalCr`*/;

--
-- Table structure for table `wakaf`
--

CREATE TABLE `wakaf` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `waqifID` int(11) NOT NULL COMMENT 'link to mastercode',
  `wakafCenterID` int(11) NOT NULL,
  `allocation` tinyint(4) NOT NULL COMMENT '0=lumpsum,1=percentage',
  `periodYear` smallint(6) NOT NULL,
  `periodFrom` tinyint(4) NOT NULL,
  `periodTo` tinyint(4) NOT NULL,
  `amountAllocated` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `wakaf`
--


--
-- Table structure for table `wakaf_acrual`
--

CREATE TABLE `wakaf_acrual` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `salesAccountID` int(11) NOT NULL,
  `from` date NOT NULL,
  `to` date NOT NULL,
  `wakafPercent` decimal(10,0) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `wakaf_acrual`
--


--
-- Table structure for table `wakaf_beneficiaries`
--

CREATE TABLE `wakaf_beneficiaries` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `shortName` varchar(12) NOT NULL DEFAULT '0',
  `name` varchar(128) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` int(11) NOT NULL,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;

--
-- Dumping data for table `wakaf_beneficiaries`
--


--
-- Table structure for table `wakaf_center`
--

CREATE TABLE `wakaf_center` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `shortName` varchar(12) NOT NULL DEFAULT '0',
  `name` varchar(128) NOT NULL,
  `line1` varchar(128) NOT NULL,
  `line2` varchar(128) NOT NULL,
  `line3` varchar(128) NOT NULL,
  `city` varchar(64) NOT NULL,
  `postCode` varchar(8) NOT NULL,
  `stateID` int(11) NOT NULL,
  `countryID` int(11) NOT NULL,
  `noTel` varchar(50) NOT NULL,
  `noFax` varchar(50) NOT NULL,
  `email` varchar(128) NOT NULL,
  `website` varchar(128) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` int(11) NOT NULL,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(16) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;

--
-- Dumping data for table `wakaf_center`
--

INSERT INTO `wakaf_center` VALUES (1,'MAIPS','Baitulmal Unit Wakaf, Majlis Agama Islam dan Adat Istiadat Melayu Perlis','A2,','Taman Pengkalan Asam,','Jalan Kangar- Alor Setar','Kangar','01000',1928,458,'','','','','2015-06-09 08:47:08',0,0,'0000-00-00 00:00:00',0),(2,'MAIKS','Bahagian Wakaf, Majlis Agama Islam Negeri Kedah','','Bangunan Wan Mat Saman','','Alor Setar','05000',1923,458,'','','','','2015-06-09 08:47:08',0,0,'0000-00-00 00:00:00',0),(3,'MAINPP','Bahagian Wakaf, Majlis Agama Islam Pulau Pinang','Tingkat 8 & 9','Menara UMNO,','128 Jalan Macalister','','10400',1929,458,'','','','','2015-06-09 08:47:08',0,0,'0000-00-00 00:00:00',0),(4,'MAIAMP','Majlis Agama Islam dan Adat Melayu Perak','Tingkat 1','Kompleks Islam Darul Ridzuan,','Jalan Panglima BUkit Gantang Wahab','Ipoh','30000',0,458,'034567894','','','','2015-06-09 08:47:08',0,1,'0000-00-00 00:00:00',0),(5,'MAIWP','Bahagian Baitulmal Majlis Agama Islam Wilayah Persekutuan ','Bangunan Daruzzakah Lorong Haji Hussein 2 ','','',' KUALA LUMPUR','50676',1933,458,'603-2617 5222','603-2617 5252','baitulmal@maiwp.gov.my','http://www.maiwp.gov.my/','2015-06-09 08:47:08',0,16,'0000-00-00 00:00:00',0),(6,'MAIS(PWS)','Perbadanan Wakaf Selangor Majlis Agama Islam Selangor','Tingkat 10 Menara Selatan,',' Bangunan Sultan Idris Shah','','Shah Alam',' 40000 ',1931,458,'603-5514 3758 / 3759','603-5514 3759','wakaf@wakafselangor.gov.my','www.wakafselangor.gov.my','2015-06-09 08:47:08',0,16,'0000-00-00 00:00:00',0),(7,'MAIM','Majlis Agama Islam Melaka','Pusat Islam Melaka ','Bukit Palah','','Melaka','75400 ',1924,458,'606-283 7416, 283 2077, 284 9809','606-282 6033','admin@maim.gov.my','www.maim.gov.my','2015-06-09 08:47:08',0,16,'0000-00-00 00:00:00',0),(8,'MAIJ','Pejabat Wakaf Majlis Agama Islam Negeri Johor','Jalan Abdul Rahman Andak','','','Johor Bahru','80100',1921,458,'607-2221655','607-2221677','wakaf@maij.gov.my','www.maij.gov.my','2015-06-09 08:47:08',0,16,'0000-00-00 00:00:00',0),(9,'MAIK','Majlis Agama Islam Dan Adat Istiadat Melayu Kelantan','Kompleks Balai Islam  Lundang','','','Kota Bharu','15200',1923,458,'609-7481512 ','609-7485512','maik@e-maik.my','www.e-maik.my','2015-06-09 08:47:08',0,16,'0000-00-00 00:00:00',0),(10,'MAIDAM','Majlis Agama Islam dan Adat Melayu Terengganu','Pusat Pentadbiran Islam Negeri','Kompleks Seri Iman','Jalan Sultan Mohamad','Kuala Terengganu','20676 ',1932,458,'609-6303030 / 6252525','609-6248134 / 6235185',' info@maidam.gov.my','www.maidam.gov.my','2015-06-09 08:47:08',0,16,'0000-00-00 00:00:00',0),(11,'MUIP','Majlis Ugama Islam Dan Adat Resam Melayu Pahang','Kompleks Islam Sultan Haji Ahmad Shah',' Jalan Istana Permai','',' Pekan','26600',1926,458,'609-4221311','609-4221885','info@muip.gov.my','www.muip.gov.my','2015-06-09 08:47:08',0,16,'0000-00-00 00:00:00',0),(12,'TBS','Tabung Baitulmal Majlis Islam Sarawak','Tabung Baitulmal Sarawak Bangunan Baitulmal',' Lot 71, Seksyen 8, KTLD',' Jalan Haji Muhamad Kassim','Kuching','93400 ',1930,458,' 6082-415563',' 6082-253786','','www.tbs.org.my','2015-06-09 08:47:08',0,16,'0000-00-00 00:00:00',0),(13,'MUIS','Pusat Zakat Sabah Majlis Ugama Islam Sabah','Tingkat 1, Blok A & B','Wisma MUIS','Peti Surat 11666','Kota Kibabalu','88818',1935,458,'6088-240 160','6088-260 246','','www.zakat@sabah.gov.my','2015-06-09 08:47:08',0,16,'0000-00-00 00:00:00',0),(14,'JWM','Yayasan Waqaf Malaysia','No. 13, Jalan Diplomatik 2/2','Presint Diplomatik Putrajaya','',' Putrajaya',' 62050',0,458,'603-8890 4071 / 72 / 73','603-8890 1010 / 2091',' info@ywm.gov.my','www.ywm.gov.my','2015-06-09 08:47:08',0,29,'0000-00-00 00:00:00',0);

--
-- Table structure for table `wakaf_details_allocation`
--

CREATE TABLE `wakaf_details_allocation` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `wakafID` varchar(64) NOT NULL DEFAULT '0',
  `accountID` int(11) NOT NULL,
  `saleAmount` double NOT NULL,
  `contributionPercentage` double NOT NULL,
  `amount` double NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` int(11) NOT NULL,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;

--
-- Dumping data for table `wakaf_details_allocation`
--


--
-- Table structure for table `wakaf_details_distribution`
--

CREATE TABLE `wakaf_details_distribution` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `wakafID` varchar(64) NOT NULL DEFAULT '0',
  `beneficiariesID` int(11) NOT NULL,
  `description` varchar(128) NOT NULL,
  `contributionPercentage` double NOT NULL,
  `amount` double NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` int(11) NOT NULL,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;

--
-- Dumping data for table `wakaf_details_distribution`
--


--
-- Table structure for table `wakaf_master`
--

CREATE TABLE `wakaf_master` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL DEFAULT '0',
  `waqif` varchar(64) NOT NULL DEFAULT '0',
  `category` varchar(24) NOT NULL,
  `allocationID` int(11) NOT NULL,
  `beneficiariesID` int(11) NOT NULL,
  `description` varchar(128) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` int(11) NOT NULL,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;

--
-- Dumping data for table `wakaf_master`
--


--
-- Table structure for table `zakat_center`
--

CREATE TABLE `zakat_center` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `shortName` varchar(12) NOT NULL DEFAULT '0',
  `name` varchar(128) NOT NULL,
  `line1` varchar(128) NOT NULL,
  `line2` varchar(128) NOT NULL,
  `line3` varchar(128) NOT NULL,
  `city` varchar(64) NOT NULL,
  `postCode` varchar(8) NOT NULL,
  `stateID` int(11) NOT NULL,
  `countryID` int(11) NOT NULL,
  `noTel` varchar(50) NOT NULL,
  `noFax` varchar(50) NOT NULL,
  `email` varchar(128) NOT NULL,
  `website` varchar(128) NOT NULL,
  `is_delete` tinyint(4) NOT NULL DEFAULT '0',
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` int(11) NOT NULL,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;

--
-- Dumping data for table `zakat_center`
--

INSERT INTO `zakat_center` VALUES (1,'LZS','Lembaga Zakat Selangor','3-01-1, Presint ALAMi,','Pusat Perniagaan Worldwide 2, ','Persiaran Akuatik, Seksyen 13, ','Shah Alam','40100',1931,458,'03-5522 7700','03-5522 7722','','http://www.e-zakat.com.my',0,'2015-06-09 08:47:08',1,0,'0000-00-00 00:00:00'),(2,'PPZ','Pusat Pungutan Zakat, Majlis Agama Islam Wilayah Persekutuan','xx','','','Kuala Lumpur','12345678',1933,458,'+603.9289.5757','+603.9289.5758','info@zakat.com.my','http://www.zakat.com.my/',0,'2015-06-09 08:47:08',1,0,'0000-00-00 00:00:00'),(7,'MAIPS','Majlis Agama Islam & Adat Istiadat Melayu Perlis','A2, Taman Pengkalan Asam','Jalan Kangar- Alor Setar','','Kangar','01000',1928,458,'04-9794439','04-9782400','','www.maips.gov.my',0,'2015-06-09 08:47:08',1,0,'0000-00-00 00:00:00'),(8,'JZNK','Jabatan Zakat Negeri Kedah','Jabatan Zakat Negeri Kedah Darulaman Aras 3',' Menara Zakat','Jalan Teluk Wanjah','Alor Setar','05000',1922,458,'04-733 1740','','','',0,'2015-06-09 08:47:08',1,0,'0000-00-00 00:00:00'),(9,'MAIK','Majlis Agama Islam Dan Adat Istiadat Melayu Kelantan','Kompleks Balai Islam Lundang','','','Kota Bharu','15200',1923,458,'09 7481512','09 7485512','maik@e-maik.my','www.e-maik.my',0,'2015-06-09 08:47:08',1,0,'0000-00-00 00:00:00'),(10,'PZM','Pusat Zakat Melaka','No. 1 & 3,Jalan KPAA 1',' Kompleks Perniagaan Al-Azim ','','Bukit Baru','75150',1924,458,'1-300-88-0233','06-2818154','',' www.izakat.com',0,'2015-06-09 08:47:08',1,0,'0000-00-00 00:00:00'),(11,'MAINS','Pusat Zakat Negeri Sembilan','No. 25, Betaria Business Centre','Jalan Durian Emas 4','Off Jalan Dato\' Siamang Gagap','Seremban','70100 ',1925,458,'06-765 1402 ','06-765 1407','info@zakatns.com.my','www.zakatns.com.my',0,'2015-06-09 08:47:08',1,0,'0000-00-00 00:00:00'),(12,'MAIPk',' MAJLIS AGAMA ISLAM DAN ADAT MELAYU PERAK','Tingkat 1, Kompleks Islam Darul Ridzuan','Jalan Panglima BUkit Gantang Wahab','','Ipoh','30000',1927,458,'05-208 400',' 05-241 4257','korporat@maiamp.gov.my','www.maiamp.gov.my',0,'2015-06-09 08:47:08',1,0,'0000-00-00 00:00:00'),(13,'MUIP','Majlis Ugama Islam Dan Adat Resam Melayu Pahang','No.111A, Tingkat 1 ','Bangunan MUIP','Jalan Mahkota','Kuantan','25000 ',1926,458,'09-5131515',' 09-5152541','info@muip.gov.my','www.zakatpahang.my/v2',0,'2015-06-09 08:47:08',1,0,'0000-00-00 00:00:00'),(14,'ZPP','Zakat Pulau Pinang','No.4 Jalan Perda Selatan','Bandar Perda','','Bukit Mertajam','14000 ',1929,458,'04-549 8088','04 530 6466','admin@zakatpenang.com','www.zakatpenang.com',0,'2015-06-09 08:47:08',1,0,'0000-00-00 00:00:00'),(15,'MAIDAM','Majlis Agama Islam dan Adat Melayu Terengganu','Pusat Pentadbiran Islam Negeri','Kompleks Seri Iman',' Jalan Sultan Mohamad',' Kuala Terengganu','20676 ',1932,458,'09-6303030 / 09-6252525','09-6248134 / 09-6235185','info@maidam.gov.my','www.maidam.gov.my',0,'2015-06-09 08:47:08',1,0,'0000-00-00 00:00:00'),(16,'MUIS','Pusat Zakat Sabah','Tingkat 1, Blok A & B','Wisma MUIS','Peti Surat 11666','Kota Kinabalu','88818 ',1935,458,'088-240 160','088-260 246','www.zakat@sabah.gov.my','www.zakat.sabah.gov.my',0,'2015-06-09 08:47:08',1,0,'0000-00-00 00:00:00'),(17,'TBS','Tabung Baitulmal Sarawak','Bangunan Baitulmal','Lot 71, Seksyen 8, KTLD','Jalan Haji Muhamad Kassim','Kuching','93400 ',1930,458,'082-415563','082-253786','admin@tbs.org.my','www.tbs.org.my',0,'2015-06-09 08:47:08',1,0,'0000-00-00 00:00:00'),(18,'MAIJ','Majlis Agama Islam Negeri Johor','Aras 5, Blok ‘B’, Pusat Islam Iskandar Johor',' Jalan Masjid Abu Bakar','Karung Berkunci 725',' Johor Bahru','80990',1921,458,'07-2282929 / 07-2282937','07-2238752 / 07-2275173','zakat@maij.gov.my','www.maij.gov.my',0,'2015-06-09 08:47:08',1,0,'0000-00-00 00:00:00');

--
-- Table structure for table `zakat_details`
--

CREATE TABLE `zakat_details` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `zakatSummaryID` int(11) NOT NULL,
  `compAcctDetailID` int(11) NOT NULL,
  `acctGroup` varchar(64) DEFAULT NULL,
  `desc` varchar(64) DEFAULT NULL,
  `amount` double DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

--
-- Dumping data for table `zakat_details`
--


--
-- Table structure for table `zakat_group`
--

CREATE TABLE `zakat_group` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL DEFAULT '1',
  `name` varchar(50) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `parentID` int(11) DEFAULT '0',
  `sequence` int(11) DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

--
-- Dumping data for table `zakat_group`
--


--
-- Table structure for table `zakat_group_details`
--

CREATE TABLE `zakat_group_details` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL DEFAULT '1',
  `groupID` int(11) DEFAULT NULL,
  `acctID` int(11) DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

--
-- Dumping data for table `zakat_group_details`
--


--
-- Table structure for table `zakat_nisab`
--

CREATE TABLE `zakat_nisab` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL DEFAULT '0',
  `centerID` int(11) DEFAULT NULL,
  `year` year(4) DEFAULT NULL,
  `nisab` double DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

--
-- Dumping data for table `zakat_nisab`
--


--
-- Table structure for table `zakat_summary`
--

CREATE TABLE `zakat_summary` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL DEFAULT '1',
  `centerID` int(11) NOT NULL DEFAULT '1',
  `year` varchar(4) DEFAULT NULL,
  `calculationMethod` varchar(32) NOT NULL,
  `muslimOwnershipShare` double NOT NULL,
  `nisab` double NOT NULL,
  `netCurrentAsset` double NOT NULL,
  `totalDueForZakat` double NOT NULL,
  `zakatPayableForTheYear` double NOT NULL,
  `monthlyZakatPayable` double NOT NULL,
  `totalAmount` double DEFAULT NULL,
  `totalZakatPaid` double DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` int(11) NOT NULL DEFAULT '0',
  `updateAble` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

--
-- Dumping data for table `zakat_summary`
--


--
-- Final view structure for view `view_account_balance`
--

/*!50001 DROP VIEW IF EXISTS `view_account_balance`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_account_balance` AS select `a`.`companyID` AS `companyID`,`a`.`acctID` AS `acctID`,concat(left(`b`.`acctCode`,4),'-',substr(`b`.`acctCode`,4,3),'-',right(`b`.`acctCode`,2),' ',`b`.`acctName`) AS `acctName`,`a`.`year` AS `year`,`a`.`period` AS `period`,sum(`a`.`total`) AS `closing` from (`comp_acc_det` `a` join `comp_chart_of_acct` `b`) where (`b`.`ID` = `a`.`acctID`) group by `a`.`companyID`,`a`.`acctID`,`b`.`acctName`,`a`.`year`,`a`.`period` */;

--
-- Final view structure for view `view_ar_inventory`
--

/*!50001 DROP VIEW IF EXISTS `view_ar_inventory`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_ar_inventory` AS select `comp_sales_invoice`.`companyID` AS `companyID`,`comp_sales_invoice`.`customerID` AS `customerID`,concat(`comp_sales_invoice`.`formNo`,'[',convert(lpad(`comp_sales_invoice`.`serialNo`,8,'0') using latin1),']') AS `formNo`,`comp_sales_invoice`.`salesInvoiceDate` AS `salesinvoiceDate`,`comp_sales_invoice`.`totalReceivable` AS `totalReceivable` from `comp_sales_invoice` where (`comp_sales_invoice`.`totalReceivable` > 0) */;

--
-- Final view structure for view `view_ar_open_position`
--

/*!50001 DROP VIEW IF EXISTS `view_ar_open_position`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_ar_open_position` AS select `a`.`companyID` AS `companyID`,`a`.`ID` AS `customerID`,`a`.`customerName` AS `customerName`,`a`.`phoneNumber1` AS `phoneNumber1`,`a`.`email` AS `email`,(select sum(`inv`.`totalReceivable`) from (`comp_sales_invoice` `inv` join `terms`) where ((`inv`.`termsID` = `terms`.`ID`) and (`inv`.`companyID` = `a`.`companyID`) and (`inv`.`customerID` = `a`.`ID`) and ((timestampdiff(DAY,`inv`.`salesInvoiceDate`,now()) - `terms`.`dueDays`) <= -(90)))) AS `due120`,(select sum(`inv`.`totalReceivable`) from (`comp_sales_invoice` `inv` join `terms`) where ((`inv`.`termsID` = `terms`.`ID`) and (`inv`.`companyID` = `a`.`companyID`) and (`inv`.`customerID` = `a`.`ID`) and ((timestampdiff(DAY,`inv`.`salesInvoiceDate`,now()) - `terms`.`dueDays`) > -(90)) and ((timestampdiff(DAY,`inv`.`salesInvoiceDate`,now()) - `terms`.`dueDays`) <= -(60)))) AS `due90`,(select sum(`inv`.`totalReceivable`) from (`comp_sales_invoice` `inv` join `terms`) where ((`inv`.`termsID` = `terms`.`ID`) and (`inv`.`companyID` = `a`.`companyID`) and (`inv`.`customerID` = `a`.`ID`) and ((timestampdiff(DAY,`inv`.`salesInvoiceDate`,now()) - `terms`.`dueDays`) > -(60)) and ((timestampdiff(DAY,`inv`.`salesInvoiceDate`,now()) - `terms`.`dueDays`) <= -(30)))) AS `due60`,(select sum(`inv`.`totalReceivable`) from (`comp_sales_invoice` `inv` join `terms`) where ((`inv`.`termsID` = `terms`.`ID`) and (`inv`.`companyID` = `a`.`companyID`) and (`inv`.`customerID` = `a`.`ID`) and ((timestampdiff(DAY,`inv`.`salesInvoiceDate`,now()) - `terms`.`dueDays`) > -(30)) and ((timestampdiff(DAY,`inv`.`salesInvoiceDate`,now()) - `terms`.`dueDays`) <= -(5)))) AS `due30`,(select sum(`inv`.`totalReceivable`) from (`comp_sales_invoice` `inv` join `terms`) where ((`inv`.`termsID` = `terms`.`ID`) and (`inv`.`companyID` = `a`.`companyID`) and (`inv`.`customerID` = `a`.`ID`) and ((timestampdiff(DAY,`inv`.`salesInvoiceDate`,now()) - `terms`.`dueDays`) > -(5)) and ((timestampdiff(DAY,`inv`.`salesInvoiceDate`,now()) - `terms`.`dueDays`) <= 5))) AS `due0`,(select sum(`inv`.`totalReceivable`) from (`comp_sales_invoice` `inv` join `terms`) where ((`inv`.`termsID` = `terms`.`ID`) and (`inv`.`companyID` = `a`.`companyID`) and (`inv`.`customerID` = `a`.`ID`) and ((timestampdiff(DAY,`inv`.`salesInvoiceDate`,now()) - `terms`.`dueDays`) > 5) and ((timestampdiff(DAY,`inv`.`salesInvoiceDate`,now()) - `terms`.`dueDays`) <= 30))) AS `pastDue30`,(select sum(`inv`.`totalReceivable`) from (`comp_sales_invoice` `inv` join `terms`) where ((`inv`.`termsID` = `terms`.`ID`) and (`inv`.`companyID` = `a`.`companyID`) and (`inv`.`customerID` = `a`.`ID`) and ((timestampdiff(DAY,`inv`.`salesInvoiceDate`,now()) - `terms`.`dueDays`) > 30) and ((timestampdiff(DAY,`inv`.`salesInvoiceDate`,now()) - `terms`.`dueDays`) <= 60))) AS `pastDue60`,(select sum(`inv`.`totalReceivable`) from (`comp_sales_invoice` `inv` join `terms`) where ((`inv`.`termsID` = `terms`.`ID`) and (`inv`.`companyID` = `a`.`companyID`) and (`inv`.`customerID` = `a`.`ID`) and ((timestampdiff(DAY,`inv`.`salesInvoiceDate`,now()) - `terms`.`dueDays`) > 60) and ((timestampdiff(DAY,`inv`.`salesInvoiceDate`,now()) - `terms`.`dueDays`) <= 90))) AS `pastDue90`,(select sum(`inv`.`totalReceivable`) from (`comp_sales_invoice` `inv` join `terms`) where ((`inv`.`termsID` = `terms`.`ID`) and (`inv`.`companyID` = `a`.`companyID`) and (`inv`.`customerID` = `a`.`ID`) and ((timestampdiff(DAY,`inv`.`salesInvoiceDate`,now()) - `terms`.`dueDays`) > 90) and ((timestampdiff(DAY,`inv`.`salesInvoiceDate`,now()) - `terms`.`dueDays`) <= 120))) AS `pastDue120`,(select sum(`inv`.`totalReceivable`) from (`comp_sales_invoice` `inv` join `terms`) where ((`inv`.`termsID` = `terms`.`ID`) and (`inv`.`companyID` = `a`.`companyID`) and (`inv`.`customerID` = `a`.`ID`) and ((timestampdiff(DAY,`inv`.`salesInvoiceDate`,now()) - `terms`.`dueDays`) > 120))) AS `pastDue` from `customer` `a` */;

--
-- Final view structure for view `view_balance_sheet`
--

/*!50001 DROP VIEW IF EXISTS `view_balance_sheet`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_balance_sheet` AS select `a`.`acctCode` AS `acctCode`,`a`.`acctName` AS `acctName`,`a`.`acctGroupID` AS `acctGroupID`,sum(`b`.`amountdr`) AS `currentyeardebit`,sum(`b`.`amountcr`) AS `currentyearcredit`,sum(`c`.`amountdr`) AS `lastyeardebit`,sum(`c`.`amountcr`) AS `lastyearcredit` from ((`comp_chart_of_acct` `a` left join `comp_acc_det` `b` on(((`b`.`acctID` = `a`.`ID`) and (`b`.`year` = 2014) and (`b`.`period` <= 9)))) left join `comp_acc_det` `c` on(((`c`.`acctID` = `a`.`ID`) and (`c`.`year` < 2014)))) where (`a`.`companyID` = '110') group by `a`.`acctCode` */;

--
-- Final view structure for view `view_bank_reconcile`
--

/*!50001 DROP VIEW IF EXISTS `view_bank_reconcile`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_bank_reconcile` AS select `a`.`ID` AS `ID`,`a`.`companyID` AS `companyid`,'comp_journal_detail' AS `tableName`,`b`.`ID` AS `bankid`,(select max(`view_journal_table`.`referenceNo`) AS `referenceNo` from `view_journal_table` where ((`view_journal_table`.`journalID` = `a`.`journalID`) and (`view_journal_table`.`companyID` = `a`.`companyID`))) AS `referenceNo`,`c`.`effective_date` AS `transDate`,`a`.`journalID` AS `formNo`,`a`.`description` AS `description`,`a`.`amount_dr` AS `debitAmount`,`a`.`amount_cr` AS `creditAmount` from ((`comp_journal_detail` `a` left join `comp_bank` `b` on((`a`.`acctCode` = `b`.`linkAccountID`))) left join `comp_journal` `c` on(((`c`.`journalID` = `a`.`journalID`) and (`c`.`companyID` = `a`.`companyID`)))) where ((`a`.`bankReconcileID` = 0) and (`c`.`status` = 1)) */;

--
-- Final view structure for view `view_bank_reconcile_reverse`
--

/*!50001 DROP VIEW IF EXISTS `view_bank_reconcile_reverse`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_bank_reconcile_reverse` AS select `a`.`bankReconcileID` AS `bankReconcileID`,`a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,'comp_cash_sales' AS `tableName`,`a`.`bankID` AS `bankID`,`a`.`referenceNo` AS `referenceNo`,`a`.`salesInvoiceDate` AS `transDate`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `formNo`,`a`.`paymentFrom` AS `description`,`a`.`totalAmountIncludeTax` AS `debitAmount`,0 AS `creditAmount` from `comp_cash_sales` `a` where (`a`.`bankReconcileID` <> 0) union select `a`.`bankReconcileID` AS `bankReconcileID`,`a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,'comp_receive_payment' AS `tableName`,`a`.`bankID` AS `bankID`,`a`.`referenceNo` AS `referenceNo`,`a`.`receivePaymentDate` AS `transDate`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `formNo`,`b`.`customerName` AS `description`,`a`.`totalReceived` AS `debitAmount`,0 AS `creditAmount` from (`comp_receive_payment` `a` join `customer` `b`) where ((`a`.`bankReconcileID` <> 0) and (`a`.`customerID` = `b`.`ID`)) union select `a`.`bankReconcileID` AS `bankReconcileID`,`a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,'comp_receive_payment_others' AS `tableName`,`a`.`bankID` AS `bankID`,`a`.`referenceNo` AS `referenceNo`,`a`.`receivePaymentDate` AS `transDate`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `formNo`,`a`.`receiveFrom` AS `description`,`a`.`totalReceived` AS `debitAmount`,0 AS `creditAmount` from `comp_receive_payment_others` `a` where (`a`.`bankReconcileID` <> 0) union select `a`.`bankReconcileID` AS `bankReconcileID`,`a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,'comp_receive_payment_others' AS `tableName`,`a`.`bankID` AS `bankID`,`a`.`referenceNo` AS `referenceNo`,`a`.`receivePaymentDate` AS `transDate`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `formNo`,`a`.`receiveFrom` AS `description`,`a`.`totalReceived` AS `debitAmount`,0 AS `creditAmount` from `comp_receive_payment_others` `a` where (`a`.`bankReconcileID` <> 0) union select `a`.`bankReconcileID` AS `bankReconcileID`,`a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,'comp_payment' AS `tableName`,`a`.`bankID` AS `bankID`,`a`.`referenceNo` AS `referenceNo`,`a`.`paymentDate` AS `transDate`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `formNo`,`b`.`supplierName` AS `description`,0 AS `debitAmount`,`a`.`totalPaid` AS `creditAmount` from (`comp_payment` `a` join `supplier` `b`) where ((`a`.`bankReconcileID` <> 0) and (`a`.`supplierID` = `b`.`ID`)) union select `a`.`bankReconcileID` AS `bankReconcileID`,`a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,'comp_payment_others' AS `tableName`,`a`.`bankId` AS `bankID`,`a`.`referenceNo` AS `referenceNo`,`a`.`paymentDate` AS `transDate`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `formNo`,`a`.`payTo` AS `description`,0 AS `debitAmount`,`a`.`amountPaid` AS `creditAmount` from `comp_payment_others` `a` where (`a`.`bankReconcileID` <> 0) */;

--
-- Final view structure for view `view_chart_of_acct_updateable`
--

/*!50001 DROP VIEW IF EXISTS `view_chart_of_acct_updateable`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_chart_of_acct_updateable` AS select `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,`a`.`acctGroupID` AS `acctGroupID`,`a`.`acctCode` AS `acctCode`,`a`.`acctName` AS `acctName`,`a`.`acctDesc` AS `acctDesc`,if((((select count(`comp_journal_detail`.`ID`) from `comp_journal_detail` where (`comp_journal_detail`.`acctCode` = `a`.`ID`)) + (select count(`comp_opening_balance`.`ID`) from `comp_opening_balance` where ((`comp_opening_balance`.`accountID` = `a`.`ID`) and ((`comp_opening_balance`.`debit` + `comp_opening_balance`.`credit`) > 0)))) > 0),10,1) AS `updateable` from `comp_chart_of_acct` `a` */;

--
-- Final view structure for view `view_comp_acc_det`
--

/*!50001 DROP VIEW IF EXISTS `view_comp_acc_det`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_comp_acc_det` AS select `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,`a`.`acctGroupID` AS `acctGroupID`,`a`.`acctID` AS `acctID`,`a`.`year` AS `year`,`a`.`period` AS `period`,(select coalesce(sum(`comp_journal_detail`.`amount_dr`),0) from `comp_journal_detail` where ((`comp_journal_detail`.`companyID` = `a`.`companyID`) and (`comp_journal_detail`.`acctCode` = `a`.`acctID`) and (`comp_journal_detail`.`period` = `a`.`period`) and (`comp_journal_detail`.`year` = `a`.`year`) and (`comp_journal_detail`.`status` = 1) and (`comp_journal_detail`.`is_delete` = 0))) AS `amountdr`,(select coalesce(sum(`comp_journal_detail`.`amount_cr`),0) from `comp_journal_detail` where ((`comp_journal_detail`.`companyID` = `a`.`companyID`) and (`comp_journal_detail`.`acctCode` = `a`.`acctID`) and (`comp_journal_detail`.`period` = `a`.`period`) and (`comp_journal_detail`.`year` = `a`.`year`) and (`comp_journal_detail`.`status` = 1) and (`comp_journal_detail`.`is_delete` = 0))) AS `amountcr`,(select (coalesce(sum(`comp_journal_detail`.`amount_dr`),0) - coalesce(sum(`comp_journal_detail`.`amount_cr`),0)) from `comp_journal_detail` where ((`comp_journal_detail`.`companyID` = `a`.`companyID`) and (`comp_journal_detail`.`acctCode` = `a`.`acctID`) and (`comp_journal_detail`.`period` = `a`.`period`) and (`comp_journal_detail`.`year` = `a`.`year`) and (`comp_journal_detail`.`status` = 1) and (`comp_journal_detail`.`is_delete` = 0))) AS `total`,`a`.`createdBy` AS `createdBy`,`a`.`createdTS` AS `createdTS`,`a`.`updatedBy` AS `updatedBy`,`a`.`updatedTS` AS `updatedTS`,`a`.`is_delete` AS `is_delete` from `comp_acc_det` `a` where ((`a`.`companyID` > 0) and (`a`.`acctID` > 0) and (`a`.`year` > 0) and (`a`.`period` > 0)) */;

--
-- Final view structure for view `view_customer_aging`
--

/*!50001 DROP VIEW IF EXISTS `view_customer_aging`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_customer_aging` AS select `a`.`companyID` AS `companyID`,`a`.`ID` AS `customerID`,`a`.`customerName` AS `customerName`,`a`.`phoneNumber1` AS `phoneNumber1`,`a`.`email` AS `email`,((ifnull((select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) = 0) and (`comp_sales_invoice`.`updateAble` = 0) and (`comp_sales_invoice`.`is_delete` = 0))),0) + ifnull((select sum(`comp_sales_debitnote`.`total`) from `comp_sales_debitnote` where ((`comp_sales_debitnote`.`companyID` = `a`.`companyID`) and (`comp_sales_debitnote`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_debitnote`.`debitNoteDate`,now()) = 0) and (`comp_sales_debitnote`.`updateAble` = 0) and (`comp_sales_debitnote`.`is_delete` = 0))),0)) + ifnull((select sum(`comp_historical_customer_invoice`.`totalReceivable`) from `comp_historical_customer_invoice` where ((`comp_historical_customer_invoice`.`companyID` = `a`.`companyID`) and (`comp_historical_customer_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_historical_customer_invoice`.`salesInvoiceDate`,now()) = 0) and (`comp_historical_customer_invoice`.`updateAble` = 0) and (`comp_historical_customer_invoice`.`is_delete` = 0))),0)) AS `current`,((ifnull((select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) = 1) and (`comp_sales_invoice`.`updateAble` = 0) and (`comp_sales_invoice`.`is_delete` = 0))),0) + ifnull((select sum(`comp_sales_debitnote`.`total`) from `comp_sales_debitnote` where ((`comp_sales_debitnote`.`companyID` = `a`.`companyID`) and (`comp_sales_debitnote`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_debitnote`.`debitNoteDate`,now()) = 1) and (`comp_sales_debitnote`.`updateAble` = 0) and (`comp_sales_debitnote`.`is_delete` = 0))),0)) + ifnull((select sum(`comp_historical_customer_invoice`.`totalReceivable`) from `comp_historical_customer_invoice` where ((`comp_historical_customer_invoice`.`companyID` = `a`.`companyID`) and (`comp_historical_customer_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_historical_customer_invoice`.`salesInvoiceDate`,now()) = 1) and (`comp_historical_customer_invoice`.`updateAble` = 0) and (`comp_historical_customer_invoice`.`is_delete` = 0))),0)) AS `month1`,((ifnull((select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) = 2) and (`comp_sales_invoice`.`updateAble` = 0) and (`comp_sales_invoice`.`is_delete` = 0))),0) + ifnull((select sum(`comp_sales_debitnote`.`total`) from `comp_sales_debitnote` where ((`comp_sales_debitnote`.`companyID` = `a`.`companyID`) and (`comp_sales_debitnote`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_debitnote`.`debitNoteDate`,now()) = 2) and (`comp_sales_debitnote`.`updateAble` = 0) and (`comp_sales_debitnote`.`is_delete` = 0))),0)) + ifnull((select sum(`comp_historical_customer_invoice`.`totalReceivable`) from `comp_historical_customer_invoice` where ((`comp_historical_customer_invoice`.`companyID` = `a`.`companyID`) and (`comp_historical_customer_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_historical_customer_invoice`.`salesInvoiceDate`,now()) = 2) and (`comp_historical_customer_invoice`.`updateAble` = 0) and (`comp_historical_customer_invoice`.`is_delete` = 0))),0)) AS `month2`,((ifnull((select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) = 3) and (`comp_sales_invoice`.`updateAble` = 0) and (`comp_sales_invoice`.`is_delete` = 0))),0) + ifnull((select sum(`comp_sales_debitnote`.`total`) from `comp_sales_debitnote` where ((`comp_sales_debitnote`.`companyID` = `a`.`companyID`) and (`comp_sales_debitnote`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_debitnote`.`debitNoteDate`,now()) = 3) and (`comp_sales_debitnote`.`updateAble` = 0) and (`comp_sales_debitnote`.`is_delete` = 0))),0)) + ifnull((select sum(`comp_historical_customer_invoice`.`totalReceivable`) from `comp_historical_customer_invoice` where ((`comp_historical_customer_invoice`.`companyID` = `a`.`companyID`) and (`comp_historical_customer_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_historical_customer_invoice`.`salesInvoiceDate`,now()) = 3) and (`comp_historical_customer_invoice`.`updateAble` = 0) and (`comp_historical_customer_invoice`.`is_delete` = 0))),0)) AS `month3`,((ifnull((select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) = 4) and (`comp_sales_invoice`.`updateAble` = 0) and (`comp_sales_invoice`.`is_delete` = 0))),0) + ifnull((select sum(`comp_sales_debitnote`.`total`) from `comp_sales_debitnote` where ((`comp_sales_debitnote`.`companyID` = `a`.`companyID`) and (`comp_sales_debitnote`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_debitnote`.`debitNoteDate`,now()) = 4) and (`comp_sales_debitnote`.`updateAble` = 0) and (`comp_sales_debitnote`.`is_delete` = 0))),0)) + ifnull((select sum(`comp_historical_customer_invoice`.`totalReceivable`) from `comp_historical_customer_invoice` where ((`comp_historical_customer_invoice`.`companyID` = `a`.`companyID`) and (`comp_historical_customer_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_historical_customer_invoice`.`salesInvoiceDate`,now()) = 4) and (`comp_historical_customer_invoice`.`updateAble` = 0) and (`comp_historical_customer_invoice`.`is_delete` = 0))),0)) AS `month4`,((ifnull((select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) = 5) and (`comp_sales_invoice`.`updateAble` = 0) and (`comp_sales_invoice`.`is_delete` = 0))),0) + ifnull((select sum(`comp_sales_debitnote`.`total`) from `comp_sales_debitnote` where ((`comp_sales_debitnote`.`companyID` = `a`.`companyID`) and (`comp_sales_debitnote`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_debitnote`.`debitNoteDate`,now()) = 5) and (`comp_sales_debitnote`.`updateAble` = 0) and (`comp_sales_debitnote`.`is_delete` = 0))),0)) + ifnull((select sum(`comp_historical_customer_invoice`.`totalReceivable`) from `comp_historical_customer_invoice` where ((`comp_historical_customer_invoice`.`companyID` = `a`.`companyID`) and (`comp_historical_customer_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_historical_customer_invoice`.`salesInvoiceDate`,now()) = 5) and (`comp_historical_customer_invoice`.`updateAble` = 0) and (`comp_historical_customer_invoice`.`is_delete` = 0))),0)) AS `month5`,((ifnull((select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) = 6) and (`comp_sales_invoice`.`updateAble` = 0) and (`comp_sales_invoice`.`is_delete` = 0))),0) + ifnull((select sum(`comp_sales_debitnote`.`total`) from `comp_sales_debitnote` where ((`comp_sales_debitnote`.`companyID` = `a`.`companyID`) and (`comp_sales_debitnote`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_debitnote`.`debitNoteDate`,now()) = 6) and (`comp_sales_debitnote`.`updateAble` = 0) and (`comp_sales_debitnote`.`is_delete` = 0))),0)) + ifnull((select sum(`comp_historical_customer_invoice`.`totalReceivable`) from `comp_historical_customer_invoice` where ((`comp_historical_customer_invoice`.`companyID` = `a`.`companyID`) and (`comp_historical_customer_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_historical_customer_invoice`.`salesInvoiceDate`,now()) = 6) and (`comp_historical_customer_invoice`.`updateAble` = 0) and (`comp_historical_customer_invoice`.`is_delete` = 0))),0)) AS `month6`,((ifnull((select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) = 7) and (`comp_sales_invoice`.`updateAble` = 0) and (`comp_sales_invoice`.`is_delete` = 0))),0) + ifnull((select sum(`comp_sales_debitnote`.`total`) from `comp_sales_debitnote` where ((`comp_sales_debitnote`.`companyID` = `a`.`companyID`) and (`comp_sales_debitnote`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_debitnote`.`debitNoteDate`,now()) = 7) and (`comp_sales_debitnote`.`updateAble` = 0) and (`comp_sales_debitnote`.`is_delete` = 0))),0)) + ifnull((select sum(`comp_historical_customer_invoice`.`totalReceivable`) from `comp_historical_customer_invoice` where ((`comp_historical_customer_invoice`.`companyID` = `a`.`companyID`) and (`comp_historical_customer_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_historical_customer_invoice`.`salesInvoiceDate`,now()) = 7) and (`comp_historical_customer_invoice`.`updateAble` = 0) and (`comp_historical_customer_invoice`.`is_delete` = 0))),0)) AS `month7`,((ifnull((select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) = 8) and (`comp_sales_invoice`.`updateAble` = 0) and (`comp_sales_invoice`.`is_delete` = 0))),0) + ifnull((select sum(`comp_sales_debitnote`.`total`) from `comp_sales_debitnote` where ((`comp_sales_debitnote`.`companyID` = `a`.`companyID`) and (`comp_sales_debitnote`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_debitnote`.`debitNoteDate`,now()) = 8) and (`comp_sales_debitnote`.`updateAble` = 0) and (`comp_sales_debitnote`.`is_delete` = 0))),0)) + ifnull((select sum(`comp_historical_customer_invoice`.`totalReceivable`) from `comp_historical_customer_invoice` where ((`comp_historical_customer_invoice`.`companyID` = `a`.`companyID`) and (`comp_historical_customer_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_historical_customer_invoice`.`salesInvoiceDate`,now()) = 8) and (`comp_historical_customer_invoice`.`updateAble` = 0) and (`comp_historical_customer_invoice`.`is_delete` = 0))),0)) AS `month8`,((ifnull((select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) = 9) and (`comp_sales_invoice`.`updateAble` = 0) and (`comp_sales_invoice`.`is_delete` = 0))),0) + ifnull((select sum(`comp_sales_debitnote`.`total`) from `comp_sales_debitnote` where ((`comp_sales_debitnote`.`companyID` = `a`.`companyID`) and (`comp_sales_debitnote`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_debitnote`.`debitNoteDate`,now()) = 9) and (`comp_sales_debitnote`.`updateAble` = 0) and (`comp_sales_debitnote`.`is_delete` = 0))),0)) + ifnull((select sum(`comp_historical_customer_invoice`.`totalReceivable`) from `comp_historical_customer_invoice` where ((`comp_historical_customer_invoice`.`companyID` = `a`.`companyID`) and (`comp_historical_customer_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_historical_customer_invoice`.`salesInvoiceDate`,now()) = 9) and (`comp_historical_customer_invoice`.`updateAble` = 0) and (`comp_historical_customer_invoice`.`is_delete` = 0))),0)) AS `month9`,((ifnull((select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) = 10) and (`comp_sales_invoice`.`updateAble` = 0) and (`comp_sales_invoice`.`is_delete` = 0))),0) + ifnull((select sum(`comp_sales_debitnote`.`total`) from `comp_sales_debitnote` where ((`comp_sales_debitnote`.`companyID` = `a`.`companyID`) and (`comp_sales_debitnote`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_debitnote`.`debitNoteDate`,now()) = 10) and (`comp_sales_debitnote`.`updateAble` = 0) and (`comp_sales_debitnote`.`is_delete` = 0))),0)) + ifnull((select sum(`comp_historical_customer_invoice`.`totalReceivable`) from `comp_historical_customer_invoice` where ((`comp_historical_customer_invoice`.`companyID` = `a`.`companyID`) and (`comp_historical_customer_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_historical_customer_invoice`.`salesInvoiceDate`,now()) = 10) and (`comp_historical_customer_invoice`.`updateAble` = 0) and (`comp_historical_customer_invoice`.`is_delete` = 0))),0)) AS `month10`,((ifnull((select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) > 10) and (`comp_sales_invoice`.`updateAble` = 0) and (`comp_sales_invoice`.`is_delete` = 0))),0) + ifnull((select sum(`comp_sales_debitnote`.`total`) from `comp_sales_debitnote` where ((`comp_sales_debitnote`.`companyID` = `a`.`companyID`) and (`comp_sales_debitnote`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_debitnote`.`debitNoteDate`,now()) > 10) and (`comp_sales_debitnote`.`updateAble` = 0) and (`comp_sales_debitnote`.`is_delete` = 0))),0)) + ifnull((select sum(`comp_historical_customer_invoice`.`totalReceivable`) from `comp_historical_customer_invoice` where ((`comp_historical_customer_invoice`.`companyID` = `a`.`companyID`) and (`comp_historical_customer_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_historical_customer_invoice`.`salesInvoiceDate`,now()) > 10) and (`comp_historical_customer_invoice`.`updateAble` = 0) and (`comp_historical_customer_invoice`.`is_delete` = 0))),0)) AS `month11` from `customer` `a` */;

--
-- Final view structure for view `view_customer_statement`
--

/*!50001 DROP VIEW IF EXISTS `view_customer_statement`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_customer_statement` AS select `comp_sales_invoice`.`ID` AS `ID`,`comp_sales_invoice`.`ID` AS `parent`,`comp_sales_invoice`.`companyID` AS `companyID`,`comp_sales_invoice`.`customerID` AS `customerID`,'Invoice' AS `transType`,`comp_sales_invoice`.`salesInvoiceDate` AS `transDate`,`comp_sales_invoice`.`customerPoNo` AS `refNo`,concat(concat(concat(`comp_sales_invoice`.`formNo`,'['),convert(lpad(`comp_sales_invoice`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`comp_sales_invoice`.`totalamount` AS `dr`,NULL AS `cr`,1 AS `seq` from `comp_sales_invoice` where ((`comp_sales_invoice`.`updateAble` = 0) and (`comp_sales_invoice`.`is_delete` = 0)) union select `a`.`ID` AS `ID`,`a`.`salesInvoiceID` AS `parent`,`a`.`companyID` AS `companyID`,`a`.`customerID` AS `customerID`,'DebitNote' AS `transType`,`a`.`debitNoteDate` AS `transDate`,concat(concat(concat(`b`.`formNo`,'['),convert(lpad(`b`.`serialNo`,8,'0') using latin1)),']') AS `refno`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`totalAmount` AS `dr`,NULL AS `cr`,2 AS `seq` from (`comp_sales_debitnote` `a` join `comp_sales_invoice` `b`) where ((`a`.`updateAble` = 0) and (`a`.`is_delete` = 0) and (`b`.`ID` = `a`.`salesInvoiceID`)) union select `a`.`ID` AS `ID`,`a`.`salesInvoiceID` AS `parent`,`a`.`companyID` AS `companyID`,`a`.`customerID` AS `customerID`,'CreditNote' AS `transType`,`a`.`creditNoteDate` AS `transDate`,concat(concat(concat(`b`.`formNo`,'['),convert(lpad(`b`.`serialNo`,8,'0') using latin1)),']') AS `refno`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,NULL AS `dr`,`a`.`totalAmount` AS `cr`,3 AS `seq` from (`comp_sales_creditnote` `a` join `comp_sales_invoice` `b`) where ((`a`.`updateAble` = 0) and (`a`.`is_delete` = 0) and (`b`.`ID` = `a`.`salesInvoiceID`)) union select `b`.`ID` AS `ID`,0 AS `parent`,`b`.`companyID` AS `companyID`,`b`.`customerID` AS `customerID`,if((`b`.`updateAble` = 0),'Payment','** Payment') AS `transType`,`b`.`receivePaymentDate` AS `transDate`,`b`.`referenceNo` AS `refNo`,concat(concat(concat(`b`.`formNo`,'['),convert(lpad(`b`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,NULL AS `dr`,`b`.`totalReceived` AS `cr`,4 AS `seq` from `comp_receive_payment` `b` where (`b`.`is_delete` = 0) union select `b`.`ID` AS `ID`,0 AS `parent`,`b`.`companyID` AS `companyID`,`b`.`customerID` AS `customerID`,'Discount' AS `transType`,`b`.`receivePaymentDate` AS `transDate`,NULL AS `refNo`,concat(concat(concat(`b`.`formNo`,'['),convert(lpad(`b`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,NULL AS `dr`,`b`.`totalDiscount` AS `cr`,4 AS `seq` from `comp_receive_payment` `b` where ((`b`.`totalDiscount` > 0) and (`b`.`updateAble` = 0) and (`b`.`is_delete` = 0)) union select `b`.`ID` AS `ID`,0 AS `parent`,`b`.`companyID` AS `companyID`,`b`.`customerID` AS `customerID`,'Historical Invoice' AS `transType`,`b`.`salesInvoiceDate` AS `transDate`,NULL AS `refNo`,concat(concat(concat(`b`.`formNo`,'['),convert(lpad(`b`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`b`.`totalAmount` AS `dr`,NULL AS `cr`,1 AS `seq` from `comp_historical_customer_invoice` `b` where ((`b`.`updateAble` = 0) and (`b`.`is_delete` = 0)) */;

--
-- Final view structure for view `view_expence_and_income`
--

/*!50001 DROP VIEW IF EXISTS `view_expence_and_income`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_expence_and_income` AS select `a`.`companyID` AS `companyid`,`a`.`year` AS `year`,`a`.`period` AS `period`,`c`.`ID` AS `groupID`,`c`.`acctTypeID` AS `acctType`,coalesce(sum(`a`.`amountdr`),0) AS `totalDr`,coalesce(sum(`a`.`amountcr`),0) AS `totalCr`,if((`c`.`acctTypeID` = 3),(coalesce(sum(`a`.`amountcr`),0) - coalesce(sum(`a`.`amountdr`),0)),(coalesce(sum(`a`.`amountdr`),0) - coalesce(sum(`a`.`amountcr`),0))) AS `balance` from ((`comp_acc_det` `a` join `comp_chart_of_acct` `b`) join `_ref_acct_group` `c`) where ((`b`.`ID` = `a`.`acctID`) and (`c`.`ID` = `b`.`acctGroupID`) and (`c`.`acctTypeID` in (3,4)) and (`c`.`title` = 1) and (`a`.`period` > 0) and (`b`.`companyID` > 0)) group by `a`.`companyID`,`a`.`year`,`a`.`period`,`acctType` */;

--
-- Final view structure for view `view_gaf`
--

/*!50001 DROP VIEW IF EXISTS `view_gaf`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_gaf` AS select `a`.`companyID` AS `companyID`,'P' AS `col1`,`a`.`supplierName` AS `col2`,`a`.`supplierCompanyNo` AS `col3`,`b`.`invoiceDate` AS `col4`,concat(`b`.`formNo`,'[',convert(lpad(`b`.`serialNo`,8,'0') using latin1),']') AS `col5`,'import declaration number' AS `col6`,`c`.`lineNo` AS `col7`,`c`.`itemdescription` AS `col8`,(`c`.`amountExcludedTax` * `b`.`exchangeRate`) AS `col9`,(`c`.`taxAmount` * `b`.`exchangeRate`) AS `col10`,`e`.`code` AS `col11`,`d`.`fldcurr_code` AS `col12`,`c`.`amountExcludedTax` AS `col13`,`c`.`taxAmount` AS `col14` from ((((`supplier` `a` join `comp_supplier_invoice` `b`) join `comp_supplier_invoice_detail` `c`) join `_ref_currency` `d`) join `tax_master` `e`) where ((`a`.`ID` = `b`.`supplierID`) and (`b`.`ID` = `c`.`invoiceID`) and (`d`.`fldid` = `a`.`currencyID`) and (`e`.`ID` = `c`.`taxID`)) union select `a`.`companyID` AS `companyID`,'P' AS `col1`,`a`.`supplierName` AS `col2`,`a`.`supplierCompanyNo` AS `col3`,`b`.`invoiceDate` AS `col4`,concat(`b`.`formNo`,'[',convert(lpad(`b`.`serialNo`,8,'0') using latin1),']') AS `col5`,'import declaration number' AS `col6`,`c`.`lineNo` AS `col7`,`c`.`itemdescription` AS `col8`,(`c`.`amountExcludedTax` * `b`.`exchangeRate`) AS `col9`,(`c`.`taxAmount` * `b`.`exchangeRate`) AS `col10`,`e`.`code` AS `col11`,`d`.`fldcurr_code` AS `col12`,`c`.`amountExcludedTax` AS `col13`,`c`.`taxAmount` AS `col14` from ((((`supplier` `a` join `comp_supplier_invoice` `b`) join `comp_supplier_invoice_charges` `c`) join `_ref_currency` `d`) join `tax_master` `e`) where ((`a`.`ID` = `b`.`supplierID`) and (`b`.`ID` = `c`.`invoiceID`) and (`d`.`fldid` = `a`.`currencyID`) and (`e`.`ID` = `c`.`taxID`)) union select `a`.`companyID` AS `companyID`,'P' AS `col1`,`a`.`supplierName` AS `col2`,`a`.`supplierCompanyNo` AS `col3`,`b`.`debitNoteDate` AS `col4`,concat(`b`.`formNo`,'[',convert(lpad(`b`.`serialNo`,8,'0') using latin1),']') AS `col5`,'import declaration number' AS `col6`,`c`.`lineNo` AS `col7`,`c`.`itemdescription` AS `col8`,(`c`.`amountExcludedTax` * `b`.`exchangeRate`) AS `col9`,(`c`.`taxAmount` * `b`.`exchangeRate`) AS `col10`,`e`.`code` AS `col11`,`d`.`fldcurr_code` AS `col12`,`c`.`amountExcludedTax` AS `col13`,`c`.`taxAmount` AS `col14` from ((((`supplier` `a` join `comp_supplier_debitnote` `b`) join `comp_supplier_debitnote_detail` `c`) join `_ref_currency` `d`) join `tax_master` `e`) where ((`a`.`ID` = `b`.`supplierID`) and (`b`.`ID` = `c`.`debitnoteID`) and (`d`.`fldid` = `a`.`currencyID`) and (`e`.`ID` = `c`.`taxID`)) union select `a`.`companyID` AS `companyID`,'P' AS `col1`,`a`.`supplierName` AS `col2`,`a`.`supplierCompanyNo` AS `col3`,`b`.`creditNoteDate` AS `col4`,concat(`b`.`formNo`,'[',convert(lpad(`b`.`serialNo`,8,'0') using latin1),']') AS `col5`,'import declaration number' AS `col6`,`c`.`lineNo` AS `col7`,`c`.`itemdescription` AS `col8`,(`c`.`amountExcludedTax` * `b`.`exchangeRate`) AS `col9`,(`c`.`taxAmount` * `b`.`exchangeRate`) AS `col10`,`e`.`code` AS `col11`,`d`.`fldcurr_code` AS `col12`,`c`.`amountExcludedTax` AS `col13`,`c`.`taxAmount` AS `col14` from ((((`supplier` `a` join `comp_supplier_creditnote` `b`) join `comp_supplier_creditnote_detail` `c`) join `_ref_currency` `d`) join `tax_master` `e`) where ((`a`.`ID` = `b`.`supplierID`) and (`b`.`ID` = `c`.`creditnoteID`) and (`d`.`fldid` = `a`.`currencyID`) and (`e`.`ID` = `c`.`taxID`)) union select `a`.`companyID` AS `companyID`,'S' AS `col1`,`a`.`customerName` AS `col2`,`a`.`customerCompanyNo` AS `col3`,`b`.`salesInvoiceDate` AS `col4`,concat(`b`.`formNo`,'[',convert(lpad(`b`.`serialNo`,8,'0') using latin1),']') AS `col5`,`c`.`lineNo` AS `col6`,`g`.`description` AS `col7`,(`c`.`amountExcludedTax` * `b`.`exchangeRate`) AS `col8`,(`c`.`taxAmount` * `b`.`exchangeRate`) AS `col9`,`e`.`code` AS `col10`,`f`.`fldcountry` AS `col11`,`d`.`fldcurr_code` AS `col12`,`c`.`amountExcludedTax` AS `col13`,`c`.`taxAmount` AS `col14` from ((((((`customer` `a` join `comp_sales_invoice` `b`) join `comp_sales_invoice_detail` `c`) join `_ref_currency` `d`) join `tax_master` `e`) join `_ref_country` `f`) join `item` `g`) where ((`a`.`ID` = `b`.`customerID`) and (`b`.`ID` = `c`.`invoiceID`) and (`d`.`fldid` = `a`.`currencyID`) and (`e`.`ID` = `c`.`taxID`) and (`f`.`fldid` = `a`.`customerCountryID`) and (`g`.`ID` = `c`.`itemID`)) union select `a`.`companyID` AS `companyID`,'S' AS `col1`,`a`.`customerName` AS `col2`,`a`.`customerCompanyNo` AS `col3`,`b`.`salesInvoiceDate` AS `col4`,concat(`b`.`formNo`,'[',convert(lpad(`b`.`serialNo`,8,'0') using latin1),']') AS `col5`,`c`.`lineNo` AS `col6`,`c`.`chargeDescription` AS `col7`,(`c`.`amountExcludedTax` * `b`.`exchangeRate`) AS `col8`,(`c`.`taxAmount` * `b`.`exchangeRate`) AS `col9`,`e`.`code` AS `col10`,`f`.`fldcountry` AS `col11`,`d`.`fldcurr_code` AS `col12`,`c`.`amountExcludedTax` AS `col13`,`c`.`taxAmount` AS `col14` from (((((`customer` `a` join `comp_sales_invoice` `b`) join `comp_sales_invoice_charges` `c`) join `_ref_currency` `d`) join `tax_master` `e`) join `_ref_country` `f`) where ((`a`.`ID` = `b`.`customerID`) and (`b`.`ID` = `c`.`invoiceID`) and (`d`.`fldid` = `a`.`currencyID`) and (`e`.`ID` = `c`.`taxID`) and (`f`.`fldid` = `a`.`customerCountryID`)) union select `a`.`companyID` AS `companyID`,'S' AS `col1`,`a`.`customerName` AS `col2`,`a`.`customerCompanyNo` AS `col3`,`b`.`debitNoteDate` AS `col4`,concat(`b`.`formNo`,'[',convert(lpad(`b`.`serialNo`,8,'0') using latin1),']') AS `col5`,`c`.`lineNo` AS `col6`,`c`.`itemdescription` AS `col7`,(`c`.`amountExcludedTax` * `b`.`exchangeRate`) AS `col8`,(`c`.`taxAmount` * `b`.`exchangeRate`) AS `col9`,`e`.`code` AS `col10`,`f`.`fldcountry` AS `col11`,`d`.`fldcurr_code` AS `col12`,`c`.`amountExcludedTax` AS `col13`,`c`.`taxAmount` AS `col14` from (((((`customer` `a` join `comp_sales_debitnote` `b`) join `comp_sales_debitnote_detail` `c`) join `_ref_currency` `d`) join `tax_master` `e`) join `_ref_country` `f`) where ((`a`.`ID` = `b`.`customerID`) and (`b`.`ID` = `c`.`debitnoteID`) and (`d`.`fldid` = `a`.`currencyID`) and (`e`.`ID` = `c`.`taxID`) and (`f`.`fldid` = `a`.`customerCountryID`)) union select `a`.`companyID` AS `companyID`,'S' AS `col1`,`a`.`customerName` AS `col2`,`a`.`customerCompanyNo` AS `col3`,`b`.`creditNoteDate` AS `col4`,concat(`b`.`formNo`,'[',convert(lpad(`b`.`serialNo`,8,'0') using latin1),']') AS `col5`,`c`.`lineNo` AS `col6`,`c`.`itemdescription` AS `col7`,(`c`.`amountExcludedTax` * `b`.`exchangeRate`) AS `col8`,(`c`.`taxAmount` * `b`.`exchangeRate`) AS `col9`,`e`.`code` AS `col10`,`f`.`fldcountry` AS `col11`,`d`.`fldcurr_code` AS `col12`,`c`.`amountExcludedTax` AS `col13`,`c`.`taxAmount` AS `col14` from (((((`customer` `a` join `comp_sales_creditnote` `b`) join `comp_sales_creditnote_detail` `c`) join `_ref_currency` `d`) join `tax_master` `e`) join `_ref_country` `f`) where ((`a`.`ID` = `b`.`customerID`) and (`b`.`ID` = `c`.`creditnoteID`) and (`d`.`fldid` = `a`.`currencyID`) and (`e`.`ID` = `c`.`taxID`) and (`f`.`fldid` = `a`.`customerCountryID`)) */;

--
-- Final view structure for view `view_grn_report`
--

/*!50001 DROP VIEW IF EXISTS `view_grn_report`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_grn_report` AS select `po`.`companyID` AS `companyID`,`um`.`code` AS `unitMesure`,`podet`.`ID` AS `ID`,`i`.`itemCode` AS `itemCode`,`i`.`name` AS `itemName`,concat(`po`.`formNo`,'[',convert(lpad(`po`.`serialNo`,8,0) using latin1),']') AS `poNo`,date_format(`po`.`poDate`,'%d-%m-%Y') AS `PoDate`,`podet`.`unitPrice` AS `unitPrice`,`podet`.`quantityOrder` AS `quantityOrder`,((`podet`.`quantityOrder` - `podet`.`quantityReceivedTotal`) * `podet`.`unitPrice`) AS `total`,sum(round((`ridet`.`quantityReceived` / ifnull(`umconv`.`factor`,1)),0)) AS `totalRcv`,(`podet`.`quantityOrder` - ifnull(sum(round((`ridet`.`quantityReceived` / ifnull(`umconv`.`factor`,1)),0)),0)) AS `QtyLeft`,`podet`.`itemID` AS `itemID` from ((((((`comp_purchase_order_detail` `podet` left join `comp_purchase_order` `po` on((`po`.`ID` = `podet`.`purchaseOrderID`))) left join `comp_receive_item_detail` `ridet` on((`ridet`.`poDetailID` = `podet`.`ID`))) left join `comp_receive_item` `ri` on((`ri`.`ID` = `ridet`.`receiveID`))) left join `item` `i` on((`i`.`ID` = `podet`.`itemID`))) left join `_sys_um` `um` on((`um`.`fldid` = `podet`.`umID`))) left join `_sys_um_conv` `umconv` on(((`umconv`.`itemID` = `podet`.`itemID`) and (`umconv`.`from_um` = `ridet`.`standUM`) and (`umconv`.`to_um` = `ridet`.`umID`) and (`umconv`.`companyID` = `po`.`companyID`)))) where ((`po`.`updateAble` = 0) and (`ri`.`updateAble` = 0)) group by `podet`.`ID` */;

--
-- Final view structure for view `view_gst_report`
--

/*!50001 DROP VIEW IF EXISTS `view_gst_report`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_gst_report` AS select `a`.`companyID` AS `companyid`,`b`.`gstRegisteredDate` AS `gstRegisteredDate`,`b`.`taxablePeriod` AS `taxablePeriod`,`a`.`financialYear` AS `financialYear`,`a`.`startDate` AS `startDate`,`a`.`endDate` AS `endDate`,`a`.`period` AS `period`,`b`.`gstRegisteredNo` AS `A1`,`b`.`companyName` AS `A2`,(select sum(`view_gst_tax`.`amountExcludedTax`) from `view_gst_tax` where ((`view_gst_tax`.`companyID` = `a`.`companyID`) and (`view_gst_tax`.`gst` in ('SR','DS','IMS')) and (`view_gst_tax`.`transDate` between `a`.`startDate` and `a`.`endDate`))) AS `B5a`,(select sum(`view_gst_tax`.`taxAmount`) from `view_gst_tax` where ((`view_gst_tax`.`companyID` = `a`.`companyID`) and (`view_gst_tax`.`gst` in ('SR','DS','AJS','IMS')) and (`view_gst_tax`.`transDate` between `a`.`startDate` and `a`.`endDate`))) AS `B5b`,(select sum(`view_gst_tax`.`amountExcludedTax`) from `view_gst_tax` where ((`view_gst_tax`.`companyID` = `a`.`companyID`) and (`view_gst_tax`.`gst` in ('TX','TX-CG','IM','IMS','TX-E43','TX-RE')) and (`view_gst_tax`.`transDate` between `a`.`startDate` and `a`.`endDate`))) AS `B6a`,(select sum(`view_gst_tax`.`taxAmount`) from `view_gst_tax` where ((`view_gst_tax`.`companyID` = `a`.`companyID`) and (`view_gst_tax`.`gst` in ('AJP','TX','TX-CG','IM','IMS','TX-E43','TX-RE')) and (`view_gst_tax`.`transDate` between `a`.`startDate` and `a`.`endDate`))) AS `B6b`,if(((select coalesce(sum(`view_gst_tax`.`taxAmount`),0) from `view_gst_tax` where ((`view_gst_tax`.`companyID` = `a`.`companyID`) and (`view_gst_tax`.`gst` in ('SR','DS','AJS','IMS')) and (`view_gst_tax`.`transDate` between `a`.`startDate` and `a`.`endDate`))) > (select coalesce(sum(`view_gst_tax`.`taxAmount`),0) from `view_gst_tax` where ((`view_gst_tax`.`companyID` = `a`.`companyID`) and (`view_gst_tax`.`gst` in ('TX','TX-CG','IM','IMS','TX-E43','TX-RE')) and (`view_gst_tax`.`transDate` between `a`.`startDate` and `a`.`endDate`)))),((select coalesce(sum(`view_gst_tax`.`taxAmount`),0) from `view_gst_tax` where ((`view_gst_tax`.`companyID` = `a`.`companyID`) and (`view_gst_tax`.`gst` in ('SR','DS','AJS','IMS')) and (`view_gst_tax`.`transDate` between `a`.`startDate` and `a`.`endDate`))) - (select coalesce(sum(`view_gst_tax`.`taxAmount`),0) from `view_gst_tax` where ((`view_gst_tax`.`companyID` = `a`.`companyID`) and (`view_gst_tax`.`gst` in ('TX','TX-CG','IM','IMS','TX-E43','TX-RE')) and (`view_gst_tax`.`transDate` between `a`.`startDate` and `a`.`endDate`)))),0) AS `B7`,if(((select coalesce(sum(`view_gst_tax`.`taxAmount`),0) from `view_gst_tax` where ((`view_gst_tax`.`companyID` = `a`.`companyID`) and (`view_gst_tax`.`gst` in ('TX','TX-CG','IM','IMS','TX-E43','TX-RE')) and (`view_gst_tax`.`transDate` between `a`.`startDate` and `a`.`endDate`))) > (select coalesce(sum(`view_gst_tax`.`taxAmount`),0) from `view_gst_tax` where ((`view_gst_tax`.`companyID` = `a`.`companyID`) and (`view_gst_tax`.`gst` in ('SR','DS','AJS','IMS')) and (`view_gst_tax`.`transDate` between `a`.`startDate` and `a`.`endDate`)))),((select coalesce(sum(`view_gst_tax`.`taxAmount`),0) from `view_gst_tax` where ((`view_gst_tax`.`companyID` = `a`.`companyID`) and (`view_gst_tax`.`gst` in ('TX','TX-CG','IM','IMS','TX-E43','TX-RE')) and (`view_gst_tax`.`transDate` between `a`.`startDate` and `a`.`endDate`))) - (select coalesce(sum(`view_gst_tax`.`taxAmount`),0) from `view_gst_tax` where ((`view_gst_tax`.`companyID` = `a`.`companyID`) and (`view_gst_tax`.`gst` in ('SR','DS','AJS','IMS')) and (`view_gst_tax`.`transDate` between `a`.`startDate` and `a`.`endDate`)))),0) AS `B8`,(select sum(`view_gst_tax`.`amountExcludedTax`) from `view_gst_tax` where ((`view_gst_tax`.`companyID` = `a`.`companyID`) and (`view_gst_tax`.`gst` = 'ZRL') and (`view_gst_tax`.`transDate` between `a`.`startDate` and `a`.`endDate`))) AS `C10`,(select sum(`view_gst_tax`.`amountExcludedTax`) from `view_gst_tax` where ((`view_gst_tax`.`companyID` = `a`.`companyID`) and (`view_gst_tax`.`gst` = 'ZRE') and (`view_gst_tax`.`transDate` between `a`.`startDate` and `a`.`endDate`))) AS `C11`,(select sum(`view_gst_tax`.`amountExcludedTax`) from `view_gst_tax` where ((`view_gst_tax`.`companyID` = `a`.`companyID`) and (`view_gst_tax`.`gst` in ('ES','ES43')) and (`view_gst_tax`.`transDate` between `a`.`startDate` and `a`.`endDate`))) AS `C12`,(select sum(`view_gst_tax`.`amountExcludedTax`) from `view_gst_tax` where ((`view_gst_tax`.`companyID` = `a`.`companyID`) and (`view_gst_tax`.`gst` = 'RS') and (`view_gst_tax`.`transDate` between `a`.`startDate` and `a`.`endDate`))) AS `C13`,(select sum(`view_gst_tax`.`amountExcludedTax`) from `view_gst_tax` where ((`view_gst_tax`.`companyID` = `a`.`companyID`) and (`view_gst_tax`.`gst` = 'IS') and (`view_gst_tax`.`transDate` between `a`.`startDate` and `a`.`endDate`))) AS `C14`,(select sum((`view_gst_tax`.`amountExcludedTax` * 0.06)) from `view_gst_tax` where ((`view_gst_tax`.`companyID` = `a`.`companyID`) and (`view_gst_tax`.`gst` = 'IS') and (`view_gst_tax`.`transDate` between `a`.`startDate` and `a`.`endDate`))) AS `C15`,(select sum(`view_gst_tax`.`amountExcludedTax`) from `view_gst_tax` where ((`view_gst_tax`.`companyID` = `a`.`companyID`) and (`view_gst_tax`.`gst` = 'TX-CG') and (`view_gst_tax`.`transDate` between `a`.`startDate` and `a`.`endDate`))) AS `C16`,(select sum(`comp_sales_bad_debt`.`valueBadDebt`) from `comp_sales_bad_debt` where ((`comp_sales_bad_debt`.`companyID` = `a`.`companyID`) and (`comp_sales_bad_debt`.`transDate` between `a`.`startDate` and `a`.`endDate`) and (`comp_sales_bad_debt`.`updateAble` = 0))) AS `C17`,(select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) >= 6))) AS `month6`,(select sum(`comp_sales_debt_recover`.`valueDebtRecover`) from `comp_sales_debt_recover` where ((`comp_sales_debt_recover`.`companyID` = `a`.`companyID`) and (`comp_sales_debt_recover`.`transDate` between `a`.`startDate` and `a`.`endDate`) and (`comp_sales_debt_recover`.`updateAble` = 0))) AS `C18` from (`comp_financial_year` `a` join `company` `b`) where ((`b`.`ID` = `a`.`companyID`) and (`a`.`is_delete` = 0)) */;

--
-- Final view structure for view `view_gst_tax`
--

/*!50001 DROP VIEW IF EXISTS `view_gst_tax`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_gst_tax` AS select `b`.`lineNo` AS `lineNo`,`a`.`companyID` AS `companyID`,`f`.`taxClass` AS `taxClass`,`h`.`description` AS `taxClassName`,`f`.`taxGroup` AS `taxGroup`,`i`.`description` AS `taxGroupName`,`f`.`taxType` AS `taxType`,`g`.`description` AS `taxTypeName`,'Sales Invoice' AS `transType`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `ref`,`a`.`salesInvoiceDate` AS `transDate`,`a`.`customerID` AS `customerID`,`d`.`customerName` AS `customerName`,concat(`e`.`name`,' / ',`e`.`itemCode`) AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedTax`,`b`.`taxRate` AS `taxRate`,`b`.`taxAmount` AS `taxAmount`,`b`.`amountIncludedTax` AS `amountIncludedTax`,`b`.`taxID` AS `taxID`,`f`.`code` AS `gst`,`j`.`journalID` AS `journalID`,`j`.`formNo` AS `formNo` from ((((((((`comp_sales_invoice` `a` join `comp_sales_invoice_detail` `b`) join `customer` `d`) join `item` `e`) join `tax_master` `f`) join `tax_type` `g`) join `tax_class` `h`) join `tax_group` `i`) join `comp_journal` `j`) where ((`a`.`ID` = `b`.`invoiceID`) and (`a`.`customerID` = `d`.`ID`) and (`e`.`ID` = `b`.`itemID`) and (`f`.`ID` = `b`.`taxID`) and (`f`.`taxType` = `g`.`ID`) and (`f`.`taxClass` = `h`.`ID`) and (`f`.`taxGroup` = `i`.`ID`) and (`f`.`taxClass` = 1) and (`b`.`taxID` > 0) and (`a`.`updateAble` = 0) and (`e`.`companyID` = `a`.`companyID`) and (`f`.`companyID` = `a`.`companyID`) and (`j`.`companyID` = `a`.`companyID`) and (`j`.`journalID` = convert(`a`.`journalNo` using utf8)) and (`j`.`status` = 1) and (`a`.`is_delete` = 0)) union select `b`.`lineNo` AS `lineNo`,`a`.`companyID` AS `companyID`,`f`.`taxClass` AS `taxClass`,`h`.`description` AS `taxClassName`,`f`.`taxGroup` AS `taxGroup`,`i`.`description` AS `taxGroupName`,`f`.`taxType` AS `taxType`,`g`.`description` AS `taxTypeName`,'Sales Invoice' AS `transType`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `ref`,`a`.`salesInvoiceDate` AS `transDate`,`a`.`customerID` AS `customerID`,`d`.`customerName` AS `customerName`,`b`.`chargeDescription` AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedTax`,`b`.`taxRate` AS `taxRate`,`b`.`taxAmount` AS `taxAmount`,`b`.`amountIncludedTax` AS `amountIncludedTax`,`b`.`taxID` AS `taxID`,`f`.`code` AS `gst`,`j`.`journalID` AS `journalID`,`j`.`formNo` AS `formNo` from (((((((`comp_sales_invoice` `a` join `comp_sales_invoice_charges` `b`) join `customer` `d`) join `tax_master` `f`) join `tax_type` `g`) join `tax_class` `h`) join `tax_group` `i`) join `comp_journal` `j`) where ((`a`.`ID` = `b`.`invoiceID`) and (`a`.`customerID` = `d`.`ID`) and (`f`.`ID` = `b`.`taxID`) and (`f`.`taxType` = `g`.`ID`) and (`f`.`taxClass` = `h`.`ID`) and (`f`.`taxGroup` = `i`.`ID`) and (`f`.`taxClass` = 1) and (`b`.`taxID` > 0) and (`a`.`updateAble` = 0) and (`f`.`companyID` = `a`.`companyID`) and (`j`.`companyID` = `a`.`companyID`) and (`j`.`journalID` = convert(`a`.`journalNo` using utf8)) and (`j`.`status` = 1) and (`a`.`is_delete` = 0)) union select `b`.`lineNo` AS `lineNo`,`a`.`companyID` AS `companyID`,`f`.`taxClass` AS `taxClass`,`h`.`description` AS `taxClassName`,`f`.`taxGroup` AS `taxGroup`,`i`.`description` AS `taxGroupName`,`f`.`taxType` AS `taxType`,`g`.`description` AS `taxTypeName`,'Sales Credit Note' AS `transType`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `ref`,`a`.`creditNoteDate` AS `transDate`,`a`.`customerID` AS `customerID`,`d`.`customerName` AS `customerName`,concat(`e`.`name`,' / ',`e`.`itemCode`) AS `itemName`,(`b`.`amountExcludedTax` * -(1)) AS `amountExcludedTax`,`b`.`taxRate` AS `taxRate`,(`b`.`taxAmount` * -(1)) AS `taxAmount`,(`b`.`amountIncludedTax` * -(1)) AS `amountIncludedTax`,`b`.`taxID` AS `taxID`,`f`.`code` AS `gst`,`j`.`journalID` AS `journalID`,`j`.`formNo` AS `formNo` from ((((((((`comp_sales_creditnote` `a` join `comp_sales_creditnote_detail` `b`) join `customer` `d`) join `item` `e`) join `tax_master` `f`) join `tax_type` `g`) join `tax_class` `h`) join `tax_group` `i`) join `comp_journal` `j`) where ((`a`.`ID` = `b`.`creditnoteID`) and (`a`.`customerID` = `d`.`ID`) and (`e`.`ID` = `b`.`itemID`) and (`f`.`ID` = `b`.`taxID`) and (`f`.`taxType` = `g`.`ID`) and (`f`.`taxClass` = `h`.`ID`) and (`f`.`taxGroup` = `i`.`ID`) and (`f`.`taxClass` = 1) and (`b`.`taxID` > 0) and (`a`.`updateAble` = 0) and (`e`.`companyID` = `a`.`companyID`) and (`f`.`companyID` = `a`.`companyID`) and (`j`.`companyID` = `a`.`companyID`) and (`j`.`journalID` = convert(`a`.`journalNo` using utf8)) and (`j`.`status` = 1) and (`a`.`is_delete` = 0)) union select `b`.`lineNo` AS `lineNo`,`a`.`companyID` AS `companyID`,`f`.`taxClass` AS `taxClass`,`h`.`description` AS `taxClassName`,`f`.`taxGroup` AS `taxGroup`,`i`.`description` AS `taxGroupName`,`f`.`taxType` AS `taxType`,`g`.`description` AS `taxTypeName`,'Sales Credit Note' AS `transType`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `ref`,`a`.`creditNoteDate` AS `transDate`,`a`.`customerID` AS `customerID`,`d`.`customerName` AS `customerName`,`b`.`chargeDescription` AS `itemName`,(`b`.`amountExcludedTax` * -(1)) AS `amountExcludedTax`,`b`.`taxRate` AS `taxRate`,(`b`.`taxAmount` * -(1)) AS `taxAmount`,(`b`.`amountIncludedTax` * -(1)) AS `amountIncludedTax`,`b`.`taxID` AS `taxID`,`f`.`code` AS `gst`,`j`.`journalID` AS `journalID`,`j`.`formNo` AS `formNo` from (((((((`comp_sales_creditnote` `a` join `comp_sales_creditnote_charges` `b`) join `customer` `d`) join `tax_master` `f`) join `tax_type` `g`) join `tax_class` `h`) join `tax_group` `i`) join `comp_journal` `j`) where ((`a`.`ID` = `b`.`creditNoteID`) and (`a`.`customerID` = `d`.`ID`) and (`f`.`ID` = `b`.`taxID`) and (`f`.`taxType` = `g`.`ID`) and (`f`.`taxClass` = `h`.`ID`) and (`f`.`taxGroup` = `i`.`ID`) and (`f`.`taxClass` = 1) and (`b`.`taxID` > 0) and (`a`.`updateAble` = 0) and (`d`.`companyID` = `a`.`companyID`) and (`f`.`companyID` = `a`.`companyID`) and (`j`.`companyID` = `a`.`companyID`) and (`j`.`journalID` = convert(`a`.`journalNo` using utf8)) and (`j`.`status` = 1) and (`a`.`is_delete` = 0)) union select `b`.`lineNo` AS `lineNo`,`a`.`companyID` AS `companyID`,`f`.`taxClass` AS `taxClass`,`h`.`description` AS `taxClassName`,`f`.`taxGroup` AS `taxGroup`,`i`.`description` AS `taxGroupName`,`f`.`taxType` AS `taxType`,`g`.`description` AS `taxTypeName`,'Sales Debit note' AS `transType`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `ref`,`a`.`debitNoteDate` AS `transDate`,`a`.`customerID` AS `customerID`,`d`.`customerName` AS `customerName`,concat(`e`.`name`,' / ',`e`.`itemCode`) AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedTax`,`b`.`taxRate` AS `taxRate`,`b`.`taxAmount` AS `taxAmount`,`b`.`amountIncludedTax` AS `amountIncludedTax`,`b`.`taxID` AS `taxID`,`f`.`code` AS `gst`,`j`.`journalID` AS `journalID`,`j`.`formNo` AS `formNo` from ((((((((`comp_sales_debitnote` `a` join `comp_sales_debitnote_detail` `b`) join `customer` `d`) join `item` `e`) join `tax_master` `f`) join `tax_type` `g`) join `tax_class` `h`) join `tax_group` `i`) join `comp_journal` `j`) where ((`a`.`ID` = `b`.`debitnoteID`) and (`a`.`customerID` = `d`.`ID`) and (`e`.`ID` = `b`.`itemID`) and (`f`.`ID` = `b`.`taxID`) and (`f`.`taxType` = `g`.`ID`) and (`f`.`taxClass` = `h`.`ID`) and (`f`.`taxGroup` = `i`.`ID`) and (`f`.`taxClass` = 1) and (`b`.`taxID` > 0) and (`a`.`updateAble` = 0) and (`e`.`companyID` = `a`.`companyID`) and (`f`.`companyID` = `a`.`companyID`) and (`j`.`companyID` = `a`.`companyID`) and (`j`.`journalID` = convert(`a`.`journalNo` using utf8)) and (`j`.`status` = 1) and (`a`.`is_delete` = 0)) union select `b`.`lineNo` AS `lineNo`,`a`.`companyID` AS `companyID`,`f`.`taxClass` AS `taxClass`,`h`.`description` AS `taxClassName`,`f`.`taxGroup` AS `taxGroup`,`i`.`description` AS `taxGroupName`,`f`.`taxType` AS `taxType`,`g`.`description` AS `taxTypeName`,'Sales Debit Note' AS `transType`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `ref`,`a`.`debitNoteDate` AS `transDate`,`a`.`customerID` AS `customerID`,`d`.`customerName` AS `customerName`,`b`.`chargeDescription` AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedTax`,`b`.`taxRate` AS `taxRate`,`b`.`taxAmount` AS `taxAmount`,`b`.`amountIncludedTax` AS `amountIncludedTax`,`b`.`taxID` AS `taxID`,`f`.`code` AS `gst`,`j`.`journalID` AS `journalID`,`j`.`formNo` AS `formNo` from (((((((`comp_sales_debitnote` `a` join `comp_sales_debitnote_charges` `b`) join `customer` `d`) join `tax_master` `f`) join `tax_type` `g`) join `tax_class` `h`) join `tax_group` `i`) join `comp_journal` `j`) where ((`a`.`ID` = `b`.`debitNoteID`) and (`a`.`customerID` = `d`.`ID`) and (`f`.`ID` = `b`.`taxID`) and (`f`.`taxType` = `g`.`ID`) and (`f`.`taxClass` = `h`.`ID`) and (`f`.`taxGroup` = `i`.`ID`) and (`f`.`taxClass` = 1) and (`b`.`taxID` > 0) and (`a`.`updateAble` = 0) and (`d`.`companyID` = `a`.`companyID`) and (`f`.`companyID` = `a`.`companyID`) and (`j`.`companyID` = `a`.`companyID`) and (`j`.`journalID` = convert(`a`.`journalNo` using utf8)) and (`j`.`status` = 1) and (`a`.`is_delete` = 0)) union select `b`.`lineNo` AS `lineNo`,`a`.`companyID` AS `companyID`,`f`.`taxClass` AS `taxClass`,`h`.`description` AS `taxClassName`,`f`.`taxGroup` AS `taxGroup`,`i`.`description` AS `taxGroupName`,`f`.`taxType` AS `taxType`,`g`.`description` AS `taxTypeName`,'Purchase Invoice' AS `transType`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `ref`,`a`.`invoiceDate` AS `transDate`,`a`.`supplierID` AS `supplierID`,`d`.`supplierName` AS `supplierName`,concat(`e`.`name`,' / ',`e`.`itemCode`) AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedTax`,`b`.`taxRate` AS `taxRate`,`b`.`taxAmount` AS `taxAmount`,`b`.`amountIncludedTax` AS `amountIncludedTax`,`b`.`taxID` AS `taxID`,`f`.`code` AS `gst`,`j`.`journalID` AS `journalID`,`j`.`formNo` AS `formNo` from ((((((((`comp_supplier_invoice` `a` join `comp_supplier_invoice_detail` `b`) join `supplier` `d`) join `item` `e`) join `tax_master` `f`) join `tax_type` `g`) join `tax_class` `h`) join `tax_group` `i`) join `comp_journal` `j`) where ((`a`.`ID` = `b`.`invoiceID`) and (`a`.`supplierID` = `d`.`ID`) and (`e`.`ID` = `b`.`itemID`) and (`f`.`ID` = `b`.`taxID`) and (`f`.`taxType` = `g`.`ID`) and (`f`.`taxClass` = `h`.`ID`) and (`f`.`taxGroup` = `i`.`ID`) and (`f`.`taxClass` = 1) and (`b`.`taxID` > 0) and (`a`.`updateAble` = 0) and (`e`.`companyID` = `a`.`companyID`) and (`f`.`companyID` = `a`.`companyID`) and (`j`.`companyID` = `a`.`companyID`) and (`j`.`journalID` = convert(`a`.`journalNo` using utf8)) and (`j`.`status` = 1) and (`a`.`is_delete` = 0)) union select `b`.`lineNo` AS `lineNo`,`a`.`companyID` AS `companyID`,`f`.`taxClass` AS `taxClass`,`h`.`description` AS `taxClassName`,`f`.`taxGroup` AS `taxGroup`,`i`.`description` AS `taxGroupName`,`f`.`taxType` AS `taxType`,`g`.`description` AS `taxTypeName`,'Purchase Invoice' AS `transType`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `ref`,`a`.`invoiceDate` AS `transDate`,`a`.`supplierID` AS `supplierID`,`d`.`supplierName` AS `supplierName`,`b`.`chargeDescription` AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedTax`,`b`.`taxRate` AS `taxRate`,`b`.`taxAmount` AS `taxAmount`,`b`.`amountIncludedTax` AS `amountIncludedTax`,`b`.`taxID` AS `taxID`,`f`.`code` AS `gst`,`j`.`journalID` AS `journalID`,`j`.`formNo` AS `formNo` from (((((((`comp_supplier_invoice` `a` join `comp_supplier_invoice_charges` `b`) join `supplier` `d`) join `tax_master` `f`) join `tax_type` `g`) join `tax_class` `h`) join `tax_group` `i`) join `comp_journal` `j`) where ((`a`.`ID` = `b`.`invoiceID`) and (`a`.`supplierID` = `d`.`ID`) and (`f`.`ID` = `b`.`taxID`) and (`f`.`taxType` = `g`.`ID`) and (`f`.`taxClass` = `h`.`ID`) and (`f`.`taxGroup` = `i`.`ID`) and (`f`.`taxClass` = 1) and (`b`.`taxID` > 0) and (`a`.`updateAble` = 0) and (`d`.`companyID` = `a`.`companyID`) and (`f`.`companyID` = `a`.`companyID`) and (`j`.`companyID` = `a`.`companyID`) and (`j`.`journalID` = convert(`a`.`journalNo` using utf8)) and (`j`.`status` = 1) and (`a`.`is_delete` = 0)) union select `b`.`lineNo` AS `lineNo`,`a`.`companyID` AS `companyID`,`f`.`taxClass` AS `taxClass`,`h`.`description` AS `taxClassName`,`f`.`taxGroup` AS `taxGroup`,`i`.`description` AS `taxGroupName`,`f`.`taxType` AS `taxType`,`g`.`description` AS `taxTypeName`,'Purchase Credit Note' AS `transType`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `ref`,`a`.`creditNoteDate` AS `transDate`,`a`.`supplierID` AS `supplierID`,`d`.`supplierName` AS `supplierName`,concat(`e`.`name`,' / ',`e`.`itemCode`) AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedTax`,`b`.`taxRate` AS `taxRate`,`b`.`taxAmount` AS `taxAmount`,`b`.`amountIncludedTax` AS `amountIncludedTax`,`b`.`taxID` AS `taxID`,`f`.`code` AS `gst`,`j`.`journalID` AS `journalID`,`j`.`formNo` AS `formNo` from ((((((((`comp_supplier_creditnote` `a` join `comp_supplier_creditnote_detail` `b`) join `supplier` `d`) join `item` `e`) join `tax_master` `f`) join `tax_type` `g`) join `tax_class` `h`) join `tax_group` `i`) join `comp_journal` `j`) where ((`a`.`ID` = `b`.`creditnoteID`) and (`a`.`supplierID` = `d`.`ID`) and (`e`.`ID` = `b`.`itemID`) and (`f`.`ID` = `b`.`taxID`) and (`f`.`taxType` = `g`.`ID`) and (`f`.`taxClass` = `h`.`ID`) and (`f`.`taxGroup` = `i`.`ID`) and (`f`.`taxClass` = 1) and (`b`.`taxID` > 0) and (`a`.`updateAble` = 0) and (`e`.`companyID` = `a`.`companyID`) and (`f`.`companyID` = `a`.`companyID`) and (`j`.`companyID` = `a`.`companyID`) and (`j`.`journalID` = convert(`a`.`journalNo` using utf8)) and (`j`.`status` = 1) and (`a`.`is_delete` = 0)) union select `b`.`lineNo` AS `lineNo`,`a`.`companyID` AS `companyID`,`f`.`taxClass` AS `taxClass`,`h`.`description` AS `taxClassName`,`f`.`taxGroup` AS `taxGroup`,`i`.`description` AS `taxGroupName`,`f`.`taxType` AS `taxType`,`g`.`description` AS `taxTypeName`,'Purchase Credit Note' AS `transType`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `ref`,`a`.`creditNoteDate` AS `transDate`,`a`.`supplierID` AS `supplierID`,`d`.`supplierName` AS `supplierName`,`b`.`itemdescription` AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedTax`,`b`.`taxRate` AS `taxRate`,`b`.`taxAmount` AS `taxAmount`,`b`.`amountIncludedTax` AS `amountIncludedTax`,`b`.`taxID` AS `taxID`,`f`.`code` AS `gst`,`j`.`journalID` AS `journalID`,`j`.`formNo` AS `formNo` from (((((((`comp_supplier_creditnote` `a` join `comp_supplier_creditnote_charges` `b`) join `supplier` `d`) join `tax_master` `f`) join `tax_type` `g`) join `tax_class` `h`) join `tax_group` `i`) join `comp_journal` `j`) where ((`a`.`ID` = `b`.`creditNoteID`) and (`a`.`supplierID` = `d`.`ID`) and (`f`.`ID` = `b`.`taxID`) and (`f`.`taxType` = `g`.`ID`) and (`f`.`taxClass` = `h`.`ID`) and (`f`.`taxGroup` = `i`.`ID`) and (`f`.`taxClass` = 1) and (`b`.`taxID` > 0) and (`a`.`updateAble` = 0) and (`d`.`companyID` = `a`.`companyID`) and (`f`.`companyID` = `a`.`companyID`) and (`j`.`companyID` = `a`.`companyID`) and (`j`.`journalID` = convert(`a`.`journalNo` using utf8)) and (`j`.`status` = 1) and (`a`.`is_delete` = 0)) union select `b`.`lineNo` AS `lineNo`,`a`.`companyID` AS `companyID`,`f`.`taxClass` AS `taxClass`,`h`.`description` AS `taxClassName`,`f`.`taxGroup` AS `taxGroup`,`i`.`description` AS `taxGroupName`,`f`.`taxType` AS `taxType`,`g`.`description` AS `taxTypeName`,'Purchase Debit note' AS `transType`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `ref`,`a`.`debitNoteDate` AS `transDate`,`a`.`supplierID` AS `supplierID`,`d`.`supplierName` AS `supplierName`,concat(`e`.`name`,' / ',`e`.`itemCode`) AS `itemName`,(`b`.`amountExcludedTax` * -(1)) AS `b.amountExcludedTax * -1`,`b`.`taxRate` AS `taxRate`,(`b`.`taxAmount` * -(1)) AS `b.taxAmount * -1`,(`b`.`amountIncludedTax` * -(1)) AS `b.amountIncludedTax * -1`,`b`.`taxID` AS `taxID`,`f`.`code` AS `gst`,`j`.`journalID` AS `journalID`,`j`.`formNo` AS `formNo` from ((((((((`comp_supplier_debitnote` `a` join `comp_supplier_debitnote_detail` `b`) join `supplier` `d`) join `item` `e`) join `tax_master` `f`) join `tax_type` `g`) join `tax_class` `h`) join `tax_group` `i`) join `comp_journal` `j`) where ((`a`.`ID` = `b`.`debitnoteID`) and (`a`.`supplierID` = `d`.`ID`) and (`e`.`ID` = `b`.`itemID`) and (`f`.`ID` = `b`.`taxID`) and (`f`.`taxType` = `g`.`ID`) and (`f`.`taxClass` = `h`.`ID`) and (`f`.`taxGroup` = `i`.`ID`) and (`f`.`taxClass` = 1) and (`b`.`taxID` > 0) and (`a`.`updateAble` = 0) and (`e`.`companyID` = `a`.`companyID`) and (`f`.`companyID` = `a`.`companyID`) and (`j`.`companyID` = `a`.`companyID`) and (`j`.`journalID` = convert(`a`.`journalNo` using utf8)) and (`j`.`status` = 1) and (`a`.`is_delete` = 0)) union select `b`.`lineNo` AS `lineNo`,`a`.`companyID` AS `companyID`,`f`.`taxClass` AS `taxClass`,`h`.`description` AS `taxClassName`,`f`.`taxGroup` AS `taxGroup`,`i`.`description` AS `taxGroupName`,`f`.`taxType` AS `taxType`,`g`.`description` AS `taxTypeName`,'Purchase Debit Note' AS `transType`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `ref`,`a`.`debitNoteDate` AS `transDate`,`a`.`supplierID` AS `supplierID`,`d`.`supplierName` AS `supplierName`,`b`.`itemdescription` AS `itemName`,(`b`.`amountExcludedTax` * -(1)) AS `b.amountExcludedTax * -1`,`b`.`taxRate` AS `taxRate`,(`b`.`taxAmount` * -(1)) AS `b.taxAmount * -1`,(`b`.`amountIncludedTax` * -(1)) AS `b.amountIncludedTax * -1`,`b`.`taxID` AS `taxID`,`f`.`code` AS `gst`,`j`.`journalID` AS `journalID`,`j`.`formNo` AS `formNo` from (((((((`comp_supplier_debitnote` `a` join `comp_supplier_debitnote_charges` `b`) join `supplier` `d`) join `tax_master` `f`) join `tax_type` `g`) join `tax_class` `h`) join `tax_group` `i`) join `comp_journal` `j`) where ((`a`.`ID` = `b`.`debitNoteID`) and (`a`.`supplierID` = `d`.`ID`) and (`f`.`ID` = `b`.`taxID`) and (`f`.`taxType` = `g`.`ID`) and (`f`.`taxClass` = `h`.`ID`) and (`f`.`taxGroup` = `i`.`ID`) and (`f`.`taxClass` = 1) and (`b`.`taxID` > 0) and (`a`.`updateAble` = 0) and (`d`.`companyID` = `a`.`companyID`) and (`f`.`companyID` = `a`.`companyID`) and (`j`.`companyID` = `a`.`companyID`) and (`j`.`journalID` = convert(`a`.`journalNo` using utf8)) and (`j`.`status` = 1) and (`a`.`is_delete` = 0)) union select `b`.`lineNo` AS `lineNo`,`a`.`companyID` AS `companyID`,`f`.`taxClass` AS `taxClass`,`h`.`description` AS `taxClassName`,`f`.`taxGroup` AS `taxGroup`,`i`.`description` AS `taxGroupName`,`f`.`taxType` AS `taxType`,`g`.`description` AS `taxTypeName`,'Other Payment' AS `transType`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `ref`,`a`.`paymentDate` AS `transDate`,NULL AS `NULL`,`a`.`payTo` AS `supplierName`,`b`.`itemdescription` AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedTax`,`b`.`taxRate` AS `taxRate`,`b`.`taxAmount` AS `taxAmount`,`b`.`amountIncludedTax` AS `amountIncludedTax`,`b`.`taxID` AS `taxID`,`f`.`code` AS `gst`,`j`.`journalID` AS `journalID`,`j`.`formNo` AS `formNo` from ((((((`comp_payment_others` `a` join `comp_payment_others_without_item` `b`) join `tax_master` `f`) join `tax_type` `g`) join `tax_class` `h`) join `tax_group` `i`) join `comp_journal` `j`) where ((`a`.`ID` = `b`.`otherPaymentID`) and (`f`.`ID` = `b`.`taxID`) and (`f`.`taxType` = `g`.`ID`) and (`f`.`taxClass` = `h`.`ID`) and (`f`.`taxGroup` = `i`.`ID`) and (`f`.`taxClass` = 1) and (`b`.`taxID` > 0) and (`a`.`updateAble` = 0) and (`f`.`companyID` = `a`.`companyID`) and (`j`.`companyID` = `a`.`companyID`) and (`j`.`journalID` = convert(`a`.`journalNo` using utf8)) and (`j`.`status` = 1) and (`a`.`is_delete` = 0)) union select `b`.`lineNo` AS `lineNo`,`a`.`companyID` AS `companyID`,`f`.`taxClass` AS `taxClass`,`h`.`description` AS `taxClassName`,`f`.`taxGroup` AS `taxGroup`,`i`.`description` AS `taxGroupName`,`f`.`taxType` AS `taxType`,`g`.`description` AS `taxTypeName`,'Cash Sales' AS `transType`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `ref`,`a`.`salesInvoiceDate` AS `transDate`,NULL AS `customerID`,`a`.`paymentFrom` AS `customerName`,concat(`e`.`name`,' / ',`e`.`itemCode`) AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedTax`,`b`.`taxRate` AS `taxRate`,`b`.`taxAmount` AS `taxAmount`,`b`.`amountIncludedTax` AS `amountIncludedTax`,`b`.`taxID` AS `taxID`,`f`.`code` AS `gst`,`j`.`journalID` AS `journalID`,`j`.`formNo` AS `formNo` from (((((((`comp_cash_sales` `a` join `comp_cash_sales_detail` `b`) join `item` `e`) join `tax_master` `f`) join `tax_type` `g`) join `tax_class` `h`) join `tax_group` `i`) join `comp_journal` `j`) where ((`a`.`ID` = `b`.`invoiceID`) and (`e`.`ID` = `b`.`itemID`) and (`f`.`ID` = `b`.`taxID`) and (`f`.`taxType` = `g`.`ID`) and (`f`.`taxClass` = `h`.`ID`) and (`f`.`taxGroup` = `i`.`ID`) and (`f`.`taxClass` = 1) and (`b`.`taxID` > 0) and (`a`.`updateAble` = 0) and (`e`.`companyID` = `a`.`companyID`) and (`f`.`companyID` = `a`.`companyID`) and (`j`.`companyID` = `a`.`companyID`) and (`j`.`journalID` = convert(`a`.`journalNo` using utf8)) and (`j`.`status` = 1) and (`a`.`is_delete` = 0)) union select `b`.`lineNo` AS `lineNo`,`a`.`companyID` AS `companyID`,`f`.`taxClass` AS `taxClass`,`h`.`description` AS `taxClassName`,`f`.`taxGroup` AS `taxGroup`,`i`.`description` AS `taxGroupName`,`f`.`taxType` AS `taxType`,`g`.`description` AS `taxTypeName`,'Other Receive' AS `transType`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `ref`,`a`.`receivePaymentDate` AS `transDate`,NULL AS `customerID`,`a`.`receiveFrom` AS `customerName`,`b`.`description` AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedTax`,`b`.`taxRate` AS `taxRate`,`b`.`taxAmount` AS `taxAmount`,`b`.`amountIncludedTax` AS `amountIncludedTax`,`b`.`taxID` AS `taxID`,`f`.`code` AS `gst`,`j`.`journalID` AS `journalID`,`j`.`formNo` AS `formNo` from ((((((`comp_receive_payment_others` `a` join `comp_receive_payment_others_detail` `b`) join `tax_master` `f`) join `tax_type` `g`) join `tax_class` `h`) join `tax_group` `i`) join `comp_journal` `j`) where ((`a`.`ID` = `b`.`receivePaymentOthersID`) and (`f`.`ID` = `b`.`taxID`) and (`f`.`taxType` = `g`.`ID`) and (`f`.`taxClass` = `h`.`ID`) and (`f`.`taxGroup` = `i`.`ID`) and (`f`.`taxClass` = 1) and (`b`.`taxID` > 0) and (`a`.`updateAble` = 0) and (`f`.`companyID` = `a`.`companyID`) and (`j`.`companyID` = `a`.`companyID`) and (`j`.`journalID` = convert(`a`.`journalNo` using utf8)) and (`j`.`status` = 1) and (`a`.`is_delete` = 0)) union select `b`.`ID` AS `lineNo`,`a`.`companyID` AS `companyID`,`f`.`taxClass` AS `taxClass`,`h`.`description` AS `taxClassName`,`f`.`taxGroup` AS `taxGroup`,`i`.`description` AS `taxGroupName`,`f`.`taxType` AS `taxType`,`g`.`description` AS `taxTypeName`,`a`.`type` AS `transType`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `ref`,`a`.`date` AS `transDate`,NULL AS `supplierID`,`a`.`vendor_cust_name` AS `supplierName`,`b`.`description` AS `itemName`,if((`a`.`reverse` > 0),(`a`.`based_amount` * -(1)),`a`.`based_amount`) AS `amountExcludedTax`,`b`.`taxRate` AS `taxRate`,if((`a`.`reverse` > 0),(if((`b`.`taxAmountDr` > 0),`b`.`taxAmountDr`,`b`.`taxAmountCr`) * -(1)),if((`b`.`taxAmountDr` > 0),`b`.`taxAmountDr`,`b`.`taxAmountCr`)) AS `taxAmount`,if((`a`.`reverse` > 0),((if((`b`.`taxAmountDr` > 0),`b`.`taxAmountDr`,`b`.`taxAmountCr`) + `a`.`based_amount`) * -(1)),(if((`b`.`taxAmountDr` > 0),`b`.`taxAmountDr`,`b`.`taxAmountCr`) + `a`.`based_amount`)) AS `amountIncludedTax`,`b`.`taxID` AS `taxID`,`f`.`code` AS `gst`,`j`.`journalID` AS `journalID`,`j`.`formNo` AS `formNo` from ((((((`comp_gst_transaction` `a` join `comp_gst_transaction_detail` `b`) join `tax_master` `f`) join `tax_type` `g`) join `tax_class` `h`) join `tax_group` `i`) join `comp_journal` `j`) where ((`a`.`ID` = `b`.`gstTransID`) and (`f`.`ID` = `b`.`taxID`) and (`f`.`taxType` = `g`.`ID`) and (`f`.`taxClass` = `h`.`ID`) and (`f`.`taxGroup` = `i`.`ID`) and (`f`.`taxClass` = 1) and (`b`.`taxID` > 0) and (`a`.`updateAble` = 0) and (`f`.`companyID` = `a`.`companyID`) and (`j`.`companyID` = `a`.`companyID`) and (`j`.`journalID` = convert(`a`.`journalNo` using utf8)) and (`a`.`isDelete` = 0)) union select `b`.`lineNo` AS `lineNo`,`a`.`companyID` AS `companyID`,`f`.`taxClass` AS `taxClass`,`h`.`description` AS `taxClassName`,`f`.`taxGroup` AS `taxGroup`,`i`.`description` AS `taxGroupName`,`f`.`taxType` AS `taxType`,`g`.`description` AS `taxTypeName`,'Cash Purchase' AS `transType`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `ref`,`a`.`paymentDate` AS `transDate`,NULL AS `supplierID`,`a`.`payTo` AS `supplierName`,concat(`e`.`name`,' / ',`e`.`itemCode`) AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedTax`,`b`.`taxRate` AS `taxRate`,`b`.`taxAmount` AS `taxAmount`,`b`.`amountIncludedTax` AS `amountIncludedTax`,`b`.`taxID` AS `taxID`,`f`.`code` AS `gst`,`j`.`journalID` AS `journalID`,`j`.`formNo` AS `formNo` from (((((((`comp_payment_others` `a` join `comp_payment_others_with_item` `b`) join `item` `e`) join `tax_master` `f`) join `tax_type` `g`) join `tax_class` `h`) join `tax_group` `i`) join `comp_journal` `j`) where ((`a`.`ID` = `b`.`otherPaymentID`) and (`e`.`ID` = `b`.`itemID`) and (`f`.`ID` = `b`.`taxID`) and (`f`.`taxType` = `g`.`ID`) and (`f`.`taxClass` = `h`.`ID`) and (`f`.`taxGroup` = `i`.`ID`) and (`f`.`taxClass` = 1) and (`b`.`taxID` > 0) and (`a`.`updateAble` = 0) and (`e`.`companyID` = `a`.`companyID`) and (`f`.`companyID` = `a`.`companyID`) and (`j`.`companyID` = `a`.`companyID`) and (`j`.`journalID` = convert(`a`.`journalNo` using utf8)) and (`j`.`status` = 1) and (`a`.`is_delete` = 0)) union select `a`.`ID` AS `lineNo`,`a`.`companyID` AS `companyID`,`f`.`taxClass` AS `taxClass`,`h`.`description` AS `taxClassName`,`f`.`taxGroup` AS `taxGroup`,`i`.`description` AS `taxGroupName`,`f`.`taxType` AS `taxType`,`g`.`description` AS `taxTypeName`,'Bad debt relief' AS `transType`,`a`.`journalNo` AS `ref`,`a`.`transDate` AS `transDate`,NULL AS `supplierID`,`c`.`customerName` AS `supplierName`,concat(`b`.`formNo`,'[',convert(lpad(`b`.`serialNo`,8,'0') using latin1),']') AS `itemName`,round((((((round(`b`.`totalReceivable`,2) / round(`b`.`totalamount`,2)) * round(`b`.`totalTaxAmount`,2)) * 106) / 6) - ((round(`b`.`totalReceivable`,2) / round(`b`.`totalamount`,2)) * round(`b`.`totalTaxAmount`,2))),2) AS `amountExcludedTax`,`f`.`taxPercentage` AS `taxRate`,round(((`b`.`totalReceivable` / `b`.`totalamount`) * `b`.`totalTaxAmount`),2) AS `taxAmount`,round((round((((((`b`.`totalReceivable` / `b`.`totalamount`) * `b`.`totalTaxAmount`) * 106) / 6) - ((`b`.`totalReceivable` / `b`.`totalamount`) * `b`.`totalTaxAmount`)),2) + ((`b`.`totalReceivable` / `b`.`totalamount`) * `b`.`totalTaxAmount`)),2) AS `amountIncludedTax`,NULL AS `taxID`,`f`.`code` AS `gst`,`j`.`journalID` AS `journalID`,`j`.`formNo` AS `formNo` from (((((((`comp_sales_bad_debt` `a` join `comp_sales_invoice` `b` on((`b`.`badDebtID` = `a`.`ID`))) join `customer` `c` on((`c`.`ID` = `a`.`custID`))) join `tax_master` `f`) join `tax_type` `g`) join `tax_class` `h`) join `tax_group` `i`) join `comp_journal` `j`) where ((`f`.`companyID` = `a`.`companyID`) and (`f`.`code` = 'AJP') and (`a`.`updateAble` = 0) and (`f`.`taxType` = `g`.`ID`) and (`f`.`taxClass` = `h`.`ID`) and (`f`.`taxGroup` = `i`.`ID`) and (`a`.`updateAble` = 0) and (`j`.`companyID` = `a`.`companyID`) and (`j`.`journalID` = convert(`a`.`journalNo` using utf8))) union select `a`.`ID` AS `lineNo`,`a`.`companyID` AS `companyID`,`f`.`taxClass` AS `taxClass`,`h`.`description` AS `taxClassName`,`f`.`taxGroup` AS `taxGroup`,`i`.`description` AS `taxGroupName`,`f`.`taxType` AS `taxType`,`g`.`description` AS `taxTypeName`,'Bad debt Recover' AS `transType`,`a`.`journalNo` AS `ref`,`a`.`transDate` AS `transDate`,NULL AS `supplierID`,`c`.`customerName` AS `supplierName`,concat(`y`.`formNo`,'[',convert(lpad(`y`.`serialNo`,8,'0') using latin1),']') AS `itemName`,round((((((round(`b`.`amountApplied`,2) / round(`y`.`totalamount`,2)) * round(`y`.`totalTaxAmount`,2)) * 106) / 6) - ((round(`b`.`amountApplied`,2) / round(`y`.`totalamount`,2)) * round(`y`.`totalTaxAmount`,2))),2) AS `amountExcludedTax`,`f`.`taxPercentage` AS `taxRate`,round(((`b`.`amountApplied` / `y`.`totalamount`) * `y`.`totalTaxAmount`),2) AS `taxAmount`,round((round((((((`b`.`amountApplied` / `y`.`totalamount`) * `y`.`totalTaxAmount`) * 106) / 6) - ((`b`.`amountApplied` / `y`.`totalamount`) * `y`.`totalTaxAmount`)),2) + ((`b`.`amountApplied` / `y`.`totalamount`) * `y`.`totalTaxAmount`)),2) AS `amountIncludedTax`,NULL AS `taxID`,`f`.`code` AS `gst`,`j`.`journalID` AS `journalID`,`j`.`formNo` AS `formNo` from ((((((((`comp_sales_debt_recover` `a` join `comp_receive_payment_detail` `b` on((`b`.`debtRecoverID` = `a`.`ID`))) left join `comp_sales_invoice` `y` on((`y`.`ID` = `b`.`invoiceID`))) join `customer` `c` on((`c`.`ID` = `a`.`custID`))) join `tax_master` `f`) join `tax_type` `g`) join `tax_class` `h`) join `tax_group` `i`) join `comp_journal` `j`) where ((`f`.`companyID` = `a`.`companyID`) and (`f`.`code` = 'AJS') and (`a`.`updateAble` = 0) and (`f`.`taxType` = `g`.`ID`) and (`f`.`taxClass` = `h`.`ID`) and (`f`.`taxGroup` = `i`.`ID`) and (`j`.`companyID` = `a`.`companyID`) and (`j`.`journalID` = convert(`a`.`journalNo` using utf8))) union select `a`.`ID` AS `lineNo`,`a`.`companyID` AS `companyID`,`f`.`taxClass` AS `taxClass`,`h`.`description` AS `taxClassName`,`f`.`taxGroup` AS `taxGroup`,`i`.`description` AS `taxGroupName`,`f`.`taxType` AS `taxType`,`g`.`description` AS `taxTypeName`,'Supplier Bad debt relief' AS `transType`,`a`.`journalNo` AS `ref`,`a`.`transDate` AS `transDate`,`a`.`supplierID` AS `supplierID`,`c`.`supplierName` AS `supplierName`,concat(`b`.`formNo`,'[',convert(lpad(`b`.`serialNo`,8,'0') using latin1),']') AS `itemName`,round((((((round((`b`.`totalPayable` + ifnull(sum(`p`.`amountApplied`),0)),2) / round(`b`.`totalAmount`,2)) * round(`b`.`totalTaxAmount`,2)) * 106) / 6) - ((round((`b`.`totalPayable` + ifnull(sum(`p`.`amountApplied`),0)),2) / round(`b`.`totalAmount`,2)) * round(`b`.`totalTaxAmount`,2))),2) AS `amountExcludedTax`,`f`.`taxPercentage` AS `taxRate`,round((((`b`.`totalPayable` + ifnull(sum(`p`.`amountApplied`),0)) / `b`.`totalAmount`) * `b`.`totalTaxAmount`),2) AS `taxAmount`,(round((((((round((`b`.`totalPayable` + ifnull(sum(`p`.`amountApplied`),0)),2) / round(`b`.`totalAmount`,2)) * round(`b`.`totalTaxAmount`,2)) * 106) / 6) - ((round((`b`.`totalPayable` + ifnull(sum(`p`.`amountApplied`),0)),2) / round(`b`.`totalAmount`,2)) * round(`b`.`totalTaxAmount`,2))),2) + round((((`b`.`totalPayable` + ifnull(sum(`p`.`amountApplied`),0)) / `b`.`totalAmount`) * `b`.`totalTaxAmount`),2)) AS `amountIncludedTax`,NULL AS `taxID`,`f`.`code` AS `gst`,`j`.`journalID` AS `journalID`,`j`.`formNo` AS `formNo` from (((((((((`comp_purchase_bad_debt` `a` join `comp_supplier_invoice` `b` on((`b`.`badDebtID` = `a`.`ID`))) join `comp_payment_detail` `p` on((`p`.`purchaseInvoiceID` = `b`.`ID`))) join `comp_payment` `pay` on(((`pay`.`ID` = `p`.`paymentID`) and (`pay`.`paymentDate` > `a`.`transDate`)))) join `supplier` `c` on((`c`.`ID` = `a`.`supplierID`))) join `tax_master` `f`) join `tax_type` `g`) join `tax_class` `h`) join `tax_group` `i`) join `comp_journal` `j`) where ((`f`.`companyID` = `a`.`companyID`) and (`f`.`code` = 'AJS') and (`a`.`updateAble` = 0) and (`f`.`taxType` = `g`.`ID`) and (`f`.`taxClass` = `h`.`ID`) and (`f`.`taxGroup` = `i`.`ID`) and (`j`.`companyID` = `a`.`companyID`) and (`j`.`journalID` = convert(`a`.`journalNo` using utf8))) group by `p`.`purchaseInvoiceID` union select `a`.`ID` AS `lineNo`,`a`.`companyID` AS `companyID`,`f`.`taxClass` AS `taxClass`,`h`.`description` AS `taxClassName`,`f`.`taxGroup` AS `taxGroup`,`i`.`description` AS `taxGroupName`,`f`.`taxType` AS `taxType`,`g`.`description` AS `taxTypeName`,'Supplier Bad debt Recover' AS `transType`,`a`.`journalNo` AS `ref`,`a`.`transDate` AS `transDate`,`a`.`suppID` AS `supplierID`,`c`.`supplierName` AS `supplierName`,concat(`y`.`formNo`,'[',convert(lpad(`y`.`serialNo`,8,'0') using latin1),']') AS `itemName`,round((((((round(`b`.`amountApplied`,2) / round(`y`.`totalAmount`,2)) * round(`y`.`totalTaxAmount`,2)) * 106) / 6) - ((round(`b`.`amountApplied`,2) / round(`y`.`totalAmount`,2)) * round(`y`.`totalTaxAmount`,2))),2) AS `amountExcludedTax`,`f`.`taxPercentage` AS `taxRate`,round(((`b`.`amountApplied` / `y`.`totalAmount`) * `y`.`totalTaxAmount`),2) AS `taxAmount`,round((round((((((`b`.`amountApplied` / `y`.`totalAmount`) * `y`.`totalTaxAmount`) * 106) / 6) - ((`b`.`amountApplied` / `y`.`totalAmount`) * `y`.`totalTaxAmount`)),2) + ((`b`.`amountApplied` / `y`.`totalAmount`) * `y`.`totalTaxAmount`)),2) AS `amountIncludedTax`,NULL AS `taxID`,`f`.`code` AS `gst`,`j`.`journalID` AS `journalID`,`j`.`formNo` AS `formNo` from ((((((((`comp_purchase_debt_recover` `a` join `comp_payment_detail` `b` on((`b`.`debtRecoverID` = `a`.`ID`))) left join `comp_supplier_invoice` `y` on((`y`.`ID` = `b`.`purchaseInvoiceID`))) join `supplier` `c` on((`c`.`ID` = `a`.`suppID`))) join `tax_master` `f`) join `tax_type` `g`) join `tax_class` `h`) join `tax_group` `i`) join `comp_journal` `j`) where ((`f`.`companyID` = `a`.`companyID`) and (`f`.`code` = 'AJP') and (`a`.`updateAble` = 0) and (`f`.`taxType` = `g`.`ID`) and (`f`.`taxClass` = `h`.`ID`) and (`f`.`taxGroup` = `i`.`ID`) and (`j`.`companyID` = `a`.`companyID`) and (`j`.`journalID` = convert(`a`.`journalNo` using utf8))) */;

--
-- Final view structure for view `view_inventory_statement`
--

/*!50001 DROP VIEW IF EXISTS `view_inventory_statement`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_inventory_statement` AS select `a`.`companyID` AS `companyID`,`a`.`deliveryDate` AS `transactionDate`,`b`.`itemID` AS `itemID`,`c`.`name` AS `name`,`g`.`supplierName` AS `supplierCustomer`,1 AS `transactionCode`,'Purchase' AS `transactionType`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `formNo`,`a`.`locationID` AS `locationID`,`d`.`desc` AS `location`,`e`.`desc` AS `unitOfMeasure`,`b`.`quantityReceived` AS `quantityIn`,NULL AS `quantityOut`,`a`.`updateAble` AS `updateable` from ((((((`comp_receive_item` `a` left join `comp_receive_item_detail` `b` on((`a`.`ID` = `b`.`receiveID`))) left join `item` `c` on((`b`.`itemID` = `c`.`ID`))) left join `item_details` `f` on((`c`.`ID` = `f`.`itemID`))) join `tbl_location` `d`) join `_sys_um` `e`) join `supplier` `g`) where ((`f`.`locationID` = `d`.`fldid`) and (`e`.`fldid` = `c`.`unitOfMeasureID`) and (`a`.`supplierID` = `f`.`ID`)) union select `a`.`companyID` AS `companyID`,`a`.`adjustmentDate` AS `transactionDate`,`b`.`itemID` AS `itemID`,`c`.`name` AS `name`,`d`.`desc` AS `supplierCustomer`,2 AS `transactionCode`,'stockAdjustment' AS `transactionType`,`a`.`formNo` AS `formNo`,`a`.`locationID` AS `locationID`,`d`.`desc` AS `location`,`e`.`desc` AS `unitOfMeasure`,if(((`b`.`counted` - `b`.`qtyOnHand`) > 0),(`b`.`counted` - `b`.`qtyOnHand`),NULL) AS `quantityIn`,if(((`b`.`counted` - `b`.`qtyOnHand`) < 0),(`b`.`counted` - `b`.`qtyOnHand`),NULL) AS `quantityOut`,`a`.`updateAble` AS `updateable` from (((((`item_adjustment` `a` left join `item_adjustment_detail` `b` on((`a`.`ID` = `b`.`adjustmentID`))) left join `item` `c` on((`b`.`itemID` = `c`.`ID`))) left join `item_details` `f` on((`c`.`ID` = `f`.`itemID`))) left join `tbl_location` `d` on((`d`.`fldid` = `a`.`locationID`))) left join `_sys_um` `e` on((`e`.`fldid` = `b`.`unitOfMeasureID`))) union select `a`.`companyID` AS `companyID`,`a`.`deliveryOrderDate` AS `transactionDate`,`b`.`itemID` AS `itemID`,`c`.`name` AS `name`,`g`.`customerName` AS `supplierCustomer`,3 AS `transactionCode`,'Sale' AS `transactionType`,`a`.`formNo` AS `formNo`,`a`.`locationID` AS `locationID`,`d`.`desc` AS `location`,`e`.`desc` AS `unitOfMeasure`,NULL AS `quantityIn`,(`b`.`quantitySent` * -(1)) AS `quantityOut`,`a`.`updateAble` AS `updateable` from ((((((`comp_delivery_order` `a` left join `comp_delivery_detail` `b` on((`a`.`ID` = `b`.`deliveryID`))) left join `item` `c` on((`b`.`itemID` = `c`.`ID`))) left join `item_details` `f` on((`c`.`ID` = `f`.`itemID`))) join `tbl_location` `d`) join `_sys_um` `e`) join `customer` `g`) where ((`a`.`locationID` = `d`.`fldid`) and (`e`.`fldid` = `c`.`unitOfMeasureID`) and (`a`.`customerID` = `f`.`ID`)) union select `a`.`companyID` AS `companyID`,`a`.`dateTransfer` AS `transactionDate`,`b`.`itemID` AS `itemID`,`c`.`name` AS `name`,`d`.`desc` AS `supplierCustomer`,4 AS `transactionCode`,'TransferOut' AS `transactionType`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`ID`,8,'0') using latin1),']') AS `formNo`,`a`.`fromLocationID` AS `locationID`,`d`.`desc` AS `location`,`e`.`desc` AS `unitOfMeasure`,NULL AS `quantityIn`,(`b`.`quantity` * -(1)) AS `quantityOut`,`a`.`updateable` AS `updateable` from ((((`comp_location_transfer` `a` left join `comp_location_transfer_detail` `b` on((`a`.`ID` = `b`.`locationTransferID`))) left join `item` `c` on((`b`.`itemID` = `c`.`ID`))) join `tbl_location` `d`) join `_sys_um` `e`) where ((`a`.`fromLocationID` = `d`.`fldid`) and (`e`.`fldid` = `c`.`unitOfMeasureID`)) union select `a`.`companyID` AS `companyID`,`a`.`dateTransfer` AS `transactionDate`,`b`.`itemID` AS `itemID`,`c`.`name` AS `name`,`d`.`desc` AS `supplierCustomer`,5 AS `transactionCode`,'TransferIn' AS `transactionType`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`ID`,8,'0') using latin1),']') AS `formNo`,`a`.`toLocationID` AS `locationID`,`d`.`desc` AS `location`,`e`.`desc` AS `unitOfMeasure`,`b`.`quantity` AS `quantityIn`,NULL AS `quantityOut`,`a`.`updateable` AS `updateable` from ((((`comp_location_transfer` `a` left join `comp_location_transfer_detail` `b` on((`a`.`ID` = `b`.`locationTransferID`))) left join `item` `c` on((`b`.`itemID` = `c`.`ID`))) join `tbl_location` `d`) join `_sys_um` `e`) where ((`a`.`fromLocationID` = `d`.`fldid`) and (`e`.`fldid` = `c`.`unitOfMeasureID`)) */;

--
-- Final view structure for view `view_inventory_transaction`
--

/*!50001 DROP VIEW IF EXISTS `view_inventory_transaction`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_inventory_transaction` AS select `ridet`.`ID` AS `indexing`,`ri`.`ID` AS `ID`,`ri`.`companyID` AS `companyID`,`ridet`.`itemID` AS `itemID`,`ri`.`locationID` AS `locationID`,`ridet`.`createdTS` AS `createdTS`,`s`.`supplierName` AS `supplierName`,if((`ri`.`purchaseOrderID` = '-1'),`ri`.`formNo`,concat(`ri`.`formNo`,'[',convert(lpad(`ri`.`serialNo`,8,'0') using latin1),']')) AS `formNo`,`ri`.`deliveryDate` AS `transDate`,`um`.`desc` AS `um`,'Transfer In' AS `transType`,`ridet`.`quantityReceived` AS `qtyIn`,'0' AS `qtyOut` from ((((`comp_receive_item_detail` `ridet` left join `comp_receive_item` `ri` on((`ri`.`ID` = `ridet`.`receiveID`))) left join `supplier` `s` on((`s`.`ID` = `ri`.`supplierID`))) left join `item` `i` on((`i`.`ID` = `ridet`.`itemID`))) left join `_sys_um` `um` on((`um`.`fldid` = `ridet`.`umID`))) where (`ri`.`updateAble` = 0) union select `outdet`.`ID` AS `indexing`,`do`.`ID` AS `ID`,`do`.`companyID` AS `companyID`,`dodet`.`itemID` AS `itemID`,`do`.`locationID` AS `locationID`,`outdet`.`createdTS` AS `createdTS`,`c`.`customerName` AS `supplierName`,concat(`do`.`formNo`,'[',convert(lpad(`do`.`serialNo`,8,'0') using latin1),']') AS `formNo`,`do`.`deliveryOrderDate` AS `transDate`,`um`.`desc` AS `um`,'Transfer Out' AS `transType`,'0' AS `qtyIn`,`outdet`.`qty` AS `qtyOut` from (((((`comp_receive_delivery_conn` `outdet` left join `comp_delivery_detail` `dodet` on((`dodet`.`ID` = `outdet`.`deliveryDetailID`))) left join `comp_delivery_order` `do` on((`do`.`ID` = `dodet`.`deliveryID`))) left join `customer` `c` on((`c`.`ID` = `do`.`customerID`))) left join `item` `i` on((`i`.`ID` = `dodet`.`itemID`))) left join `_sys_um` `um` on((`um`.`fldid` = `i`.`unitOfMeasureID`))) where (`outdet`.`type` = 1) union select `outdet`.`ID` AS `indexing`,`loc`.`ID` AS `ID`,`loc`.`companyID` AS `companyID`,`locdet`.`itemID` AS `itemID`,`loc`.`fromLocationID` AS `locationID`,`outdet`.`createdTS` AS `createdTS`,`user`.`username` AS `supplierName`,concat(`loc`.`formNo`,'[',convert(lpad(`loc`.`ID`,8,'0') using latin1),']') AS `formNo`,`loc`.`dateTransfer` AS `transDate`,`um`.`desc` AS `um`,'Transfer Out' AS `transType`,'0' AS `qtyIn`,`outdet`.`qty` AS `qtyOut` from (((((`comp_receive_delivery_conn` `outdet` left join `comp_location_transfer_detail` `locdet` on((`locdet`.`ID` = `outdet`.`deliveryDetailID`))) left join `comp_location_transfer` `loc` on((`loc`.`ID` = `locdet`.`locationTransferID`))) left join `tbl_usermaster` `user` on((`user`.`fldid` = `loc`.`createdby`))) left join `item` `i` on((`i`.`ID` = `locdet`.`itemID`))) left join `_sys_um` `um` on((`um`.`fldid` = `i`.`unitOfMeasureID`))) where (`outdet`.`type` = 2) union select `outdet`.`ID` AS `indexing`,`loc`.`ID` AS `ID`,`loc`.`companyID` AS `companyID`,`locdet`.`itemID` AS `itemID`,`si`.`locationID` AS `locationID`,`outdet`.`createdTS` AS `createdTS`,`c`.`customerName` AS `supplierName`,concat(`loc`.`formNo`,'[',convert(lpad(`loc`.`ID`,8,'0') using latin1),']') AS `formNo`,`loc`.`debitNoteDate` AS `transDate`,`um`.`desc` AS `um`,'Transfer Out' AS `transType`,'0' AS `qtyIn`,`outdet`.`qty` AS `qtyOut` from (((((((`comp_receive_delivery_conn` `outdet` left join `comp_sales_debitnote_detail` `locdet` on((`locdet`.`ID` = `outdet`.`deliveryDetailID`))) left join `comp_sales_debitnote` `loc` on((`loc`.`ID` = `locdet`.`debitnoteID`))) left join `comp_sales_invoice_detail` `sidet` on((`sidet`.`ID` = `locdet`.`invoiceDetailID`))) left join `comp_sales_invoice` `si` on((`si`.`ID` = `sidet`.`invoiceID`))) left join `customer` `c` on((`c`.`ID` = `si`.`customerID`))) left join `item` `i` on((`i`.`ID` = `locdet`.`itemID`))) left join `_sys_um` `um` on((`um`.`fldid` = `i`.`unitOfMeasureID`))) where (`outdet`.`type` = 3) union select `outdet`.`ID` AS `indexing`,`loc`.`ID` AS `ID`,`loc`.`companyID` AS `companyID`,`locdet`.`itemID` AS `itemID`,if((`si`.`purchaseInvoiceCodeID` = '1'),`ri`.`locationID`,`si`.`locationID`) AS `locationID`,`outdet`.`createdTS` AS `createdTS`,`s`.`supplierName` AS `supplierName`,concat(`loc`.`formNo`,'[',convert(lpad(`loc`.`ID`,8,'0') using latin1),']') AS `formNo`,`loc`.`debitNoteDate` AS `transDate`,`um`.`desc` AS `um`,'Transfer Out' AS `transType`,'0' AS `qtyIn`,`outdet`.`qty` AS `qtyOut` from (((((((((`comp_receive_delivery_conn` `outdet` left join `comp_supplier_debitnote_detail` `locdet` on((`locdet`.`ID` = `outdet`.`deliveryDetailID`))) left join `comp_supplier_debitnote` `loc` on((`loc`.`ID` = `locdet`.`debitnoteID`))) left join `comp_supplier_invoice` `si` on((`si`.`ID` = `loc`.`supplierInvoiceID`))) left join `comp_supplier_invoice_detail` `sidet` on((`sidet`.`ID` = `locdet`.`invoiceDetailID`))) left join `comp_receive_item_detail` `ridet` on((`ridet`.`ID` = `sidet`.`receiveID`))) left join `comp_receive_item` `ri` on((`ri`.`ID` = `ridet`.`receiveID`))) left join `supplier` `s` on((`s`.`ID` = `si`.`supplierID`))) left join `item` `i` on((`i`.`ID` = `locdet`.`itemID`))) left join `_sys_um` `um` on((`um`.`fldid` = `i`.`unitOfMeasureID`))) where (`outdet`.`type` = 4) union select `outdet`.`ID` AS `indexing`,`loc`.`ID` AS `ID`,`loc`.`companyID` AS `companyID`,`locdet`.`itemID` AS `itemID`,`loc`.`locationID` AS `locationID`,`outdet`.`createdTS` AS `createdTS`,`loc`.`paymentFrom` AS `supplierName`,concat(`loc`.`formNo`,'[',convert(lpad(`loc`.`serialNo`,8,'0') using latin1),']') AS `formNo`,`loc`.`salesInvoiceDate` AS `transDate`,`um`.`desc` AS `um`,'Transfer Out' AS `transType`,'0' AS `qtyIn`,`outdet`.`qty` AS `qtyOut` from ((((`comp_receive_delivery_conn` `outdet` left join `comp_cash_sales_detail` `locdet` on((`locdet`.`ID` = `outdet`.`deliveryDetailID`))) left join `comp_cash_sales` `loc` on((`loc`.`ID` = `locdet`.`invoiceID`))) left join `item` `i` on((`i`.`ID` = `locdet`.`itemID`))) left join `_sys_um` `um` on((`um`.`fldid` = `i`.`unitOfMeasureID`))) where (`outdet`.`type` = 5) union select `outdet`.`ID` AS `indexing`,`loc`.`ID` AS `ID`,`loc`.`companyID` AS `companyID`,`locdet`.`itemID` AS `itemID`,`loc`.`locationID` AS `locationID`,`outdet`.`createdTS` AS `createdTS`,`user`.`username` AS `supplierName`,concat(`loc`.`formNo`,'[',convert(lpad(`loc`.`ID`,8,'0') using latin1),']') AS `formNo`,`loc`.`adjustmentDate` AS `transDate`,`um`.`desc` AS `um`,'Transfer Out' AS `transType`,'0' AS `qtyIn`,`outdet`.`qty` AS `qtyOut` from (((((`comp_receive_delivery_conn` `outdet` left join `item_adjustment_detail` `locdet` on((`locdet`.`ID` = `outdet`.`deliveryDetailID`))) left join `item_adjustment` `loc` on((`loc`.`ID` = `locdet`.`adjustmentID`))) left join `tbl_usermaster` `user` on((`user`.`fldid` = `loc`.`createdBy`))) left join `item` `i` on((`i`.`ID` = `locdet`.`itemID`))) left join `_sys_um` `um` on((`um`.`fldid` = `i`.`unitOfMeasureID`))) where (`outdet`.`type` = 6) order by `formNo` */;

--
-- Final view structure for view `view_inventorylist_subtotal`
--

/*!50001 DROP VIEW IF EXISTS `view_inventorylist_subtotal`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_inventorylist_subtotal` AS select `a`.`companyID` AS `companyid`,sum(`b`.`balanceItem`) AS `quantity`,`a`.`locationID` AS `locationid`,`b`.`itemID` AS `itemID`,concat('[',`c`.`itemCode`,']',`c`.`name`) AS `itemName`,`d`.`name` AS `category`,`b`.`description` AS `description`,sum((`b`.`balanceItem` * `b`.`unitPrice`)) AS `stockValue` from (((`comp_receive_item` `a` join `comp_receive_item_detail` `b`) join `item` `c`) join `comp_item_category` `d`) where ((`a`.`ID` = `b`.`receiveID`) and (`b`.`balanceItem` > 0) and (`c`.`ID` = `b`.`itemID`) and (`c`.`itemCategoryID` = `d`.`ID`)) group by `a`.`companyID`,`a`.`locationID`,`b`.`itemID`,`b`.`itemName`,`category`,`b`.`description` */;

--
-- Final view structure for view `view_item_details`
--

/*!50001 DROP VIEW IF EXISTS `view_item_details`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_item_details` AS select `b`.`companyID` AS `companyid`,`a`.`itemID` AS `itemid`,concat('[',`c`.`itemCode`,']',`c`.`name`) AS `itemName`,`c`.`description` AS `description`,`b`.`locationID` AS `locationid`,sum(`a`.`balanceItem`) AS `onHandQty`,`a`.`umID` AS `umID`,`c`.`inventoriesID` AS `acctID`,`d`.`code` AS `location`,`e`.`code` AS `unitOfMeasure` from ((((`comp_receive_item_detail` `a` join `comp_receive_item` `b`) join `item` `c`) join `tbl_location` `d`) join `_sys_um` `e`) where ((`a`.`receiveID` = `b`.`ID`) and (`a`.`itemID` = `c`.`ID`) and (`d`.`fldid` = `b`.`locationID`) and (`e`.`fldid` = `a`.`umID`) and (`a`.`balanceItem` > 0)) group by `b`.`companyID`,`a`.`itemID`,`a`.`itemName`,`c`.`description`,`b`.`locationID`,`a`.`umID`,`acctID`,`location`,`unitOfMeasure` */;

--
-- Final view structure for view `view_item_quantityonhand`
--

/*!50001 DROP VIEW IF EXISTS `view_item_quantityonhand`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_item_quantityonhand` AS select `a`.`companyID` AS `companyID`,`a`.`locationID` AS `locationID`,`b`.`itemID` AS `itemID`,`b`.`itemCode` AS `itemCode`,`b`.`itemName` AS `itemName`,`b`.`umID` AS `umID`,sum(`b`.`balanceItem`) AS `quantityOnHand` from (`comp_receive_item` `a` left join `comp_receive_item_detail` `b` on(((`a`.`ID` = `b`.`receiveID`) and (`b`.`balanceItem` > 0)))) group by `a`.`companyID`,`a`.`locationID`,`b`.`itemID`,`b`.`itemCode`,`b`.`itemName`,`b`.`umID` */;

--
-- Final view structure for view `view_item_quantityonhand_confirm`
--

/*!50001 DROP VIEW IF EXISTS `view_item_quantityonhand_confirm`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_item_quantityonhand_confirm` AS select `a`.`companyID` AS `companyID`,`a`.`locationID` AS `locationID`,`b`.`itemID` AS `itemID`,`b`.`itemCode` AS `itemCode`,`b`.`itemName` AS `itemName`,`b`.`umID` AS `umID`,sum(`b`.`balanceItem`) AS `quantityOnHand` from (`comp_receive_item` `a` left join `comp_receive_item_detail` `b` on((`a`.`ID` = `b`.`receiveID`))) where ((`a`.`updateAble` = 0) and (`b`.`balanceItem` > 0)) group by `a`.`companyID`,`a`.`locationID`,`b`.`itemID`,`b`.`itemCode`,`b`.`itemName`,`b`.`umID` */;

--
-- Final view structure for view `view_journal_table`
--

/*!50001 DROP VIEW IF EXISTS `view_journal_table`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_journal_table` AS select distinct `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,`a`.`referenceNo` AS `referenceNo`,'comp_cash_sales' AS `tableName`,`b`.`journalID` AS `journalID`,`b`.`formNo` AS `formNo` from (`comp_cash_sales` `a` join `comp_journal` `b`) where ((convert(`a`.`journalNo` using utf8) = `b`.`journalID`) and (`a`.`is_delete` = 0)) union select distinct `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,`a`.`referenceNo` AS `referenceNo`,'comp_payment' AS `comp_payment`,`b`.`journalID` AS `journalID`,`b`.`formNo` AS `formNo` from (`comp_payment` `a` join `comp_journal` `b`) where ((convert(`a`.`journalNo` using utf8) = `b`.`journalID`) and (`a`.`is_delete` = 0)) union select distinct `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,`a`.`referenceNo` AS `referenceNo`,'comp_payment_others' AS `comp_payment_others`,`b`.`journalID` AS `journalID`,`b`.`formNo` AS `formNo` from (`comp_payment_others` `a` join `comp_journal` `b`) where ((convert(`a`.`journalNo` using utf8) = `b`.`journalID`) and (`a`.`is_delete` = 0)) union select distinct `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,`a`.`formNo` AS `referenceNo`,'comp_purchase_order' AS `comp_purchase_order`,`b`.`journalID` AS `journalID`,`b`.`formNo` AS `formNo` from (`comp_purchase_order` `a` join `comp_journal` `b`) where ((convert(`a`.`journalNo` using utf8) = `b`.`journalID`) and (`a`.`is_delete` = 0)) union select distinct `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,`a`.`referenceNo` AS `referenceNo`,'comp_receive_payment' AS `comp_receive_payment`,`b`.`journalID` AS `journalID`,`b`.`formNo` AS `formNo` from (`comp_receive_payment` `a` join `comp_journal` `b`) where ((convert(`a`.`journalNo` using utf8) = `b`.`journalID`) and (`a`.`is_delete` = 0)) union select distinct `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,`a`.`referenceNo` AS `referenceNo`,'comp_receive_payment_others' AS `comp_receive_payment_others`,`b`.`journalID` AS `journalID`,`b`.`formNo` AS `formNo` from (`comp_receive_payment_others` `a` join `comp_journal` `b`) where ((convert(`a`.`journalNo` using utf8) = `b`.`journalID`) and (`a`.`is_delete` = 0)) union select distinct `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,`b`.`formNo` AS `referenceNo`,'comp_sales_creditnote' AS `comp_sales_creditnote`,`b`.`journalID` AS `journalID`,`b`.`formNo` AS `formNo` from (`comp_sales_creditnote` `a` join `comp_journal` `b`) where ((convert(`a`.`journalNo` using utf8) = `b`.`journalID`) and (`a`.`is_delete` = 0)) union select distinct `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,`b`.`formNo` AS `referenceNo`,'comp_sales_debitnote' AS `comp_sales_debitnote`,`b`.`journalID` AS `journalID`,`b`.`formNo` AS `formNo` from (`comp_sales_debitnote` `a` join `comp_journal` `b`) where ((convert(`a`.`journalNo` using utf8) = `b`.`journalID`) and (`a`.`is_delete` = 0)) union select distinct `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,`a`.`customerPoNo` AS `referenceNo`,'comp_sales_invoice' AS `comp_sales_invoice`,`b`.`journalID` AS `journalID`,`b`.`formNo` AS `formNo` from (`comp_sales_invoice` `a` join `comp_journal` `b`) where ((convert(`a`.`journalNo` using utf8) = `b`.`journalID`) and (`a`.`is_delete` = 0)) union select distinct `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,`b`.`formNo` AS `referenceNo`,'comp_supplier_creditnote' AS `comp_supplier_creditnote`,`b`.`journalID` AS `journalID`,`b`.`formNo` AS `formNo` from (`comp_supplier_creditnote` `a` join `comp_journal` `b`) where ((convert(`a`.`journalNo` using utf8) = `b`.`journalID`) and (`a`.`is_delete` = 0)) union select distinct `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,`b`.`formNo` AS `referenceNo`,'comp_supplier_debitnote' AS `comp_supplier_debitnote`,`b`.`journalID` AS `journalID`,`b`.`formNo` AS `formNo` from (`comp_supplier_debitnote` `a` join `comp_journal` `b`) where ((convert(`a`.`journalNo` using utf8) = `b`.`journalID`) and (`a`.`is_delete` = 0)) union select distinct `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,`a`.`supplierInvoiceNo` AS `referenceNo`,'comp_supplier_invoice' AS `comp_supplier_invoice`,`b`.`journalID` AS `journalID`,`b`.`formNo` AS `formNo` from (`comp_supplier_invoice` `a` join `comp_journal` `b`) where ((convert(`a`.`journalNo` using utf8) = `b`.`journalID`) and (`a`.`is_delete` = 0)) union select distinct `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,`b`.`formNo` AS `referenceNo`,'comp_delivery_order' AS `comp_delivery_order`,`b`.`journalID` AS `journalID`,`b`.`formNo` AS `formNo` from (`comp_delivery_order` `a` join `comp_journal` `b`) where (convert(`a`.`journalNo` using utf8) = `b`.`journalID`) union select distinct `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,`a`.`reference` AS `referenceNo`,'comp_gst_transaction' AS `comp_gst_transaction`,`b`.`journalID` AS `journalID`,`b`.`formNo` AS `formNo` from (`comp_gst_transaction` `a` join `comp_journal` `b`) where (convert(`a`.`journalNo` using utf8) = `b`.`journalID`) union select distinct `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,`a`.`supplierDoNo` AS `referenceNo`,'comp_receive_item' AS `comp_receive_item`,`b`.`journalID` AS `journalID`,`b`.`formNo` AS `formNo` from (`comp_receive_item` `a` join `comp_journal` `b`) where (convert(`a`.`journalNo` using utf8) = `b`.`journalID`) */;

--
-- Final view structure for view `view_open_ar_invoice`
--

/*!50001 DROP VIEW IF EXISTS `view_open_ar_invoice`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_open_ar_invoice` AS select `comp_sales_invoice`.`companyID` AS `companyID`,`comp_sales_invoice`.`salesInvoiceDate` AS `salesInvoiceDate`,date_format(`comp_sales_invoice`.`salesInvoiceDate`,'%Y') AS `salesYear`,date_format(`comp_sales_invoice`.`salesInvoiceDate`,'%m') AS `salesMonth`,date_format(`comp_sales_invoice`.`salesInvoiceDate`,'%b') AS `slsMonth`,(`comp_sales_invoice`.`totalReceivable` * if((`comp_sales_invoice`.`exchangeRate` = 0),1,`comp_sales_invoice`.`exchangeRate`)) AS `totalAmount` from `comp_sales_invoice` where (`comp_sales_invoice`.`totalReceivable` <> 0) */;

--
-- Final view structure for view `view_salescreditnote`
--

/*!50001 DROP VIEW IF EXISTS `view_salescreditnote`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_salescreditnote` AS select `si`.`ID` AS `invoiceDetailID`,`_sys_um`.`code` AS `unitOfMeasure`,`si`.`ID` AS `ID`,`si`.`invoiceID` AS `invoiceID`,`si`.`doID` AS `doID`,`si`.`lineNo` AS `lineNo`,`si`.`itemID` AS `itemID`,`si`.`umID` AS `umID`,`si`.`quantity` AS `quantity`,`si`.`unitPrice` AS `unitPrice`,`si`.`amountExcludedTax` AS `amountExcludedTax`,`si`.`taxID` AS `taxID`,`si`.`taxRate` AS `taxRate`,`si`.`taxAmount` AS `taxAmount`,`si`.`amountIncludedTax` AS `amountIncludedTax`,`si`.`accountID` AS `accountID`,`si`.`createdBy` AS `createdBy`,`si`.`createdTS` AS `createdTS`,`si`.`updatedBy` AS `updatedBy`,`si`.`updatedTS` AS `updatedTS`,`tax_master`.`code` AS `code`,`item`.`itemCode` AS `itemCode`,`item`.`name` AS `name`,`si`.`itemdescription` AS `description`,((`si`.`quantity` + ifnull((select sum(`dnd`.`quantity`) from `comp_sales_debitnote_detail` `dnd` where (`si`.`ID` = `dnd`.`invoiceDetailID`)),0)) - ifnull((select sum(`scd`.`quantity`) from `comp_sales_creditnote_detail` `scd` where (`scd`.`invoiceDetailID` = `si`.`ID`)),0)) AS `exactQty` from (((`comp_sales_invoice_detail` `si` left join `tax_master` on((`tax_master`.`ID` = `si`.`taxID`))) left join `item` on((`si`.`itemID` = `item`.`ID`))) left join `_sys_um` on((`_sys_um`.`fldid` = `si`.`umID`))) */;

--
-- Final view structure for view `view_salesdebitnote`
--

/*!50001 DROP VIEW IF EXISTS `view_salesdebitnote`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_salesdebitnote` AS select `si`.`ID` AS `invoiceDetailID`,`_sys_um`.`code` AS `unitOfMeasure`,`si`.`ID` AS `ID`,`si`.`invoiceID` AS `invoiceID`,`si`.`doID` AS `doID`,`si`.`lineNo` AS `lineNo`,`si`.`itemID` AS `itemID`,`si`.`umID` AS `umID`,`si`.`quantity` AS `quantity`,`si`.`unitPrice` AS `unitPrice`,`si`.`amountExcludedTax` AS `amountExcludedTax`,`si`.`taxID` AS `taxID`,`si`.`taxRate` AS `taxRate`,`si`.`taxAmount` AS `taxAmount`,`si`.`amountIncludedTax` AS `amountIncludedTax`,`si`.`accountID` AS `accountID`,`si`.`createdBy` AS `createdBy`,`si`.`createdTS` AS `createdTS`,`si`.`updatedBy` AS `updatedBy`,`si`.`updatedTS` AS `updatedTS`,`tax_master`.`code` AS `code`,`item`.`itemCode` AS `itemCode`,`item`.`name` AS `name`,`si`.`itemdescription` AS `description`,((`si`.`quantity` + ifnull((select sum(`dnd`.`quantity`) from `comp_sales_debitnote_detail` `dnd` where (`si`.`ID` = `dnd`.`invoiceDetailID`)),0)) - ifnull((select sum(`scd`.`quantity`) from `comp_sales_creditnote_detail` `scd` where (`scd`.`invoiceDetailID` = `si`.`ID`)),0)) AS `exactQty` from (((`comp_sales_invoice_detail` `si` left join `tax_master` on((`tax_master`.`ID` = `si`.`taxID`))) left join `item` on((`si`.`itemID` = `item`.`ID`))) left join `_sys_um` on((`_sys_um`.`fldid` = `si`.`umID`))) */;

--
-- Final view structure for view `view_search`
--

/*!50001 DROP VIEW IF EXISTS `view_search`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_search` AS select `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,concat(if((`a`.`updateAble` = 1),'arTransaction/editcashsale/','arReports/cashsalelistDetail/'),`a`.`ID`) AS `searchLink`,concat('Cash Sale&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',convert(date_format(`a`.`salesInvoiceDate`,'%d/%m/%Y') using latin1),'&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`a`.`paymentFrom`) AS `searchKey`,`a`.`salesInvoiceDate` AS `transDate` from `comp_cash_sales` `a` union select `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,concat(if((`a`.`updateAble` = 1),'sotransaction/SalesDO/','soreport/DeliveryOrderDetail/'),`a`.`ID`) AS `searchLink`,concat('Delivery Order&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',convert(date_format(`a`.`deliveryOrderDate`,'%d/%m/%Y') using latin1),'&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`b`.`customerName`) AS `searchKey`,`a`.`deliveryOrderDate` AS `transDate` from (`comp_delivery_order` `a` join `customer` `b`) where (`a`.`customerID` = `b`.`ID`) union select `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,concat(if((`a`.`updateable` = 1),'locationtransfer/edit/','locationtransfer/reportdetail/'),`a`.`ID`) AS `searchLink`,concat('Inventory Transfer&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',convert(`a`.`formNo` using utf8),'[',convert(lpad(`a`.`serialNo`,8,'0') using utf8),']&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',convert(date_format(`a`.`dateTransfer`,'%d/%m/%Y') using utf8),'&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`b`.`code`,'&nbsp',`b`.`desc`) AS `searchKey`,`a`.`dateTransfer` AS `transDate` from (`comp_location_transfer` `a` join `tbl_location` `b`) where (`a`.`fromLocationID` = `b`.`fldid`) union select `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,concat(if((`a`.`updateAble` = 1),'aptransaction/editPayment/','Apreports/supplierpaymentDetail/'),`a`.`ID`) AS `searchLink`,concat('Payment&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',convert(date_format(`a`.`paymentDate`,'%d/%m/%Y') using latin1),'&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`b`.`supplierName`) AS `searchKey`,`a`.`paymentDate` AS `transDate` from (`comp_payment` `a` join `supplier` `b`) where (`a`.`supplierID` = `b`.`ID`) union select `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,concat(if((`a`.`updateAble` = 1),'othersPayment/editPayWithoutItem/','othersPayment/otherpaywithoutDetail/'),`a`.`ID`) AS `searchLink`,concat('Payment Others&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',convert(date_format(`a`.`paymentDate`,'%d/%m/%Y') using latin1),'&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`a`.`payTo`) AS `searchKey`,`a`.`paymentDate` AS `transDate` from `comp_payment_others` `a` union select `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,concat(if((`a`.`updateAble` = 1),'PO_Transaction/edit/','purchaseReports/PODetails/'),`a`.`ID`) AS `searchLink`,concat('Purchase Order&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',convert(date_format(`a`.`poDate`,'%d/%m/%Y') using latin1),'&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`b`.`supplierName`) AS `searchKey`,`a`.`poDate` AS `transDate` from (`comp_purchase_order` `a` join `supplier` `b`) where (`a`.`supplierID` = `b`.`ID`) union select `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,concat('soreport/SalesQuotationDetail/',`a`.`ID`) AS `searchLink`,concat('Quotation&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',convert(date_format(`a`.`quotationDate`,'%d/%m/%Y') using latin1),'&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`b`.`customerName`) AS `searchKey`,`a`.`quotationDate` AS `transDate` from (`comp_quotation` `a` join `customer` `b`) where (`a`.`customerID` = `b`.`ID`) union select `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,concat(if((`a`.`updateAble` = 1),'receiveItems/editReceiveItem/','receiveItems/ReceiveItemDetails/'),`a`.`ID`) AS `searchLink`,concat('Receive Item&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',convert(date_format(`a`.`deliveryDate`,'%d/%m/%Y') using latin1),'&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`b`.`supplierName`) AS `searchKey`,`a`.`deliveryDate` AS `transDate` from (`comp_receive_item` `a` join `supplier` `b`) where (`a`.`supplierID` = `b`.`ID`) union select `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,concat(if((`a`.`updateAble` = 1),'artransaction/editReceivePayment/','arReports/compRecPaymentDetail/'),`a`.`ID`) AS `searchLink`,concat('Receive Payment&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',convert(date_format(`a`.`receivePaymentDate`,'%d/%m/%Y') using latin1),'&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`b`.`customerName`) AS `searchKey`,`a`.`receivePaymentDate` AS `transDate` from (`comp_receive_payment` `a` join `customer` `b`) where (`a`.`customerID` = `b`.`ID`) union select `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,concat(if((`a`.`updateAble` = 1),'gltransaction/editotherreceive/','glreports/otherReceiveAdviceRpt/'),`a`.`ID`) AS `searchLink`,concat('Receive Payment Others&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',convert(date_format(`a`.`receivePaymentDate`,'%d/%m/%Y') using latin1),'&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`a`.`receiveFrom`) AS `searchKey`,`a`.`receivePaymentDate` AS `transDate` from `comp_receive_payment_others` `a` union select `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,concat(if((`a`.`updateAble` = 1),'artransaction/editSaleCreditNote/','arreports/salescreditnoteDetail/'),`a`.`ID`) AS `searchLink`,concat('Sales Credit Note&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',convert(date_format(`a`.`creditNoteDate`,'%d/%m/%Y') using latin1),'&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`b`.`customerName`) AS `searchKey`,`a`.`creditNoteDate` AS `transDate` from (`comp_sales_creditnote` `a` join `customer` `b`) where (`a`.`customerID` = `b`.`ID`) union select `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,concat(if((`a`.`updateAble` = 1),'artransaction/editSaleDebitNote/','arreports/salesdebitnoteDetail/'),`a`.`ID`) AS `searchLink`,concat('Sales Debit Note&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',convert(date_format(`a`.`debitNoteDate`,'%d/%m/%Y') using latin1),'&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`b`.`customerName`) AS `searchKey`,`a`.`debitNoteDate` AS `transDate` from (`comp_sales_debitnote` `a` join `customer` `b`) where (`a`.`customerID` = `b`.`ID`) union select `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,concat('arReports/salesInvoiceDetail/',`a`.`ID`) AS `searchLink`,concat('Sales Invoice&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',convert(date_format(`a`.`salesInvoiceDate`,'%d/%m/%Y') using latin1),'&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`b`.`customerName`) AS `searchKey`,`a`.`salesInvoiceDate` AS `transDate` from (`comp_sales_invoice` `a` join `customer` `b`) where (`a`.`customerID` = `b`.`ID`) union select `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,concat('soreport/SalesOrderDetail/',`a`.`ID`) AS `searchLink`,concat('Sales Order&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',convert(date_format(`a`.`salesOrderDate`,'%d/%m/%Y') using latin1),'&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`b`.`customerName`) AS `searchKey`,`a`.`salesOrderDate` AS `transDate` from (`comp_sales_order` `a` join `customer` `b`) where (`a`.`customerID` = `b`.`ID`) union select `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,concat(if((`a`.`updateAble` = 1),'aptransaction/editCreditNote/','Apreports/creditNoteDetail/'),`a`.`ID`) AS `searchLink`,concat('Supplier Credit Note&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',convert(date_format(`a`.`creditNoteDate`,'%d/%m/%Y') using latin1),'&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`b`.`supplierName`) AS `searchKey`,`a`.`creditNoteDate` AS `transDate` from (`comp_supplier_creditnote` `a` join `supplier` `b`) where (`a`.`supplierID` = `b`.`ID`) union select `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,concat(if((`a`.`updateAble` = 1),'aptransaction/editDebitNote/','Apreports/debitNoteDetail/'),`a`.`ID`) AS `searchLink`,concat('Supplier Debit Note&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',convert(date_format(`a`.`debitNoteDate`,'%d/%m/%Y') using latin1),'&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`b`.`supplierName`) AS `searchKey`,`a`.`debitNoteDate` AS `transDate` from (`comp_supplier_debitnote` `a` join `supplier` `b`) where (`a`.`supplierID` = `b`.`ID`) union select `a`.`ID` AS `ID`,`a`.`companyID` AS `companyID`,concat('apreports/purchaseInvoiceDetail/',`a`.`ID`) AS `searchLink`,concat('Purchase Invoice&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',convert(date_format(`a`.`invoiceDate`,'%d/%m/%Y') using latin1),'&nbsp<i class="i-play" aria-hidden="true"></i>&nbsp',`b`.`supplierName`) AS `searchKey`,`a`.`invoiceDate` AS `transDate` from (`comp_supplier_invoice` `a` join `supplier` `b`) where (`a`.`supplierID` = `b`.`ID`) */;

--
-- Final view structure for view `view_serial_comp_cash_sales`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_cash_sales`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_serial_comp_cash_sales` AS select `c`.`ID` AS `companyID`,ifnull(((select max(`t`.`serialNo`) from `comp_cash_sales` `t` where (`c`.`ID` = `t`.`companyID`)) + 1),ifnull((select `frm`.`formInitialNo` from `comp_form_control` `frm` where ((`frm`.`companyID` = `c`.`ID`) and (`frm`.`formID` = 121))),1)) AS `nextSerialNo` from `company` `c` */;

--
-- Final view structure for view `view_serial_comp_delivery_order`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_delivery_order`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_serial_comp_delivery_order` AS select `c`.`ID` AS `companyID`,ifnull(((select max(`t`.`serialNo`) from `comp_delivery_order` `t` where (`c`.`ID` = `t`.`companyID`)) + 1),ifnull((select `frm`.`formInitialNo` from `comp_form_control` `frm` where ((`frm`.`companyID` = `c`.`ID`) and (`frm`.`formID` = 49))),1)) AS `nextSerialNo` from `company` `c` */;

--
-- Final view structure for view `view_serial_comp_gst_transaction`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_gst_transaction`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_serial_comp_gst_transaction` AS select `c`.`ID` AS `companyID`,ifnull(((select max(`t`.`serialNo`) from `comp_gst_transaction` `t` where (`c`.`ID` = `t`.`companyID`)) + 1),ifnull((select `frm`.`formInitialNo` from `comp_form_control` `frm` where ((`frm`.`companyID` = `c`.`ID`) and (`frm`.`formID` = 118))),1)) AS `nextSerialNo` from `company` `c` */;

--
-- Final view structure for view `view_serial_comp_historical_customer_invoice`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_historical_customer_invoice`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_serial_comp_historical_customer_invoice` AS select `c`.`ID` AS `companyID`,ifnull(((select max(`t`.`serialNo`) from `comp_historical_customer_invoice` `t` where (`c`.`ID` = `t`.`companyID`)) + 1),ifnull((select `frm`.`formInitialNo` from `comp_form_control` `frm` where ((`frm`.`companyID` = `c`.`ID`) and (`frm`.`formID` = 41))),1)) AS `nextSerialNo` from `company` `c` */;

--
-- Final view structure for view `view_serial_comp_historical_supplier_invoice`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_historical_supplier_invoice`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_serial_comp_historical_supplier_invoice` AS select `c`.`ID` AS `companyID`,ifnull(((select max(`t`.`serialNo`) from `comp_historical_supplier_invoice` `t` where (`c`.`ID` = `t`.`companyID`)) + 1),ifnull((select `frm`.`formInitialNo` from `comp_form_control` `frm` where ((`frm`.`companyID` = `c`.`ID`) and (`frm`.`formID` = 41))),1)) AS `nextSerialNo` from `company` `c` */;

--
-- Final view structure for view `view_serial_comp_location_transfer`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_location_transfer`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_serial_comp_location_transfer` AS select `c`.`ID` AS `companyID`,ifnull(((select max(`t`.`serialNo`) from `comp_location_transfer` `t` where (`c`.`ID` = `t`.`companyID`)) + 1),ifnull((select `frm`.`formInitialNo` from `comp_form_control` `frm` where ((`frm`.`companyID` = `c`.`ID`) and (`frm`.`formID` = 46))),1)) AS `nextSerialNo` from `company` `c` */;

--
-- Final view structure for view `view_serial_comp_payment`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_payment`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_serial_comp_payment` AS select `c`.`ID` AS `companyID`,ifnull(((select max(`t`.`serialNo`) from `comp_payment` `t` where (`c`.`ID` = `t`.`companyID`)) + 1),ifnull((select `frm`.`formInitialNo` from `comp_form_control` `frm` where ((`frm`.`companyID` = `c`.`ID`) and (`frm`.`formID` = 44))),1)) AS `nextSerialNo` from `company` `c` */;

--
-- Final view structure for view `view_serial_comp_payment_others`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_payment_others`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_serial_comp_payment_others` AS select `c`.`ID` AS `companyID`,ifnull(((select max(`t`.`serialNo`) from `comp_payment_others` `t` where (`c`.`ID` = `t`.`companyID`)) + 1),ifnull((select `frm`.`formInitialNo` from `comp_form_control` `frm` where ((`frm`.`companyID` = `c`.`ID`) and (`frm`.`formID` = 55))),1)) AS `nextSerialNo` from `company` `c` */;

--
-- Final view structure for view `view_serial_comp_purchase_order`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_purchase_order`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_serial_comp_purchase_order` AS select `c`.`ID` AS `companyID`,ifnull(((select max(`po`.`serialNo`) from `comp_purchase_order` `po` where (`c`.`ID` = `po`.`companyID`)) + 1),ifnull((select `frm`.`formInitialNo` from `comp_form_control` `frm` where ((`frm`.`companyID` = `c`.`ID`) and (`frm`.`formID` = 40))),1)) AS `nextSerialNo` from `company` `c` */;

--
-- Final view structure for view `view_serial_comp_quotation`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_quotation`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_serial_comp_quotation` AS select `c`.`ID` AS `companyID`,ifnull(((select max(`t`.`serialNo`) from `comp_quotation` `t` where (`c`.`ID` = `t`.`companyID`)) + 1),ifnull((select `frm`.`formInitialNo` from `comp_form_control` `frm` where ((`frm`.`companyID` = `c`.`ID`) and (`frm`.`formID` = 47))),1)) AS `nextSerialNo` from `company` `c` */;

--
-- Final view structure for view `view_serial_comp_receive_item`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_receive_item`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_serial_comp_receive_item` AS select `c`.`ID` AS `companyID`,ifnull(((select max(`t`.`serialNo`) from `comp_receive_item` `t` where (`c`.`ID` = `t`.`companyID`)) + 1),ifnull((select `frm`.`formInitialNo` from `comp_form_control` `frm` where ((`frm`.`companyID` = `c`.`ID`) and (`frm`.`formID` = 54))),1)) AS `nextSerialNo` from `company` `c` */;

--
-- Final view structure for view `view_serial_comp_receive_payment`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_receive_payment`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_serial_comp_receive_payment` AS select `c`.`ID` AS `companyID`,ifnull(((select max(`t`.`serialNo`) from `comp_receive_payment` `t` where (`c`.`ID` = `t`.`companyID`)) + 1),ifnull((select `frm`.`formInitialNo` from `comp_form_control` `frm` where ((`frm`.`companyID` = `c`.`ID`) and (`frm`.`formID` = 53))),1)) AS `nextSerialNo` from `company` `c` */;

--
-- Final view structure for view `view_serial_comp_receive_payment_others`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_receive_payment_others`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_serial_comp_receive_payment_others` AS select `c`.`ID` AS `companyID`,ifnull(((select max(`t`.`serialNo`) from `comp_receive_payment_others` `t` where (`c`.`ID` = `t`.`companyID`)) + 1),ifnull((select `frm`.`formInitialNo` from `comp_form_control` `frm` where ((`frm`.`companyID` = `c`.`ID`) and (`frm`.`formID` = 56))),1)) AS `nextSerialNo` from `company` `c` */;

--
-- Final view structure for view `view_serial_comp_sales_creditnote`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_sales_creditnote`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_serial_comp_sales_creditnote` AS select `c`.`ID` AS `companyID`,ifnull(((select max(`t`.`serialNo`) from `comp_sales_creditnote` `t` where (`c`.`ID` = `t`.`companyID`)) + 1),ifnull((select `frm`.`formInitialNo` from `comp_form_control` `frm` where ((`frm`.`companyID` = `c`.`ID`) and (`frm`.`formID` = 52))),1)) AS `nextSerialNo` from `company` `c` */;

--
-- Final view structure for view `view_serial_comp_sales_debitnote`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_sales_debitnote`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_serial_comp_sales_debitnote` AS select `c`.`ID` AS `companyID`,ifnull(((select max(`t`.`serialNo`) from `comp_sales_debitnote` `t` where (`c`.`ID` = `t`.`companyID`)) + 1),ifnull((select `frm`.`formInitialNo` from `comp_form_control` `frm` where ((`frm`.`companyID` = `c`.`ID`) and (`frm`.`formID` = 51))),1)) AS `nextSerialNo` from `company` `c` */;

--
-- Final view structure for view `view_serial_comp_sales_invoice`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_sales_invoice`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_serial_comp_sales_invoice` AS select `c`.`ID` AS `companyID`,ifnull(((select max(`t`.`serialNo`) from `comp_sales_invoice` `t` where (`c`.`ID` = `t`.`companyID`)) + 1),ifnull((select `frm`.`formInitialNo` from `comp_form_control` `frm` where ((`frm`.`companyID` = `c`.`ID`) and (`frm`.`formID` = 50))),1)) AS `nextSerialNo` from `company` `c` */;

--
-- Final view structure for view `view_serial_comp_sales_order`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_sales_order`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_serial_comp_sales_order` AS select `c`.`ID` AS `companyID`,ifnull(((select max(`t`.`serialNo`) from `comp_sales_order` `t` where (`c`.`ID` = `t`.`companyID`)) + 1),ifnull((select `frm`.`formInitialNo` from `comp_form_control` `frm` where ((`frm`.`companyID` = `c`.`ID`) and (`frm`.`formID` = 48))),1)) AS `nextSerialNo` from `company` `c` */;

--
-- Final view structure for view `view_serial_comp_supplier_creditnote`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_supplier_creditnote`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_serial_comp_supplier_creditnote` AS select `c`.`ID` AS `companyID`,ifnull(((select max(`t`.`serialNo`) from `comp_supplier_creditnote` `t` where (`c`.`ID` = `t`.`companyID`)) + 1),ifnull((select `frm`.`formInitialNo` from `comp_form_control` `frm` where ((`frm`.`companyID` = `c`.`ID`) and (`frm`.`formID` = 43))),1)) AS `nextSerialNo` from `company` `c` */;

--
-- Final view structure for view `view_serial_comp_supplier_debitnote`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_supplier_debitnote`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_serial_comp_supplier_debitnote` AS select `c`.`ID` AS `companyID`,ifnull(((select max(`t`.`serialNo`) from `comp_supplier_debitnote` `t` where (`c`.`ID` = `t`.`companyID`)) + 1),ifnull((select `frm`.`formInitialNo` from `comp_form_control` `frm` where ((`frm`.`companyID` = `c`.`ID`) and (`frm`.`formID` = 42))),1)) AS `nextSerialNo` from `company` `c` */;

--
-- Final view structure for view `view_serial_comp_supplier_invoice`
--

/*!50001 DROP VIEW IF EXISTS `view_serial_comp_supplier_invoice`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_serial_comp_supplier_invoice` AS select `c`.`ID` AS `companyID`,ifnull(((select max(`t`.`serialNo`) from `comp_supplier_invoice` `t` where (`c`.`ID` = `t`.`companyID`)) + 1),ifnull((select `frm`.`formInitialNo` from `comp_form_control` `frm` where ((`frm`.`companyID` = `c`.`ID`) and (`frm`.`formID` = 41))),1)) AS `nextSerialNo` from `company` `c` */;

--
-- Final view structure for view `view_supplier_aging`
--

/*!50001 DROP VIEW IF EXISTS `view_supplier_aging`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_supplier_aging` AS select `a`.`companyID` AS `companyID`,`a`.`ID` AS `supplierID`,((ifnull((select sum(`comp_supplier_invoice`.`totalPayable`) from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_invoice`.`invoiceDate`,now()) = 0) and (`comp_supplier_invoice`.`updateAble` = 0) and (`comp_supplier_invoice`.`is_delete` = 0))),0) + ifnull((select sum(`comp_supplier_creditnote`.`total`) from `comp_supplier_creditnote` where ((`comp_supplier_creditnote`.`companyID` = `a`.`companyID`) and (`comp_supplier_creditnote`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_creditnote`.`creditNoteDate`,now()) = 0) and (`comp_supplier_creditnote`.`updateAble` = 0) and (`comp_supplier_creditnote`.`is_delete` = 0))),0)) + ifnull((select sum(`comp_historical_supplier_invoice`.`totalPayable`) from `comp_historical_supplier_invoice` where ((`comp_historical_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_historical_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_historical_supplier_invoice`.`invoiceDate`,now()) = 0) and (`comp_historical_supplier_invoice`.`updateAble` = 0) and (`comp_historical_supplier_invoice`.`is_delete` = 0))),0)) AS `current`,((ifnull((select sum(`comp_supplier_invoice`.`totalPayable`) from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_invoice`.`invoiceDate`,now()) = 1) and (`comp_supplier_invoice`.`updateAble` = 0) and (`comp_supplier_invoice`.`is_delete` = 0))),0) + ifnull((select sum(`comp_supplier_creditnote`.`total`) from `comp_supplier_creditnote` where ((`comp_supplier_creditnote`.`companyID` = `a`.`companyID`) and (`comp_supplier_creditnote`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_creditnote`.`creditNoteDate`,now()) = 1) and (`comp_supplier_creditnote`.`updateAble` = 0) and (`comp_supplier_creditnote`.`is_delete` = 0))),0)) + ifnull((select sum(`comp_historical_supplier_invoice`.`totalPayable`) from `comp_historical_supplier_invoice` where ((`comp_historical_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_historical_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_historical_supplier_invoice`.`invoiceDate`,now()) = 1) and (`comp_historical_supplier_invoice`.`updateAble` = 0) and (`comp_historical_supplier_invoice`.`is_delete` = 0))),0)) AS `month1`,((ifnull((select sum(`comp_supplier_invoice`.`totalPayable`) from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_invoice`.`invoiceDate`,now()) = 2) and (`comp_supplier_invoice`.`updateAble` = 0) and (`comp_supplier_invoice`.`is_delete` = 0))),0) + ifnull((select sum(`comp_supplier_creditnote`.`total`) from `comp_supplier_creditnote` where ((`comp_supplier_creditnote`.`companyID` = `a`.`companyID`) and (`comp_supplier_creditnote`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_creditnote`.`creditNoteDate`,now()) = 2) and (`comp_supplier_creditnote`.`updateAble` = 0) and (`comp_supplier_creditnote`.`is_delete` = 0))),0)) + ifnull((select sum(`comp_historical_supplier_invoice`.`totalPayable`) from `comp_historical_supplier_invoice` where ((`comp_historical_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_historical_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_historical_supplier_invoice`.`invoiceDate`,now()) = 2) and (`comp_historical_supplier_invoice`.`updateAble` = 0) and (`comp_historical_supplier_invoice`.`is_delete` = 0))),0)) AS `month2`,((ifnull((select sum(`comp_supplier_invoice`.`totalPayable`) from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_invoice`.`invoiceDate`,now()) = 3) and (`comp_supplier_invoice`.`updateAble` = 0) and (`comp_supplier_invoice`.`is_delete` = 0))),0) + ifnull((select sum(`comp_supplier_creditnote`.`total`) from `comp_supplier_creditnote` where ((`comp_supplier_creditnote`.`companyID` = `a`.`companyID`) and (`comp_supplier_creditnote`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_creditnote`.`creditNoteDate`,now()) = 3) and (`comp_supplier_creditnote`.`updateAble` = 0) and (`comp_supplier_creditnote`.`is_delete` = 0))),0)) + ifnull((select sum(`comp_historical_supplier_invoice`.`totalPayable`) from `comp_historical_supplier_invoice` where ((`comp_historical_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_historical_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_historical_supplier_invoice`.`invoiceDate`,now()) = 3) and (`comp_historical_supplier_invoice`.`updateAble` = 0) and (`comp_historical_supplier_invoice`.`is_delete` = 0))),0)) AS `month3`,((ifnull((select sum(`comp_supplier_invoice`.`totalPayable`) from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_invoice`.`invoiceDate`,now()) = 4) and (`comp_supplier_invoice`.`updateAble` = 0) and (`comp_supplier_invoice`.`is_delete` = 0))),0) + ifnull((select sum(`comp_supplier_creditnote`.`total`) from `comp_supplier_creditnote` where ((`comp_supplier_creditnote`.`companyID` = `a`.`companyID`) and (`comp_supplier_creditnote`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_creditnote`.`creditNoteDate`,now()) = 4) and (`comp_supplier_creditnote`.`updateAble` = 0) and (`comp_supplier_creditnote`.`is_delete` = 0))),0)) + ifnull((select sum(`comp_historical_supplier_invoice`.`totalPayable`) from `comp_historical_supplier_invoice` where ((`comp_historical_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_historical_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_historical_supplier_invoice`.`invoiceDate`,now()) = 4) and (`comp_historical_supplier_invoice`.`updateAble` = 0) and (`comp_historical_supplier_invoice`.`is_delete` = 0))),0)) AS `month4`,((ifnull((select sum(`comp_supplier_invoice`.`totalPayable`) from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_invoice`.`invoiceDate`,now()) = 5) and (`comp_supplier_invoice`.`updateAble` = 0) and (`comp_supplier_invoice`.`is_delete` = 0))),0) + ifnull((select sum(`comp_supplier_creditnote`.`total`) from `comp_supplier_creditnote` where ((`comp_supplier_creditnote`.`companyID` = `a`.`companyID`) and (`comp_supplier_creditnote`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_creditnote`.`creditNoteDate`,now()) = 5) and (`comp_supplier_creditnote`.`updateAble` = 0) and (`comp_supplier_creditnote`.`is_delete` = 0))),0)) + ifnull((select sum(`comp_historical_supplier_invoice`.`totalPayable`) from `comp_historical_supplier_invoice` where ((`comp_historical_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_historical_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_historical_supplier_invoice`.`invoiceDate`,now()) = 5) and (`comp_historical_supplier_invoice`.`updateAble` = 0) and (`comp_historical_supplier_invoice`.`is_delete` = 0))),0)) AS `month5`,((ifnull((select sum(`comp_supplier_invoice`.`totalPayable`) from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_invoice`.`invoiceDate`,now()) = 6) and (`comp_supplier_invoice`.`updateAble` = 0) and (`comp_supplier_invoice`.`is_delete` = 0))),0) + ifnull((select sum(`comp_supplier_creditnote`.`total`) from `comp_supplier_creditnote` where ((`comp_supplier_creditnote`.`companyID` = `a`.`companyID`) and (`comp_supplier_creditnote`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_creditnote`.`creditNoteDate`,now()) = 6) and (`comp_supplier_creditnote`.`updateAble` = 0) and (`comp_supplier_creditnote`.`is_delete` = 0))),0)) + ifnull((select sum(`comp_historical_supplier_invoice`.`totalPayable`) from `comp_historical_supplier_invoice` where ((`comp_historical_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_historical_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_historical_supplier_invoice`.`invoiceDate`,now()) = 6) and (`comp_historical_supplier_invoice`.`updateAble` = 0) and (`comp_historical_supplier_invoice`.`is_delete` = 0))),0)) AS `month6`,((ifnull((select sum(`comp_supplier_invoice`.`totalPayable`) from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_invoice`.`invoiceDate`,now()) = 7) and (`comp_supplier_invoice`.`updateAble` = 0) and (`comp_supplier_invoice`.`is_delete` = 0))),0) + ifnull((select sum(`comp_supplier_creditnote`.`total`) from `comp_supplier_creditnote` where ((`comp_supplier_creditnote`.`companyID` = `a`.`companyID`) and (`comp_supplier_creditnote`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_creditnote`.`creditNoteDate`,now()) = 7) and (`comp_supplier_creditnote`.`updateAble` = 0) and (`comp_supplier_creditnote`.`is_delete` = 0))),0)) + ifnull((select sum(`comp_historical_supplier_invoice`.`totalPayable`) from `comp_historical_supplier_invoice` where ((`comp_historical_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_historical_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_historical_supplier_invoice`.`invoiceDate`,now()) = 7) and (`comp_historical_supplier_invoice`.`updateAble` = 0) and (`comp_historical_supplier_invoice`.`is_delete` = 0))),0)) AS `month7`,((ifnull((select sum(`comp_supplier_invoice`.`totalPayable`) from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_invoice`.`invoiceDate`,now()) = 8) and (`comp_supplier_invoice`.`updateAble` = 0) and (`comp_supplier_invoice`.`is_delete` = 0))),0) + ifnull((select sum(`comp_supplier_creditnote`.`total`) from `comp_supplier_creditnote` where ((`comp_supplier_creditnote`.`companyID` = `a`.`companyID`) and (`comp_supplier_creditnote`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_creditnote`.`creditNoteDate`,now()) = 8) and (`comp_supplier_creditnote`.`updateAble` = 0) and (`comp_supplier_creditnote`.`is_delete` = 0))),0)) + ifnull((select sum(`comp_historical_supplier_invoice`.`totalPayable`) from `comp_historical_supplier_invoice` where ((`comp_historical_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_historical_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_historical_supplier_invoice`.`invoiceDate`,now()) = 8) and (`comp_historical_supplier_invoice`.`updateAble` = 0) and (`comp_historical_supplier_invoice`.`is_delete` = 0))),0)) AS `month8`,((ifnull((select sum(`comp_supplier_invoice`.`totalPayable`) from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_invoice`.`invoiceDate`,now()) = 9) and (`comp_supplier_invoice`.`updateAble` = 0) and (`comp_supplier_invoice`.`is_delete` = 0))),0) + ifnull((select sum(`comp_supplier_creditnote`.`total`) from `comp_supplier_creditnote` where ((`comp_supplier_creditnote`.`companyID` = `a`.`companyID`) and (`comp_supplier_creditnote`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_creditnote`.`creditNoteDate`,now()) = 9) and (`comp_supplier_creditnote`.`updateAble` = 0) and (`comp_supplier_creditnote`.`is_delete` = 0))),0)) + ifnull((select sum(`comp_historical_supplier_invoice`.`totalPayable`) from `comp_historical_supplier_invoice` where ((`comp_historical_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_historical_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_historical_supplier_invoice`.`invoiceDate`,now()) = 9) and (`comp_historical_supplier_invoice`.`updateAble` = 0) and (`comp_historical_supplier_invoice`.`is_delete` = 0))),0)) AS `month9`,((ifnull((select sum(`comp_supplier_invoice`.`totalPayable`) from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_invoice`.`invoiceDate`,now()) = 10) and (`comp_supplier_invoice`.`updateAble` = 0) and (`comp_supplier_invoice`.`is_delete` = 0))),0) + ifnull((select sum(`comp_supplier_creditnote`.`total`) from `comp_supplier_creditnote` where ((`comp_supplier_creditnote`.`companyID` = `a`.`companyID`) and (`comp_supplier_creditnote`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_creditnote`.`creditNoteDate`,now()) = 10) and (`comp_supplier_creditnote`.`updateAble` = 0) and (`comp_supplier_creditnote`.`is_delete` = 0))),0)) + ifnull((select sum(`comp_historical_supplier_invoice`.`totalPayable`) from `comp_historical_supplier_invoice` where ((`comp_historical_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_historical_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_historical_supplier_invoice`.`invoiceDate`,now()) = 10) and (`comp_historical_supplier_invoice`.`updateAble` = 0) and (`comp_historical_supplier_invoice`.`is_delete` = 0))),0)) AS `month10`,((ifnull((select sum(`comp_supplier_invoice`.`totalPayable`) from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_invoice`.`invoiceDate`,now()) > 10) and (`comp_supplier_invoice`.`updateAble` = 0) and (`comp_supplier_invoice`.`is_delete` = 0))),0) + ifnull((select sum(`comp_supplier_creditnote`.`total`) from `comp_supplier_creditnote` where ((`comp_supplier_creditnote`.`companyID` = `a`.`companyID`) and (`comp_supplier_creditnote`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_creditnote`.`creditNoteDate`,now()) > 10) and (`comp_supplier_creditnote`.`updateAble` = 0) and (`comp_supplier_creditnote`.`is_delete` = 0))),0)) + ifnull((select sum(`comp_historical_supplier_invoice`.`totalPayable`) from `comp_historical_supplier_invoice` where ((`comp_historical_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_historical_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_historical_supplier_invoice`.`invoiceDate`,now()) > 10) and (`comp_historical_supplier_invoice`.`updateAble` = 0) and (`comp_historical_supplier_invoice`.`is_delete` = 0))),0)) AS `month11` from `supplier` `a` */;

--
-- Final view structure for view `view_supplier_statement`
--

/*!50001 DROP VIEW IF EXISTS `view_supplier_statement`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_supplier_statement` AS select `comp_supplier_invoice`.`ID` AS `ID`,`comp_supplier_invoice`.`ID` AS `parent`,`comp_supplier_invoice`.`companyID` AS `companyID`,`comp_supplier_invoice`.`supplierID` AS `supplierID`,'Invoice' AS `transType`,`comp_supplier_invoice`.`invoiceDate` AS `transDate`,`comp_supplier_invoice`.`supplierInvoiceNo` AS `refNo`,concat(concat(concat(`comp_supplier_invoice`.`formNo`,'['),convert(lpad(`comp_supplier_invoice`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,NULL AS `dr`,`comp_supplier_invoice`.`totalAmount` AS `cr`,1 AS `seq` from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`updateAble` = 0) and (`comp_supplier_invoice`.`is_delete` = 0)) union select `a`.`ID` AS `ID`,`a`.`supplierInvoiceID` AS `parent`,`a`.`companyID` AS `companyID`,`a`.`supplierID` AS `supplierID`,'DebitNote' AS `transType`,`a`.`debitNoteDate` AS `transDate`,concat(concat(concat(`b`.`formNo`,'['),convert(lpad(`b`.`serialNo`,8,'0') using latin1)),']') AS `refno`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`totalAmount` AS `dr`,NULL AS `cr`,2 AS `seq` from (`comp_supplier_debitnote` `a` join `comp_supplier_invoice` `b`) where ((`a`.`updateAble` = 0) and (`a`.`is_delete` = 0) and (`a`.`supplierInvoiceID` = `b`.`ID`)) union select `a`.`ID` AS `ID`,`a`.`supplierInvoiceID` AS `parent`,`a`.`companyID` AS `companyID`,`a`.`supplierID` AS `supplierID`,'CreditNote' AS `transType`,`a`.`creditNoteDate` AS `transDate`,concat(concat(concat(`b`.`formNo`,'['),convert(lpad(`b`.`serialNo`,8,'0') using latin1)),']') AS `refno`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,NULL AS `dr`,`a`.`totalAmount` AS `cr`,3 AS `seq` from (`comp_supplier_creditnote` `a` join `comp_supplier_invoice` `b`) where ((`a`.`updateAble` = 0) and (`a`.`is_delete` = 0) and (`a`.`supplierInvoiceID` = `b`.`ID`)) union select `b`.`ID` AS `ID`,NULL AS `parent`,`b`.`companyID` AS `companyID`,`b`.`supplierID` AS `supplierID`,if((`b`.`updateAble` = 0),'Payment','** Payment') AS `transType`,`b`.`paymentDate` AS `transDate`,`b`.`referenceNo` AS `refNo`,concat(concat(concat(`b`.`formNo`,'['),convert(lpad(`b`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`b`.`amountPaid` AS `dr`,NULL AS `cr`,4 AS `seq` from `comp_payment` `b` where (`b`.`is_delete` = 0) union select `b`.`ID` AS `ID`,NULL AS `parent`,`b`.`companyID` AS `companyID`,`b`.`supplierID` AS `supplierID`,'Discount' AS `transType`,`b`.`paymentDate` AS `transDate`,`b`.`referenceNo` AS `refNo`,concat(concat(concat(`b`.`formNo`,'['),convert(lpad(`b`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`b`.`totalDiscount` AS `dr`,NULL AS `cr`,4 AS `seq` from `comp_payment` `b` where ((`b`.`updateAble` = 0) and (`b`.`is_delete` = 0)) union select `comp_historical_supplier_invoice`.`ID` AS `ID`,`comp_historical_supplier_invoice`.`ID` AS `parent`,`comp_historical_supplier_invoice`.`companyID` AS `companyID`,`comp_historical_supplier_invoice`.`supplierID` AS `supplierID`,'Historical Invoice' AS `transType`,`comp_historical_supplier_invoice`.`invoiceDate` AS `transDate`,`comp_historical_supplier_invoice`.`supplierInvoiceNo` AS `refNo`,concat(concat(concat(`comp_historical_supplier_invoice`.`formNo`,'['),convert(lpad(`comp_historical_supplier_invoice`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,NULL AS `dr`,`comp_historical_supplier_invoice`.`totalAmount` AS `cr`,1 AS `seq` from `comp_historical_supplier_invoice` where ((`comp_historical_supplier_invoice`.`updateAble` = 0) and (`comp_historical_supplier_invoice`.`is_delete` = 0)) */;

--
-- Final view structure for view `view_suppliercreditnote`
--

/*!50001 DROP VIEW IF EXISTS `view_suppliercreditnote`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_suppliercreditnote` AS select `si`.`ID` AS `invoiceDetailID`,`si`.`umID` AS `invoiceUm`,`si`.`ID` AS `ID`,`si`.`invoiceID` AS `invoiceID`,`si`.`receiveID` AS `receiveID`,`si`.`lineNo` AS `lineNo`,`si`.`itemID` AS `itemID`,`si`.`itemname` AS `itemname`,`si`.`itemdescription` AS `itemdescription`,`si`.`umID` AS `umID`,`si`.`quantity` AS `quantity`,`si`.`unitPrice` AS `unitPrice`,`si`.`amountExcludedTax` AS `amountExcludedTax`,`si`.`taxID` AS `taxID`,`si`.`taxRate` AS `taxRate`,`si`.`taxAmount` AS `taxAmount`,`si`.`amountIncludedTax` AS `amountIncludedTax`,`si`.`accountID` AS `accountID`,`si`.`createdBy` AS `createdBy`,`si`.`createdTS` AS `createdTS`,`si`.`updatedBy` AS `updatedBy`,`si`.`updatedTS` AS `updatedTS`,((`si`.`quantity` - ifnull((select sum(`dnd`.`quantity`) from `comp_supplier_debitnote_detail` `dnd` where (`si`.`ID` = `dnd`.`invoiceDetailID`)),0)) + ifnull((select sum(`scd`.`quantity`) from `comp_supplier_creditnote_detail` `scd` where (`si`.`ID` = `scd`.`invoiceDetailID`)),0)) AS `exactQty`,`_sys_um`.`code` AS `unitOfMeasure`,`si`.`receiveID` AS `receiveDetailID`,`tax_master`.`code` AS `code`,`item`.`itemCode` AS `itemCode`,`item`.`name` AS `name`,`si`.`itemdescription` AS `description` from (((`comp_supplier_invoice_detail` `si` left join `tax_master` on((`tax_master`.`ID` = `si`.`taxID`))) left join `item` on((`si`.`itemID` = `item`.`ID`))) left join `_sys_um` on((`_sys_um`.`fldid` = `si`.`umID`))) */;

--
-- Final view structure for view `view_supplierdebitnote`
--

/*!50001 DROP VIEW IF EXISTS `view_supplierdebitnote`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_supplierdebitnote` AS select `si`.`ID` AS `invoiceDetailID`,`si`.`ID` AS `ID`,`si`.`invoiceID` AS `invoiceID`,`si`.`receiveID` AS `receiveID`,`si`.`lineNo` AS `lineNo`,`si`.`itemID` AS `itemID`,`si`.`itemname` AS `itemname`,`si`.`itemdescription` AS `itemdescription`,`si`.`umID` AS `umID`,`si`.`quantity` AS `quantity`,`si`.`unitPrice` AS `unitPrice`,`si`.`amountExcludedTax` AS `amountExcludedTax`,`si`.`taxID` AS `taxID`,`si`.`taxRate` AS `taxRate`,`si`.`taxAmount` AS `taxAmount`,`si`.`amountIncludedTax` AS `amountIncludedTax`,`si`.`accountID` AS `accountID`,`si`.`createdBy` AS `createdBy`,`si`.`createdTS` AS `createdTS`,`si`.`updatedBy` AS `updatedBy`,`si`.`updatedTS` AS `updatedTS`,`_sys_um`.`code` AS `unitOfMeasure`,`si`.`receiveID` AS `receiveDetailID`,`tax_master`.`code` AS `code`,`item`.`itemCode` AS `itemCode`,`item`.`name` AS `name`,`si`.`itemdescription` AS `description`,((`si`.`quantity` - ifnull((select sum(`dnd`.`quantity`) from `comp_supplier_debitnote_detail` `dnd` where (`si`.`ID` = `dnd`.`invoiceDetailID`)),0)) + ifnull((select sum(`scd`.`quantity`) from `comp_supplier_creditnote_detail` `scd` where (`si`.`ID` = `scd`.`invoiceDetailID`)),0)) AS `exactQty` from (((`comp_supplier_invoice_detail` `si` left join `tax_master` on((`tax_master`.`ID` = `si`.`taxID`))) left join `item` on((`si`.`itemID` = `item`.`ID`))) left join `_sys_um` on((`_sys_um`.`fldid` = `si`.`umID`))) */;

--
-- Final view structure for view `view_total_comp_sales_creditnote`
--

/*!50001 DROP VIEW IF EXISTS `view_total_comp_sales_creditnote`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_total_comp_sales_creditnote` AS select distinct `a`.`ID` AS `ID`,((select ifnull(sum(`comp_sales_creditnote_charges`.`taxAmount`),0) from `comp_sales_creditnote_charges` where (`comp_sales_creditnote_charges`.`creditNoteID` = `a`.`ID`)) + (select ifnull(sum(`comp_sales_creditnote_detail`.`taxAmount`),0) from `comp_sales_creditnote_detail` where (`comp_sales_creditnote_detail`.`creditnoteID` = `a`.`ID`))) AS `totalTaxAmount`,((select ifnull(sum(`comp_sales_creditnote_detail`.`amountIncludedTax`),0) from `comp_sales_creditnote_detail` where (`comp_sales_creditnote_detail`.`creditnoteID` = `a`.`ID`)) + (select ifnull(sum(`comp_sales_creditnote_charges`.`amountIncludedTax`),0) from `comp_sales_creditnote_charges` where (`comp_sales_creditnote_charges`.`creditNoteID` = `a`.`ID`))) AS `totalAmount` from `comp_sales_creditnote` `a` group by `a`.`ID` */;

--
-- Final view structure for view `view_total_comp_sales_debitnote`
--

/*!50001 DROP VIEW IF EXISTS `view_total_comp_sales_debitnote`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_total_comp_sales_debitnote` AS select distinct `a`.`ID` AS `ID`,((select ifnull(sum(`comp_sales_debitnote_charges`.`taxAmount`),0) from `comp_sales_debitnote_charges` where (`comp_sales_debitnote_charges`.`debitNoteID` = `a`.`ID`)) + (select ifnull(sum(`comp_sales_debitnote_detail`.`taxAmount`),0) from `comp_sales_debitnote_detail` where (`comp_sales_debitnote_detail`.`debitnoteID` = `a`.`ID`))) AS `totalTaxAmount`,((select ifnull(sum(`comp_sales_debitnote_charges`.`amountIncludedTax`),0) from `comp_sales_debitnote_charges` where (`comp_sales_debitnote_charges`.`debitNoteID` = `a`.`ID`)) + (select ifnull(sum(`comp_sales_debitnote_detail`.`amountIncludedTax`),0) from `comp_sales_debitnote_detail` where (`comp_sales_debitnote_detail`.`debitnoteID` = `a`.`ID`))) AS `totalAmount` from `comp_sales_debitnote` `a` group by `a`.`ID` */;

--
-- Final view structure for view `view_total_comp_sales_invoice`
--

/*!50001 DROP VIEW IF EXISTS `view_total_comp_sales_invoice`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_total_comp_sales_invoice` AS select distinct `a`.`ID` AS `ID`,((select ifnull(sum(`comp_sales_invoice_charges`.`taxAmount`),0) from `comp_sales_invoice_charges` where (`comp_sales_invoice_charges`.`invoiceID` = `a`.`ID`)) + (select ifnull(sum(`comp_sales_invoice_detail`.`taxAmount`),0) from `comp_sales_invoice_detail` where (`comp_sales_invoice_detail`.`invoiceID` = `a`.`ID`))) AS `totalTaxAmount`,((select ifnull(sum(`comp_sales_invoice_charges`.`amountIncludedTax`),0) from `comp_sales_invoice_charges` where (`comp_sales_invoice_charges`.`invoiceID` = `a`.`ID`)) + (select ifnull(sum(`comp_sales_invoice_detail`.`amountIncludedTax`),0) from `comp_sales_invoice_detail` where (`comp_sales_invoice_detail`.`invoiceID` = `a`.`ID`))) AS `totalAmount` from `comp_sales_invoice` `a` group by `a`.`ID` */;

--
-- Final view structure for view `view_total_comp_supplier_creditnote`
--

/*!50001 DROP VIEW IF EXISTS `view_total_comp_supplier_creditnote`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_total_comp_supplier_creditnote` AS select distinct `a`.`ID` AS `ID`,((select ifnull(sum(`comp_supplier_creditnote_charges`.`taxAmount`),0) from `comp_supplier_creditnote_charges` where (`comp_supplier_creditnote_charges`.`creditNoteID` = `a`.`ID`)) + (select ifnull(sum(`comp_supplier_creditnote_detail`.`taxAmount`),0) from `comp_supplier_creditnote_detail` where (`comp_supplier_creditnote_detail`.`creditnoteID` = `a`.`ID`))) AS `totalTaxAmount`,((select ifnull(sum(`comp_supplier_creditnote_charges`.`amountIncludedTax`),0) from `comp_supplier_creditnote_charges` where (`comp_supplier_creditnote_charges`.`creditNoteID` = `a`.`ID`)) + (select ifnull(sum(`comp_supplier_creditnote_detail`.`amountIncludedTax`),0) from `comp_supplier_creditnote_detail` where (`comp_supplier_creditnote_detail`.`creditnoteID` = `a`.`ID`))) AS `totalAmount` from `comp_supplier_creditnote` `a` group by `a`.`ID` */;

--
-- Final view structure for view `view_total_comp_supplier_debitnote`
--

/*!50001 DROP VIEW IF EXISTS `view_total_comp_supplier_debitnote`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_total_comp_supplier_debitnote` AS select distinct `a`.`ID` AS `ID`,((select ifnull(sum(`comp_supplier_debitnote_charges`.`taxAmount`),0) from `comp_supplier_debitnote_charges` where (`comp_supplier_debitnote_charges`.`debitNoteID` = `a`.`ID`)) + (select ifnull(sum(`comp_supplier_debitnote_detail`.`taxAmount`),0) from `comp_supplier_debitnote_detail` where (`comp_supplier_debitnote_detail`.`debitnoteID` = `a`.`ID`))) AS `totalTaxAmount`,((select ifnull(sum(`comp_supplier_debitnote_charges`.`amountIncludedTax`),0) from `comp_supplier_debitnote_charges` where (`comp_supplier_debitnote_charges`.`debitNoteID` = `a`.`ID`)) + (select ifnull(sum(`comp_supplier_debitnote_detail`.`amountIncludedTax`),0) from `comp_supplier_debitnote_detail` where (`comp_supplier_debitnote_detail`.`debitnoteID` = `a`.`ID`))) AS `totalAmount` from `comp_supplier_debitnote` `a` group by `a`.`ID` */;

--
-- Final view structure for view `view_total_comp_supplier_invoice`
--

/*!50001 DROP VIEW IF EXISTS `view_total_comp_supplier_invoice`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_total_comp_supplier_invoice` AS select distinct `a`.`ID` AS `ID`,((select ifnull(sum(`comp_supplier_invoice_charges`.`taxAmount`),0) from `comp_supplier_invoice_charges` where (`comp_supplier_invoice_charges`.`invoiceID` = `a`.`ID`)) + (select ifnull(sum(`comp_supplier_invoice_detail`.`taxAmount`),0) from `comp_supplier_invoice_detail` where (`comp_supplier_invoice_detail`.`invoiceID` = `a`.`ID`))) AS `totalTaxAmount`,((select ifnull(sum(`comp_supplier_invoice_charges`.`amountIncludedTax`),0) from `comp_supplier_invoice_charges` where (`comp_supplier_invoice_charges`.`invoiceID` = `a`.`ID`)) + (select ifnull(sum(`comp_supplier_invoice_detail`.`amountIncludedTax`),0) from `comp_supplier_invoice_detail` where (`comp_supplier_invoice_detail`.`invoiceID` = `a`.`ID`))) AS `totalAmount` from `comp_supplier_invoice` `a` group by `a`.`ID` */;

--
-- Final view structure for view `view_transaction_summary`
--

/*!50001 DROP VIEW IF EXISTS `view_transaction_summary`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_transaction_summary` AS select 'comp_purchase_order' AS `tableName`,100 AS `transID`,`comp_purchase_order`.`companyID` AS `companyid`,date_format(`comp_purchase_order`.`poDate`,'%Y') AS `year`,count(if((month(`comp_purchase_order`.`poDate`) = 1),1,NULL)) AS `Jan`,count(if((month(`comp_purchase_order`.`poDate`) = 2),1,NULL)) AS `Feb`,count(if((month(`comp_purchase_order`.`poDate`) = 3),1,NULL)) AS `Mar`,count(if((month(`comp_purchase_order`.`poDate`) = 4),1,NULL)) AS `Apr`,count(if((month(`comp_purchase_order`.`poDate`) = 5),1,NULL)) AS `may`,count(if((month(`comp_purchase_order`.`poDate`) = 6),1,NULL)) AS `Jun`,count(if((month(`comp_purchase_order`.`poDate`) = 7),1,NULL)) AS `Jul`,count(if((month(`comp_purchase_order`.`poDate`) = 8),1,NULL)) AS `Aug`,count(if((month(`comp_purchase_order`.`poDate`) = 9),1,NULL)) AS `Sept`,count(if((month(`comp_purchase_order`.`poDate`) = 10),1,NULL)) AS `Oct`,count(if((month(`comp_purchase_order`.`poDate`) = 11),1,NULL)) AS `Nov`,count(if((month(`comp_purchase_order`.`poDate`) = 12),1,NULL)) AS `Dec` from `comp_purchase_order` where ((`comp_purchase_order`.`updateAble` = 0) and (`comp_purchase_order`.`is_delete` = 0)) group by `comp_purchase_order`.`companyID`,`year` union select 'comp_receive_item' AS `comp_receive_item`,200 AS `200`,`comp_receive_item`.`companyID` AS `companyid`,date_format(`comp_receive_item`.`deliveryDate`,'%Y') AS `year`,count(if((month(`comp_receive_item`.`deliveryDate`) = 1),1,NULL)) AS `1`,count(if((month(`comp_receive_item`.`deliveryDate`) = 2),1,NULL)) AS `2`,count(if((month(`comp_receive_item`.`deliveryDate`) = 3),1,NULL)) AS `3`,count(if((month(`comp_receive_item`.`deliveryDate`) = 4),1,NULL)) AS `4`,count(if((month(`comp_receive_item`.`deliveryDate`) = 5),1,NULL)) AS `5`,count(if((month(`comp_receive_item`.`deliveryDate`) = 6),1,NULL)) AS `6`,count(if((month(`comp_receive_item`.`deliveryDate`) = 7),1,NULL)) AS `7`,count(if((month(`comp_receive_item`.`deliveryDate`) = 8),1,NULL)) AS `8`,count(if((month(`comp_receive_item`.`deliveryDate`) = 9),1,NULL)) AS `9`,count(if((month(`comp_receive_item`.`deliveryDate`) = 10),1,NULL)) AS `10`,count(if((month(`comp_receive_item`.`deliveryDate`) = 11),1,NULL)) AS `11`,count(if((month(`comp_receive_item`.`deliveryDate`) = 12),1,NULL)) AS `12` from `comp_receive_item` where ((`comp_receive_item`.`updateAble` = 0) and (`comp_receive_item`.`isDelete` = 0)) group by `comp_receive_item`.`companyID`,`year` union select 'comp_supplier_invoice' AS `comp_supplier_invoice`,300 AS `300`,`comp_supplier_invoice`.`companyID` AS `companyid`,date_format(`comp_supplier_invoice`.`invoiceDate`,'%Y') AS `year`,count(if((month(`comp_supplier_invoice`.`invoiceDate`) = 1),1,NULL)) AS `1`,count(if((month(`comp_supplier_invoice`.`invoiceDate`) = 2),1,NULL)) AS `2`,count(if((month(`comp_supplier_invoice`.`invoiceDate`) = 3),1,NULL)) AS `3`,count(if((month(`comp_supplier_invoice`.`invoiceDate`) = 4),1,NULL)) AS `4`,count(if((month(`comp_supplier_invoice`.`invoiceDate`) = 5),1,NULL)) AS `5`,count(if((month(`comp_supplier_invoice`.`invoiceDate`) = 6),1,NULL)) AS `6`,count(if((month(`comp_supplier_invoice`.`invoiceDate`) = 7),1,NULL)) AS `7`,count(if((month(`comp_supplier_invoice`.`invoiceDate`) = 8),1,NULL)) AS `8`,count(if((month(`comp_supplier_invoice`.`invoiceDate`) = 9),1,NULL)) AS `9`,count(if((month(`comp_supplier_invoice`.`invoiceDate`) = 10),1,NULL)) AS `10`,count(if((month(`comp_supplier_invoice`.`invoiceDate`) = 11),1,NULL)) AS `11`,count(if((month(`comp_supplier_invoice`.`invoiceDate`) = 12),1,NULL)) AS `12` from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`updateAble` = 0) and (`comp_supplier_invoice`.`is_delete` = 0)) group by `comp_supplier_invoice`.`companyID`,`year` union select 'comp_supplier_debitNote' AS `comp_supplier_debitNote`,400 AS `400`,`comp_supplier_debitnote`.`companyID` AS `companyid`,date_format(`comp_supplier_debitnote`.`debitNoteDate`,'%Y') AS `year`,count(if((month(`comp_supplier_debitnote`.`debitNoteDate`) = 1),1,NULL)) AS `1`,count(if((month(`comp_supplier_debitnote`.`debitNoteDate`) = 2),1,NULL)) AS `2`,count(if((month(`comp_supplier_debitnote`.`debitNoteDate`) = 3),1,NULL)) AS `3`,count(if((month(`comp_supplier_debitnote`.`debitNoteDate`) = 4),1,NULL)) AS `4`,count(if((month(`comp_supplier_debitnote`.`debitNoteDate`) = 5),1,NULL)) AS `5`,count(if((month(`comp_supplier_debitnote`.`debitNoteDate`) = 6),1,NULL)) AS `6`,count(if((month(`comp_supplier_debitnote`.`debitNoteDate`) = 7),1,NULL)) AS `7`,count(if((month(`comp_supplier_debitnote`.`debitNoteDate`) = 8),1,NULL)) AS `8`,count(if((month(`comp_supplier_debitnote`.`debitNoteDate`) = 9),1,NULL)) AS `9`,count(if((month(`comp_supplier_debitnote`.`debitNoteDate`) = 10),1,NULL)) AS `10`,count(if((month(`comp_supplier_debitnote`.`debitNoteDate`) = 11),1,NULL)) AS `11`,count(if((month(`comp_supplier_debitnote`.`debitNoteDate`) = 12),1,NULL)) AS `12` from `comp_supplier_debitnote` where ((`comp_supplier_debitnote`.`updateAble` = 0) and (`comp_supplier_debitnote`.`is_delete` = 0)) group by `comp_supplier_debitnote`.`companyID`,`year` union select 'comp_supplier_creditNote' AS `comp_supplier_creditNote`,500 AS `500`,`comp_supplier_creditnote`.`companyID` AS `companyid`,date_format(`comp_supplier_creditnote`.`creditNoteDate`,'%Y') AS `year`,count(if((month(`comp_supplier_creditnote`.`creditNoteDate`) = 1),1,NULL)) AS `1`,count(if((month(`comp_supplier_creditnote`.`creditNoteDate`) = 2),1,NULL)) AS `2`,count(if((month(`comp_supplier_creditnote`.`creditNoteDate`) = 3),1,NULL)) AS `3`,count(if((month(`comp_supplier_creditnote`.`creditNoteDate`) = 4),1,NULL)) AS `4`,count(if((month(`comp_supplier_creditnote`.`creditNoteDate`) = 5),1,NULL)) AS `5`,count(if((month(`comp_supplier_creditnote`.`creditNoteDate`) = 6),1,NULL)) AS `6`,count(if((month(`comp_supplier_creditnote`.`creditNoteDate`) = 7),1,NULL)) AS `7`,count(if((month(`comp_supplier_creditnote`.`creditNoteDate`) = 8),1,NULL)) AS `8`,count(if((month(`comp_supplier_creditnote`.`creditNoteDate`) = 9),1,NULL)) AS `9`,count(if((month(`comp_supplier_creditnote`.`creditNoteDate`) = 10),1,NULL)) AS `10`,count(if((month(`comp_supplier_creditnote`.`creditNoteDate`) = 11),1,NULL)) AS `11`,count(if((month(`comp_supplier_creditnote`.`creditNoteDate`) = 12),1,NULL)) AS `12` from `comp_supplier_creditnote` where ((`comp_supplier_creditnote`.`updateAble` = 0) and (`comp_supplier_creditnote`.`is_delete` = 0)) group by `comp_supplier_creditnote`.`companyID`,`year` union select 'comp_payment' AS `comp_payment`,600 AS `600`,`comp_payment`.`companyID` AS `companyid`,date_format(`comp_payment`.`paymentDate`,'%Y') AS `year`,count(if((month(`comp_payment`.`paymentDate`) = 1),1,NULL)) AS `1`,count(if((month(`comp_payment`.`paymentDate`) = 2),1,NULL)) AS `2`,count(if((month(`comp_payment`.`paymentDate`) = 3),1,NULL)) AS `3`,count(if((month(`comp_payment`.`paymentDate`) = 4),1,NULL)) AS `4`,count(if((month(`comp_payment`.`paymentDate`) = 5),1,NULL)) AS `5`,count(if((month(`comp_payment`.`paymentDate`) = 6),1,NULL)) AS `6`,count(if((month(`comp_payment`.`paymentDate`) = 7),1,NULL)) AS `7`,count(if((month(`comp_payment`.`paymentDate`) = 8),1,NULL)) AS `8`,count(if((month(`comp_payment`.`paymentDate`) = 9),1,NULL)) AS `9`,count(if((month(`comp_payment`.`paymentDate`) = 10),1,NULL)) AS `10`,count(if((month(`comp_payment`.`paymentDate`) = 11),1,NULL)) AS `11`,count(if((month(`comp_payment`.`paymentDate`) = 12),1,NULL)) AS `12` from `comp_payment` where ((`comp_payment`.`updateAble` = 0) and (`comp_payment`.`is_delete` = 0)) group by `comp_payment`.`companyID`,`year` union select 'comp_payment_others' AS `comp_payment_others`,700 AS `700`,`comp_payment_others`.`companyID` AS `companyid`,date_format(`comp_payment_others`.`paymentDate`,'%Y') AS `year`,count(if((month(`comp_payment_others`.`paymentDate`) = 1),1,NULL)) AS `1`,count(if((month(`comp_payment_others`.`paymentDate`) = 2),1,NULL)) AS `2`,count(if((month(`comp_payment_others`.`paymentDate`) = 3),1,NULL)) AS `3`,count(if((month(`comp_payment_others`.`paymentDate`) = 4),1,NULL)) AS `4`,count(if((month(`comp_payment_others`.`paymentDate`) = 5),1,NULL)) AS `5`,count(if((month(`comp_payment_others`.`paymentDate`) = 6),1,NULL)) AS `6`,count(if((month(`comp_payment_others`.`paymentDate`) = 7),1,NULL)) AS `7`,count(if((month(`comp_payment_others`.`paymentDate`) = 8),1,NULL)) AS `8`,count(if((month(`comp_payment_others`.`paymentDate`) = 9),1,NULL)) AS `9`,count(if((month(`comp_payment_others`.`paymentDate`) = 10),1,NULL)) AS `10`,count(if((month(`comp_payment_others`.`paymentDate`) = 11),1,NULL)) AS `11`,count(if((month(`comp_payment_others`.`paymentDate`) = 12),1,NULL)) AS `12` from `comp_payment_others` where ((`comp_payment_others`.`updateAble` = 0) and (`comp_payment_others`.`is_delete` = 0) and (`comp_payment_others`.`otherPaymentType` = 1)) group by `comp_payment_others`.`companyID`,`year` union select 'comp_payment_others' AS `comp_payment_others`,750 AS `750`,`comp_payment_others`.`companyID` AS `companyid`,date_format(`comp_payment_others`.`paymentDate`,'%Y') AS `year`,count(if((month(`comp_payment_others`.`paymentDate`) = 1),1,NULL)) AS `1`,count(if((month(`comp_payment_others`.`paymentDate`) = 2),1,NULL)) AS `2`,count(if((month(`comp_payment_others`.`paymentDate`) = 3),1,NULL)) AS `3`,count(if((month(`comp_payment_others`.`paymentDate`) = 4),1,NULL)) AS `4`,count(if((month(`comp_payment_others`.`paymentDate`) = 5),1,NULL)) AS `5`,count(if((month(`comp_payment_others`.`paymentDate`) = 6),1,NULL)) AS `6`,count(if((month(`comp_payment_others`.`paymentDate`) = 7),1,NULL)) AS `7`,count(if((month(`comp_payment_others`.`paymentDate`) = 8),1,NULL)) AS `8`,count(if((month(`comp_payment_others`.`paymentDate`) = 9),1,NULL)) AS `9`,count(if((month(`comp_payment_others`.`paymentDate`) = 10),1,NULL)) AS `10`,count(if((month(`comp_payment_others`.`paymentDate`) = 11),1,NULL)) AS `11`,count(if((month(`comp_payment_others`.`paymentDate`) = 12),1,NULL)) AS `12` from `comp_payment_others` where ((`comp_payment_others`.`updateAble` = 0) and (`comp_payment_others`.`is_delete` = 0) and (`comp_payment_others`.`otherPaymentType` = 0)) group by `comp_payment_others`.`companyID`,`year` union select 'comp_sales_order' AS `comp_sales_order`,800 AS `800`,`comp_sales_order`.`companyID` AS `companyid`,date_format(`comp_sales_order`.`salesOrderDate`,'%Y') AS `year`,count(if((month(`comp_sales_order`.`salesOrderDate`) = 1),1,NULL)) AS `1`,count(if((month(`comp_sales_order`.`salesOrderDate`) = 2),1,NULL)) AS `2`,count(if((month(`comp_sales_order`.`salesOrderDate`) = 3),1,NULL)) AS `3`,count(if((month(`comp_sales_order`.`salesOrderDate`) = 4),1,NULL)) AS `4`,count(if((month(`comp_sales_order`.`salesOrderDate`) = 5),1,NULL)) AS `5`,count(if((month(`comp_sales_order`.`salesOrderDate`) = 6),1,NULL)) AS `6`,count(if((month(`comp_sales_order`.`salesOrderDate`) = 7),1,NULL)) AS `7`,count(if((month(`comp_sales_order`.`salesOrderDate`) = 8),1,NULL)) AS `8`,count(if((month(`comp_sales_order`.`salesOrderDate`) = 9),1,NULL)) AS `9`,count(if((month(`comp_sales_order`.`salesOrderDate`) = 10),1,NULL)) AS `10`,count(if((month(`comp_sales_order`.`salesOrderDate`) = 11),1,NULL)) AS `11`,count(if((month(`comp_sales_order`.`salesOrderDate`) = 12),1,NULL)) AS `12` from `comp_sales_order` where (`comp_sales_order`.`is_delete` = 0) group by `comp_sales_order`.`companyID`,`year` union select 'comp_delivery_order' AS `comp_delivery_order`,900 AS `900`,`comp_delivery_order`.`companyID` AS `companyid`,date_format(`comp_delivery_order`.`deliveryOrderDate`,'%Y') AS `year`,count(if((month(`comp_delivery_order`.`deliveryOrderDate`) = 1),1,NULL)) AS `1`,count(if((month(`comp_delivery_order`.`deliveryOrderDate`) = 2),1,NULL)) AS `2`,count(if((month(`comp_delivery_order`.`deliveryOrderDate`) = 3),1,NULL)) AS `3`,count(if((month(`comp_delivery_order`.`deliveryOrderDate`) = 4),1,NULL)) AS `4`,count(if((month(`comp_delivery_order`.`deliveryOrderDate`) = 5),1,NULL)) AS `5`,count(if((month(`comp_delivery_order`.`deliveryOrderDate`) = 6),1,NULL)) AS `6`,count(if((month(`comp_delivery_order`.`deliveryOrderDate`) = 7),1,NULL)) AS `7`,count(if((month(`comp_delivery_order`.`deliveryOrderDate`) = 8),1,NULL)) AS `8`,count(if((month(`comp_delivery_order`.`deliveryOrderDate`) = 9),1,NULL)) AS `9`,count(if((month(`comp_delivery_order`.`deliveryOrderDate`) = 10),1,NULL)) AS `10`,count(if((month(`comp_delivery_order`.`deliveryOrderDate`) = 11),1,NULL)) AS `11`,count(if((month(`comp_delivery_order`.`deliveryOrderDate`) = 12),1,NULL)) AS `12` from `comp_delivery_order` where ((`comp_delivery_order`.`updateAble` = 0) and (`comp_delivery_order`.`isDelete` = 0)) group by `comp_delivery_order`.`companyID`,`year` union select 'comp_sales_invoice' AS `comp_sales_invoice`,1000 AS `1000`,`comp_sales_invoice`.`companyID` AS `companyid`,date_format(`comp_sales_invoice`.`salesInvoiceDate`,'%Y') AS `year`,count(if((month(`comp_sales_invoice`.`salesInvoiceDate`) = 1),1,NULL)) AS `1`,count(if((month(`comp_sales_invoice`.`salesInvoiceDate`) = 2),1,NULL)) AS `2`,count(if((month(`comp_sales_invoice`.`salesInvoiceDate`) = 3),1,NULL)) AS `3`,count(if((month(`comp_sales_invoice`.`salesInvoiceDate`) = 4),1,NULL)) AS `4`,count(if((month(`comp_sales_invoice`.`salesInvoiceDate`) = 5),1,NULL)) AS `5`,count(if((month(`comp_sales_invoice`.`salesInvoiceDate`) = 6),1,NULL)) AS `6`,count(if((month(`comp_sales_invoice`.`salesInvoiceDate`) = 7),1,NULL)) AS `7`,count(if((month(`comp_sales_invoice`.`salesInvoiceDate`) = 8),1,NULL)) AS `8`,count(if((month(`comp_sales_invoice`.`salesInvoiceDate`) = 9),1,NULL)) AS `9`,count(if((month(`comp_sales_invoice`.`salesInvoiceDate`) = 10),1,NULL)) AS `10`,count(if((month(`comp_sales_invoice`.`salesInvoiceDate`) = 11),1,NULL)) AS `11`,count(if((month(`comp_sales_invoice`.`salesInvoiceDate`) = 12),1,NULL)) AS `12` from `comp_sales_invoice` where ((`comp_sales_invoice`.`updateAble` = 0) and (`comp_sales_invoice`.`is_delete` = 0)) group by `comp_sales_invoice`.`companyID`,`year` union select 'comp_sales_debitNote' AS `comp_sales_debitNote`,1100 AS `1100`,`comp_sales_debitnote`.`companyID` AS `companyid`,date_format(`comp_sales_debitnote`.`debitNoteDate`,'%Y') AS `year`,count(if((month(`comp_sales_debitnote`.`debitNoteDate`) = 1),1,NULL)) AS `1`,count(if((month(`comp_sales_debitnote`.`debitNoteDate`) = 2),1,NULL)) AS `2`,count(if((month(`comp_sales_debitnote`.`debitNoteDate`) = 3),1,NULL)) AS `3`,count(if((month(`comp_sales_debitnote`.`debitNoteDate`) = 4),1,NULL)) AS `4`,count(if((month(`comp_sales_debitnote`.`debitNoteDate`) = 5),1,NULL)) AS `5`,count(if((month(`comp_sales_debitnote`.`debitNoteDate`) = 6),1,NULL)) AS `6`,count(if((month(`comp_sales_debitnote`.`debitNoteDate`) = 7),1,NULL)) AS `7`,count(if((month(`comp_sales_debitnote`.`debitNoteDate`) = 8),1,NULL)) AS `8`,count(if((month(`comp_sales_debitnote`.`debitNoteDate`) = 9),1,NULL)) AS `9`,count(if((month(`comp_sales_debitnote`.`debitNoteDate`) = 10),1,NULL)) AS `10`,count(if((month(`comp_sales_debitnote`.`debitNoteDate`) = 11),1,NULL)) AS `11`,count(if((month(`comp_sales_debitnote`.`debitNoteDate`) = 12),1,NULL)) AS `12` from `comp_sales_debitnote` where ((`comp_sales_debitnote`.`updateAble` = 0) and (`comp_sales_debitnote`.`is_delete` = 0)) group by `comp_sales_debitnote`.`companyID`,`year` union select 'comp_sales_creditNote' AS `comp_sales_creditNote`,1200 AS `1200`,`comp_sales_creditnote`.`companyID` AS `companyid`,date_format(`comp_sales_creditnote`.`creditNoteDate`,'%Y') AS `year`,count(if((month(`comp_sales_creditnote`.`creditNoteDate`) = 1),1,NULL)) AS `1`,count(if((month(`comp_sales_creditnote`.`creditNoteDate`) = 2),1,NULL)) AS `2`,count(if((month(`comp_sales_creditnote`.`creditNoteDate`) = 3),1,NULL)) AS `3`,count(if((month(`comp_sales_creditnote`.`creditNoteDate`) = 4),1,NULL)) AS `4`,count(if((month(`comp_sales_creditnote`.`creditNoteDate`) = 5),1,NULL)) AS `5`,count(if((month(`comp_sales_creditnote`.`creditNoteDate`) = 6),1,NULL)) AS `6`,count(if((month(`comp_sales_creditnote`.`creditNoteDate`) = 7),1,NULL)) AS `7`,count(if((month(`comp_sales_creditnote`.`creditNoteDate`) = 8),1,NULL)) AS `8`,count(if((month(`comp_sales_creditnote`.`creditNoteDate`) = 9),1,NULL)) AS `9`,count(if((month(`comp_sales_creditnote`.`creditNoteDate`) = 10),1,NULL)) AS `10`,count(if((month(`comp_sales_creditnote`.`creditNoteDate`) = 11),1,NULL)) AS `11`,count(if((month(`comp_sales_creditnote`.`creditNoteDate`) = 12),1,NULL)) AS `12` from `comp_sales_creditnote` where ((`comp_sales_creditnote`.`updateAble` = 0) and (`comp_sales_creditnote`.`is_delete` = 0)) group by `comp_sales_creditnote`.`companyID`,`year` union select 'comp_receive_payment' AS `comp_receive_payment`,1300 AS `1300`,`comp_receive_payment`.`companyID` AS `companyid`,date_format(`comp_receive_payment`.`receivePaymentDate`,'%Y') AS `year`,count(if((month(`comp_receive_payment`.`receivePaymentDate`) = 1),1,NULL)) AS `1`,count(if((month(`comp_receive_payment`.`receivePaymentDate`) = 2),1,NULL)) AS `2`,count(if((month(`comp_receive_payment`.`receivePaymentDate`) = 3),1,NULL)) AS `3`,count(if((month(`comp_receive_payment`.`receivePaymentDate`) = 4),1,NULL)) AS `4`,count(if((month(`comp_receive_payment`.`receivePaymentDate`) = 5),1,NULL)) AS `5`,count(if((month(`comp_receive_payment`.`receivePaymentDate`) = 6),1,NULL)) AS `6`,count(if((month(`comp_receive_payment`.`receivePaymentDate`) = 7),1,NULL)) AS `7`,count(if((month(`comp_receive_payment`.`receivePaymentDate`) = 8),1,NULL)) AS `8`,count(if((month(`comp_receive_payment`.`receivePaymentDate`) = 9),1,NULL)) AS `9`,count(if((month(`comp_receive_payment`.`receivePaymentDate`) = 10),1,NULL)) AS `10`,count(if((month(`comp_receive_payment`.`receivePaymentDate`) = 11),1,NULL)) AS `11`,count(if((month(`comp_receive_payment`.`receivePaymentDate`) = 12),1,NULL)) AS `12` from `comp_receive_payment` where ((`comp_receive_payment`.`updateAble` = 0) and (`comp_receive_payment`.`is_delete` = 0)) group by `comp_receive_payment`.`companyID`,`year` union select 'comp_receive_payment_others' AS `comp_receive_payment_others`,1400 AS `1400`,`comp_receive_payment_others`.`companyID` AS `companyid`,date_format(`comp_receive_payment_others`.`receivePaymentDate`,'%Y') AS `year`,count(if((month(`comp_receive_payment_others`.`receivePaymentDate`) = 1),1,NULL)) AS `1`,count(if((month(`comp_receive_payment_others`.`receivePaymentDate`) = 2),1,NULL)) AS `2`,count(if((month(`comp_receive_payment_others`.`receivePaymentDate`) = 3),1,NULL)) AS `3`,count(if((month(`comp_receive_payment_others`.`receivePaymentDate`) = 4),1,NULL)) AS `4`,count(if((month(`comp_receive_payment_others`.`receivePaymentDate`) = 5),1,NULL)) AS `5`,count(if((month(`comp_receive_payment_others`.`receivePaymentDate`) = 6),1,NULL)) AS `6`,count(if((month(`comp_receive_payment_others`.`receivePaymentDate`) = 7),1,NULL)) AS `7`,count(if((month(`comp_receive_payment_others`.`receivePaymentDate`) = 8),1,NULL)) AS `8`,count(if((month(`comp_receive_payment_others`.`receivePaymentDate`) = 9),1,NULL)) AS `9`,count(if((month(`comp_receive_payment_others`.`receivePaymentDate`) = 10),1,NULL)) AS `10`,count(if((month(`comp_receive_payment_others`.`receivePaymentDate`) = 11),1,NULL)) AS `11`,count(if((month(`comp_receive_payment_others`.`receivePaymentDate`) = 12),1,NULL)) AS `12` from `comp_receive_payment_others` where ((`comp_receive_payment_others`.`updateAble` = 0) and (`comp_receive_payment_others`.`is_delete` = 0)) group by `comp_receive_payment_others`.`companyID`,`year` union select 'comp_cash_sales' AS `comp_cash_sales`,1500 AS `1500`,`comp_cash_sales`.`companyID` AS `companyid`,date_format(`comp_cash_sales`.`salesInvoiceDate`,'%Y') AS `year`,count(if((month(`comp_cash_sales`.`salesInvoiceDate`) = 1),1,NULL)) AS `1`,count(if((month(`comp_cash_sales`.`salesInvoiceDate`) = 2),1,NULL)) AS `2`,count(if((month(`comp_cash_sales`.`salesInvoiceDate`) = 3),1,NULL)) AS `3`,count(if((month(`comp_cash_sales`.`salesInvoiceDate`) = 4),1,NULL)) AS `4`,count(if((month(`comp_cash_sales`.`salesInvoiceDate`) = 5),1,NULL)) AS `5`,count(if((month(`comp_cash_sales`.`salesInvoiceDate`) = 6),1,NULL)) AS `6`,count(if((month(`comp_cash_sales`.`salesInvoiceDate`) = 7),1,NULL)) AS `7`,count(if((month(`comp_cash_sales`.`salesInvoiceDate`) = 8),1,NULL)) AS `8`,count(if((month(`comp_cash_sales`.`salesInvoiceDate`) = 9),1,NULL)) AS `9`,count(if((month(`comp_cash_sales`.`salesInvoiceDate`) = 10),1,NULL)) AS `10`,count(if((month(`comp_cash_sales`.`salesInvoiceDate`) = 11),1,NULL)) AS `11`,count(if((month(`comp_cash_sales`.`salesInvoiceDate`) = 12),1,NULL)) AS `12` from `comp_cash_sales` where ((`comp_cash_sales`.`updateAble` = 0) and (`comp_cash_sales`.`is_delete` = 0)) group by `comp_cash_sales`.`companyID`,`year` union select 'comp_journal' AS `comp_journal`,1600 AS `1600`,`comp_journal`.`companyID` AS `companyid`,date_format(`comp_journal`.`effective_date`,'%Y') AS `year`,count(if((month(`comp_journal`.`effective_date`) = 1),1,NULL)) AS `1`,count(if((month(`comp_journal`.`effective_date`) = 2),1,NULL)) AS `2`,count(if((month(`comp_journal`.`effective_date`) = 3),1,NULL)) AS `3`,count(if((month(`comp_journal`.`effective_date`) = 4),1,NULL)) AS `4`,count(if((month(`comp_journal`.`effective_date`) = 5),1,NULL)) AS `5`,count(if((month(`comp_journal`.`effective_date`) = 6),1,NULL)) AS `6`,count(if((month(`comp_journal`.`effective_date`) = 7),1,NULL)) AS `7`,count(if((month(`comp_journal`.`effective_date`) = 8),1,NULL)) AS `8`,count(if((month(`comp_journal`.`effective_date`) = 9),1,NULL)) AS `9`,count(if((month(`comp_journal`.`effective_date`) = 10),1,NULL)) AS `10`,count(if((month(`comp_journal`.`effective_date`) = 11),1,NULL)) AS `11`,count(if((month(`comp_journal`.`effective_date`) = 12),1,NULL)) AS `12` from `comp_journal` where ((`comp_journal`.`is_delete` = 0) and isnull(`comp_journal`.`formNo`)) group by `comp_journal`.`companyID`,`comp_journal`.`year` */;

--
-- Final view structure for view `view_unpost_ap_creditnote`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_ap_creditnote`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_unpost_ap_creditnote` AS select `e`.`supplierName` AS `supplier`,`a`.`ID` AS `creditnoteID`,`b`.`lineNo` AS `lineNo`,`c`.`projectID` AS `projectID`,`a`.`supplierInvoiceID` AS `supplierInvoiceID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`supplierID` AS `supplierID`,`c`.`supplierInvoiceNo` AS `supplierInvoiceNo`,if((`c`.`purchaseInvoiceCodeID` = 1),(select `cri`.`locationID` from (`comp_receive_item_detail` `crid` left join `comp_receive_item` `cri` on((`cri`.`ID` = `crid`.`receiveID`))) where (`crid`.`ID` = `g`.`receiveID`)),`c`.`locationID`) AS `locationID`,`b`.`umID` AS `umID`,`b`.`quantity` AS `quantity`,`b`.`itemID` AS `itemID`,concat('[',`d`.`itemCode`,']',`d`.`name`) AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxamount`,(select `item`.`inventoriesID` from `item` where (`item`.`ID` = `b`.`itemID`)) AS `drAccountID`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `crAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `drTaxAccountID`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `crTaxAccountID` from (((`comp_supplier_creditnote` `a` join (`comp_supplier_creditnote_detail` `b` left join `item` `d` on((`b`.`itemID` = `d`.`ID`)))) join (`comp_supplier_invoice` `c` left join `comp_supplier_invoice_detail` `g` on((`c`.`ID` = `g`.`invoiceID`)))) join `supplier` `e`) where ((`a`.`ID` = `b`.`creditnoteID`) and (`a`.`supplierInvoiceID` = `c`.`ID`) and (`e`.`ID` = `a`.`supplierID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) union select `e`.`supplierName` AS `supplier`,`a`.`ID` AS `creditnoteID`,`b`.`lineNo` AS `lineNo`,`c`.`projectID` AS `projectID`,`a`.`supplierInvoiceID` AS `supplierInvoiceID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`supplierID` AS `supplierID`,`c`.`supplierInvoiceNo` AS `supplierInvoiceNo`,`c`.`locationID` AS `locationID`,`b`.`umID` AS `umID`,`b`.`quantity` AS `quantity`,NULL AS `itemID`,`b`.`itemdescription` AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxamount`,`b`.`accountNoID` AS `drAccountID`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `crAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `drTaxAccountID`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `crTaxAccountID` from (((`comp_supplier_creditnote` `a` join `comp_supplier_creditnote_charges` `b`) join `comp_supplier_invoice` `c`) join `supplier` `e`) where ((`a`.`ID` = `b`.`creditNoteID`) and (`a`.`supplierInvoiceID` = `c`.`ID`) and (`e`.`ID` = `a`.`supplierID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) */;

--
-- Final view structure for view `view_unpost_ap_debitnote`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_ap_debitnote`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_unpost_ap_debitnote` AS select `e`.`supplierName` AS `supplier`,`a`.`ID` AS `debitnoteID`,`b`.`lineNo` AS `lineNo`,`c`.`projectID` AS `projectID`,4 AS `typeID`,`b`.`ID` AS `typeDetailID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`supplierID` AS `supplierID`,`c`.`supplierInvoiceNo` AS `supplierInvoiceNo`,if((`c`.`purchaseInvoiceCodeID` = 1),(select `cri`.`locationID` from (`comp_receive_item_detail` `crid` left join `comp_receive_item` `cri` on((`cri`.`ID` = `crid`.`receiveID`))) where (`crid`.`ID` = `g`.`receiveID`)),`c`.`locationID`) AS `locationID`,`b`.`umID` AS `umID`,`b`.`quantity` AS `quantity`,`b`.`itemID` AS `itemID`,concat('[',`d`.`itemCode`,']',`b`.`itemdescription`) AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxamount`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `drAccountID`,(select `item`.`inventoriesID` from `item` where (`item`.`ID` = `b`.`itemID`)) AS `crAccountID`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `drTaxAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `crTaxAccountID`,NULL AS `cogsAcctID`,NULL AS `inventoriesAcctID` from (((`comp_supplier_debitnote` `a` join (`comp_supplier_debitnote_detail` `b` left join `item` `d` on((`b`.`itemID` = `d`.`ID`)))) join (`comp_supplier_invoice` `c` left join `comp_supplier_invoice_detail` `g` on((`c`.`ID` = `g`.`invoiceID`)))) join `supplier` `e`) where ((`a`.`ID` = `b`.`debitnoteID`) and (`a`.`supplierID` = `e`.`ID`) and (`a`.`supplierInvoiceID` = `c`.`ID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) union select `e`.`supplierName` AS `supplier`,`a`.`ID` AS `debitnoteID`,`b`.`lineNo` AS `lineNo`,`c`.`projectID` AS `projectID`,4 AS `typeID`,`b`.`ID` AS `typeDetailID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`supplierID` AS `supplierID`,`c`.`supplierInvoiceNo` AS `supplierInvoiceNo`,`c`.`locationID` AS `locationID`,`b`.`umID` AS `umID`,`b`.`quantity` AS `quantity`,NULL AS `itemID`,`b`.`itemdescription` AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxamount`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `drAccountID`,`b`.`accountNoID` AS `crAccountID`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `drTaxAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `crTaxAccountID`,NULL AS `cogsAcctID`,NULL AS `inventoriesAcctID` from (((`comp_supplier_debitnote` `a` join `comp_supplier_debitnote_charges` `b`) join `comp_supplier_invoice` `c`) join `supplier` `e`) where ((`a`.`ID` = `b`.`debitNoteID`) and (`a`.`supplierID` = `e`.`ID`) and (`a`.`supplierInvoiceID` = `c`.`ID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) */;

--
-- Final view structure for view `view_unpost_ap_invoice`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_ap_invoice`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_unpost_ap_invoice` AS select `d`.`supplierName` AS `supplier`,`a`.`ID` AS `invoiceID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`supplierID` AS `supplierID`,`b`.`lineNo` AS `lineNo`,`b`.`itemID` AS `itemID`,concat('[',`c`.`itemCode`,']',`b`.`itemname`) AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxamount`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'unInvoiceAP'))) AS `drAccountID`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `crAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `drTaxAccountID`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `crTaxAccountID` from (((`comp_supplier_invoice` `a` left join `comp_supplier_invoice_detail` `b` on((`a`.`ID` = `b`.`invoiceID`))) left join `item` `c` on((`b`.`itemID` = `c`.`ID`))) join `supplier` `d` on((`d`.`ID` = `a`.`supplierID`))) where ((`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) union select `d`.`supplierName` AS `supplier`,`a`.`ID` AS `invoiceID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`supplierID` AS `supplierID`,(`b`.`lineNo` + (select ifnull(max(`comp_supplier_invoice_detail`.`lineNo`),0) from `comp_supplier_invoice_detail` where (`comp_supplier_invoice_detail`.`invoiceID` = `a`.`ID`))) AS `lineNo`,NULL AS `itemID`,`b`.`chargeDescription` AS `itemname`,`b`.`amountExcludedTax` AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxamount`,`b`.`accountNoID` AS `drAccountID`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `crAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `drTaxAccountID`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `crTaxAccountID` from ((`comp_supplier_invoice` `a` join `comp_supplier_invoice_charges` `b` on((`a`.`ID` = `b`.`invoiceID`))) left join `supplier` `d` on((`d`.`ID` = `a`.`supplierID`))) where ((`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) */;

--
-- Final view structure for view `view_unpost_ar_creditnote`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_ar_creditnote`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_unpost_ar_creditnote` AS select `f`.`customerName` AS `customer`,`a`.`salesInvoiceID` AS `salesinvoiceID`,`a`.`ID` AS `creditnoteID`,`a`.`projectID` AS `projectID`,0 AS `typeID`,`b`.`ID` AS `typeDetailID`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`customerID` AS `customerID`,if((`c`.`invoiceCodeID` = 1),(select `dord`.`locationID` from (`comp_delivery_detail` `ddet` left join `comp_delivery_order` `dord` on((`dord`.`ID` = `ddet`.`deliveryID`))) where (`ddet`.`ID` = `g`.`doID`)),`c`.`locationID`) AS `locationID`,concat(`c`.`formNo`,'[',convert(lpad(`c`.`serialNo`,8,'0') using latin1),']') AS `salesInvoiceNo`,`b`.`lineNo` AS `lineNo`,`b`.`itemID` AS `itemID`,`b`.`umID` AS `umID`,`b`.`quantity` AS `quantity`,concat('[',`d`.`itemCode`,']',`b`.`itemname`) AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxamount`,(select `item`.`incomeID` from `item` where (`item`.`ID` = `b`.`itemID`)) AS `drAccountID`,ifnull(`f`.`linkedAPAccountID`,`e`.`accountID`) AS `crAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `drTaxAccountID`,ifnull(`f`.`linkedAPAccountID`,`e`.`accountID`) AS `crTaxAccountID`,(select `item`.`cogsID` from `item` where (`item`.`ID` = `b`.`itemID`)) AS `cogsAcctID`,(select `item`.`inventoriesID` from `item` where (`item`.`ID` = `b`.`itemID`)) AS `inventoriesAcctID` from ((((((`comp_sales_creditnote` `a` left join `comp_sales_creditnote_detail` `b` on((`a`.`ID` = `b`.`creditnoteID`))) left join `item` `d` on((`b`.`itemID` = `d`.`ID`))) left join `comp_sales_invoice` `c` on((`c`.`ID` = `a`.`salesInvoiceID`))) left join `comp_sales_invoice_detail` `g` on((`c`.`ID` = `g`.`invoiceID`))) join `customer` `f`) join `comp_control_acct_setup` `e`) where ((`a`.`ID` = `b`.`creditnoteID`) and (`a`.`customerID` = `f`.`ID`) and (`e`.`companyID` = `a`.`companyID`) and (`e`.`accountCode` = 'rcvacct') and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) union select `f`.`customerName` AS `customer`,`a`.`salesInvoiceID` AS `salesinvoiceID`,`a`.`ID` AS `creditnoteID`,`c`.`projectID` AS `projectID`,0 AS `typeID`,`b`.`ID` AS `typeDetailID`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`customerID` AS `customerID`,`c`.`locationID` AS `locationID`,concat(`c`.`formNo`,'[',convert(lpad(`c`.`serialNo`,8,'0') using latin1),']') AS `salesInvoiceNo`,`b`.`lineNo` AS `lineNo`,NULL AS `itemID`,NULL AS `umID`,1 AS `quantity`,`b`.`chargeDescription` AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxamount`,`b`.`accountNoID` AS `drAccountID`,ifnull(`f`.`linkedAPAccountID`,`e`.`accountID`) AS `crAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `drTaxAccountID`,ifnull(`f`.`linkedAPAccountID`,`e`.`accountID`) AS `crTaxAccountID`,NULL AS `cogsAcctID`,NULL AS `inventoriesAcctID` from ((((`comp_sales_creditnote` `a` left join `comp_sales_invoice` `c` on((`c`.`ID` = `a`.`salesInvoiceID`))) join `customer` `f`) join `comp_control_acct_setup` `e`) join `comp_sales_creditnote_charges` `b`) where ((`a`.`ID` = `b`.`creditNoteID`) and (`a`.`customerID` = `f`.`ID`) and (`e`.`companyID` = `a`.`companyID`) and (`e`.`accountCode` = 'rcvacct') and (`a`.`ID` = `b`.`creditNoteID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) */;

--
-- Final view structure for view `view_unpost_ar_debitnote`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_ar_debitnote`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_unpost_ar_debitnote` AS select `f`.`customerName` AS `customer`,`a`.`salesInvoiceID` AS `salesinvoiceID`,`a`.`ID` AS `debitnoteID`,`c`.`projectID` AS `projectID`,3 AS `typeID`,`b`.`ID` AS `typeDetailID`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`customerID` AS `customerID`,if((`c`.`invoiceCodeID` = 1),(select `do`.`locationID` from (`comp_delivery_detail` `ddet` left join `comp_delivery_order` `do` on((`do`.`ID` = `ddet`.`deliveryID`))) where (`ddet`.`ID` = `g`.`doID`)),`c`.`locationID`) AS `locationID`,concat(`c`.`formNo`,'[',convert(lpad(`c`.`serialNo`,8,'0') using latin1),']') AS `salesInvoiceNo`,`b`.`lineNo` AS `lineNo`,`b`.`itemID` AS `itemID`,`b`.`umID` AS `umID`,`b`.`quantity` AS `quantity`,concat('[',`d`.`itemCode`,']',`b`.`itemname`) AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxamount`,`c`.`currencyID` AS `currencyID`,ifnull(`f`.`linkedAPAccountID`,`e`.`accountID`) AS `drAccountID`,(select `item`.`incomeID` from `item` where (`item`.`ID` = `b`.`itemID`)) AS `crAccountID`,ifnull(`f`.`linkedAPAccountID`,`e`.`accountID`) AS `drTaxAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `crTaxAccountID`,`d`.`cogsID` AS `cogsAcctID`,`d`.`inventoriesID` AS `inventoriesAcctID` from ((((((`comp_sales_debitnote` `a` join `comp_sales_debitnote_detail` `b` on((`a`.`ID` = `b`.`debitnoteID`))) left join `item` `d` on((`b`.`itemID` = `d`.`ID`))) left join `comp_sales_invoice` `c` on((`c`.`ID` = `a`.`salesInvoiceID`))) left join `comp_sales_invoice_detail` `g` on((`c`.`ID` = `g`.`invoiceID`))) join `customer` `f`) join `comp_control_acct_setup` `e`) where ((`a`.`ID` = `b`.`debitnoteID`) and (`a`.`customerID` = `f`.`ID`) and (`e`.`companyID` = `a`.`companyID`) and (`e`.`accountCode` = 'rcvacct') and (`a`.`ID` = `b`.`debitnoteID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) union select `f`.`customerName` AS `customer`,`a`.`salesInvoiceID` AS `salesinvoiceID`,`a`.`ID` AS `debitnoteID`,`c`.`projectID` AS `projectID`,0 AS `typeID`,`b`.`ID` AS `typeDetailID`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`serialNo`,8,'0') using latin1),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`customerID` AS `customerID`,`c`.`locationID` AS `locationID`,concat(`c`.`formNo`,'[',convert(lpad(`c`.`serialNo`,8,'0') using latin1),']') AS `salesInvoiceNo`,`b`.`lineNo` AS `lineNo`,NULL AS `itemID`,NULL AS `umID`,1 AS `quantity`,`b`.`chargeDescription` AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxamount`,`c`.`currencyID` AS `currencyID`,ifnull(`f`.`linkedAPAccountID`,`e`.`accountID`) AS `drAccountID`,`b`.`accountNoID` AS `crAccountID`,ifnull(`f`.`linkedAPAccountID`,`e`.`accountID`) AS `drTaxAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `crTaxAccountID`,NULL AS `cogsAcctID`,NULL AS `inventoriesAcctID` from ((((`comp_sales_debitnote` `a` left join `comp_sales_invoice` `c` on((`c`.`ID` = `a`.`salesInvoiceID`))) join `customer` `f`) join `comp_control_acct_setup` `e`) join `comp_sales_debitnote_charges` `b`) where ((`a`.`ID` = `b`.`debitNoteID`) and (`a`.`customerID` = `f`.`ID`) and (`e`.`companyID` = `a`.`companyID`) and (`e`.`accountCode` = 'rcvacct') and (`a`.`ID` = `b`.`debitNoteID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) */;

--
-- Final view structure for view `view_unpost_ar_invoice`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_ar_invoice`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_unpost_ar_invoice` AS select `a`.`projectID` AS `projectID`,`e`.`customerName` AS `customer`,`a`.`ID` AS `invoiceID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`customerID` AS `customerID`,`b`.`itemID` AS `itemID`,`b`.`lineNo` AS `lineNo`,concat('[',`c`.`itemCode`,']',`c`.`description`) AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxamount`,(select `customer`.`linkedAPAccountID` from `customer` where (`customer`.`ID` = `a`.`customerID`)) AS `drAccountID`,(select `item`.`incomeID` from `item` where (`item`.`ID` = `b`.`itemID`)) AS `crAccountID`,(select `customer`.`linkedAPAccountID` from `customer` where (`customer`.`ID` = `a`.`customerID`)) AS `drTaxAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `crTaxAccountID` from ((`comp_sales_invoice` `a` join (`comp_sales_invoice_detail` `b` left join `item` `c` on((`b`.`itemID` = `c`.`ID`)))) join `customer` `e`) where ((`a`.`ID` = `b`.`invoiceID`) and (`a`.`customerID` = `e`.`ID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) union select `a`.`projectID` AS `projectID`,`e`.`customerName` AS `customer`,`a`.`ID` AS `invoiceID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`customerID` AS `customerID`,`b`.`itemID` AS `itemID`,`b`.`lineNo` AS `lineNo`,concat('[',`c`.`itemCode`,']',`c`.`description`) AS `itemName`,(select sum((`crid`.`unitPrice` * `crdc`.`qty`)) from (`comp_receive_item_detail` `crid` join `comp_receive_delivery_conn` `crdc`) where ((`crid`.`ID` = `crdc`.`receiveDetailID`) and (`crdc`.`deliveryDetailID` = `do`.`ID`))) AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,NULL AS `taxamount`,(select `item`.`cogsID` from `item` where (`item`.`ID` = `b`.`itemID`)) AS `drAccountID`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'uninvoiceAR'))) AS `crAccountID`,NULL AS `drTaxAccountID`,NULL AS `crTaxAccountID` from ((`comp_sales_invoice` `a` join ((`comp_sales_invoice_detail` `b` left join `item` `c` on((`b`.`itemID` = `c`.`ID`))) left join `comp_delivery_detail` `do` on(((`do`.`invoiceID` = `b`.`invoiceID`) and (`do`.`itemID` = `b`.`itemID`) and (`do`.`umID` = `b`.`umID`))))) join `customer` `e`) where ((`a`.`ID` = `b`.`invoiceID`) and (`a`.`customerID` = `e`.`ID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0) and (`a`.`invoiceCodeID` <> 2)) union select `a`.`projectID` AS `projectID`,`e`.`customerName` AS `customer`,`a`.`ID` AS `invoiceID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`customerID` AS `customerID`,NULL AS `NULL`,`b`.`lineNo` AS `lineNo`,`b`.`chargeDescription` AS `chargedescription`,`b`.`amountExcludedTax` AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxamount`,(select `customer`.`linkedAPAccountID` from `customer` where (`customer`.`ID` = `a`.`customerID`)) AS `drAccountID`,`b`.`accountNoID` AS `crAccountID`,(select `customer`.`linkedAPAccountID` from `customer` where (`customer`.`ID` = `a`.`customerID`)) AS `drTaxAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `crTaxAccountID` from ((`comp_sales_invoice` `a` join `comp_sales_invoice_charges` `b`) join `customer` `e`) where ((`a`.`ID` = `b`.`invoiceID`) and (`e`.`ID` = `a`.`customerID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) union select `a`.`projectID` AS `projectID`,`e`.`customerName` AS `customer`,`a`.`ID` AS `invoiceID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`customerID` AS `customerID`,NULL AS `NULL`,`b`.`lineNo` AS `lineNo`,'comission' AS `itemName`,((sum(`b`.`amountExcludedTax`) * `d`.`commisionRate`) / 100) AS `comissionAmount`,0 AS `taxID`,0 AS `taxAmount`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'commissionexp'))) AS `drAccountID`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'commissionpay'))) AS `crAccountID`,NULL AS `drTaxAccountID`,NULL AS `crTaxAccountID` from (((`comp_sales_invoice` `a` join `comp_sales_invoice_detail` `b`) join `comp_sales_agent` `d`) join `customer` `e`) where ((`a`.`companyID` = `d`.`companyID`) and (`a`.`ID` = `b`.`invoiceID`) and (`a`.`agentID` = `d`.`ID`) and (`a`.`customerID` = `e`.`ID`) and (`a`.`agentID` > 0) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) group by `a`.`ID` union select `a`.`projectID` AS `projectID`,`e`.`customerName` AS `customer`,`a`.`ID` AS `invoiceID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`customerID` AS `customerID`,NULL AS `NULL`,`b`.`lineNo` AS `lineNo`,'wakaf' AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedtax`,0 AS `taxID`,0 AS `taxAmount`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'wakafExpense'))) AS `drAccountID`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'wakafAcrual'))) AS `crAccountID`,NULL AS `drTaxAccountID`,NULL AS `crTaxAccountID` from ((((`comp_sales_invoice` `a` join `comp_sales_invoice_detail` `b`) join `wakaf_acrual` `c`) join `item` `d`) join `customer` `e`) where ((`a`.`ID` = `b`.`invoiceID`) and (`a`.`customerID` = `e`.`ID`) and (`a`.`companyID` = `c`.`companyID`) and (`b`.`itemID` = `d`.`ID`) and (`d`.`incomeID` = `c`.`salesAccountID`) and (`a`.`salesInvoiceDate` between `c`.`from` and `c`.`to`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) */;

--
-- Final view structure for view `view_unpost_ar_payment`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_ar_payment`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_unpost_ar_payment` AS select `a`.`ID` AS `paymentID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`customerID` AS `customerID`,NULL AS `purchaseInvoiceID`,`b`.`customerName` AS `customerName`,0 AS `lineNo`,NULL AS `paymentDetailID`,`a`.`referenceNo` AS `item`,`a`.`bankCharges` AS `amtPaid_amtAppl`,0 AS `discount_bankCharges`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'bankchargesAccount'))) AS `drAccountID`,(select `comp_bank`.`linkAccountID` from `comp_bank` where (`comp_bank`.`ID` = `a`.`bankID`)) AS `crAccountID`,NULL AS `drDiscountAccountID`,NULL AS `crDiscountAccountID` from (`comp_receive_payment` `a` join `customer` `b`) where ((`a`.`customerID` = `b`.`ID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) union select `a`.`ID` AS `paymentID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`customerID` AS `customerID`,`b`.`invoiceID` AS `invoiceID`,`e`.`customerName` AS `customerName`,`b`.`lineNo` AS `lineNo`,`b`.`ID` AS `paymentDetailID`,concat(concat(concat(`d`.`formNo`,'['),convert(lpad(`d`.`serialNo`,8,'0') using latin1)),']') AS `item`,(`b`.`amountApplied` - `b`.`discount`) AS `amtPaid_amtAppl`,`b`.`discount` AS `discount_bankCharges`,(select `comp_bank`.`linkAccountID` from `comp_bank` where (`comp_bank`.`ID` = `a`.`bankID`)) AS `drAccountID`,(select `customer`.`linkedAPAccountID` from `customer` where (`customer`.`ID` = `a`.`customerID`)) AS `crAccountID`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'saledisacct'))) AS `drDiscountAccountID`,(select `customer`.`linkedAPAccountID` from `customer` where (`customer`.`ID` = `a`.`customerID`)) AS `crDiscountAccountID` from (((`comp_receive_payment` `a` join (`comp_receive_payment_detail` `b` left join `comp_sales_invoice` `d` on((`d`.`ID` = `b`.`invoiceID`)))) join `comp_sales_invoice` `c`) join `customer` `e`) where ((`a`.`customerID` = `e`.`ID`) and (`a`.`ID` = `b`.`receivePaymentID`) and (`c`.`ID` = `b`.`invoiceID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) union select `a`.`ID` AS `paymentID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`customerID` AS `customerID`,`b`.`historicalinvoiceID` AS `invoiceID`,`e`.`customerName` AS `customerName`,`b`.`ID` AS `lineNo`,`b`.`ID` AS `paymentDetailID`,concat(concat(concat(`d`.`formNo`,'['),convert(lpad(`d`.`serialNo`,8,'0') using latin1)),']') AS `item`,`b`.`amountApplied` AS `amtPaid_amtAppl`,NULL AS `discount_bankCharges`,(select `comp_bank`.`linkAccountID` from `comp_bank` where (`comp_bank`.`ID` = `a`.`bankID`)) AS `drAccountID`,(select `customer`.`linkedAPAccountID` from `customer` where (`customer`.`ID` = `a`.`customerID`)) AS `crAccountID`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'saledisacct'))) AS `drDiscountAccountID`,(select `customer`.`linkedAPAccountID` from `customer` where (`customer`.`ID` = `a`.`customerID`)) AS `crDiscountAccountID` from (((`comp_receive_payment` `a` join (`comp_receive_payment_detail_historical_invoice` `b` left join `comp_historical_customer_invoice` `d` on((`d`.`ID` = `b`.`historicalinvoiceID`)))) join `comp_historical_customer_invoice` `c`) join `customer` `e`) where ((`a`.`customerID` = `e`.`ID`) and (`a`.`ID` = `b`.`paymentID`) and (`c`.`ID` = `b`.`historicalinvoiceID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) */;

--
-- Final view structure for view `view_unpost_cash_purchase`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_cash_purchase`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_unpost_cash_purchase` AS select `b`.`lineNo` AS `lineNo`,`b`.`quantity` AS `quantity`,`b`.`unitPrice` AS `unitPrice`,`b`.`itemID` AS `itemID`,`b`.`itemdescription` AS `itemdescription`,`b`.`umID` AS `umID`,`a`.`locationID` AS `locationID`,`a`.`ID` AS `othersPaymentID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`ID`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,NULL AS `supplierID`,NULL AS `purchaseInvoiceID`,`b`.`ID` AS `paymentDetailID`,NULL AS `supplierInvoiceNo`,`b`.`lineNo` AS `ID`,`b`.`itemname` AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedTax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxAmount`,`a`.`projectID` AS `projectID`,`c`.`itemTypeID` AS `itemTypeID`,if((`c`.`itemTypeID` = 23),`c`.`cogsID`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'uninvoiceAP')))) AS `drAccountID`,(select `comp_bank`.`linkAccountID` from `comp_bank` where (`comp_bank`.`ID` = `a`.`bankId`)) AS `crAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `drDiscountAccountID`,(select `comp_bank`.`linkAccountID` from `comp_bank` where (`comp_bank`.`ID` = `a`.`bankId`)) AS `crDiscountAccountID` from ((`comp_payment_others` `a` join `comp_payment_others_with_item` `b`) left join `item` `c` on((`c`.`ID` = `b`.`itemID`))) where ((`a`.`ID` = `b`.`otherPaymentID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) */;

--
-- Final view structure for view `view_unpost_cash_sale`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_cash_sale`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_unpost_cash_sale` AS select `a`.`projectID` AS `projectID`,`a`.`paymentFrom` AS `customer`,`a`.`ID` AS `invoiceID`,5 AS `typeID`,`b`.`ID` AS `typeDetailID`,`a`.`locationID` AS `locationID`,`b`.`quantity` AS `quantity`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`b`.`itemID` AS `itemID`,`b`.`umID` AS `umID`,`b`.`lineNo` AS `lineNo`,`d`.`currencyID` AS `currencyID`,concat('[',`c`.`itemCode`,']',`c`.`description`) AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxamount`,(select `comp_bank`.`linkAccountID` from `comp_bank` where (`comp_bank`.`ID` = `a`.`bankID`)) AS `drAccountID`,`c`.`incomeID` AS `crAccountID`,(select `comp_bank`.`linkAccountID` from `comp_bank` where (`comp_bank`.`ID` = `a`.`bankID`)) AS `drTaxAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `crTaxAccountID`,`c`.`cogsID` AS `cogsAcctID`,`c`.`inventoriesID` AS `inventoriesAcctID` from ((`comp_cash_sales` `a` join (`comp_cash_sales_detail` `b` left join `item` `c` on((`b`.`itemID` = `c`.`ID`)))) join `company` `d`) where ((`a`.`ID` = `b`.`invoiceID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0) and (`a`.`companyID` = `d`.`ID`)) */;

--
-- Final view structure for view `view_unpost_do`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_do`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_unpost_do` AS select `a`.`ID` AS `deliveryOrderID`,`a`.`customerID` AS `customerID`,NULL AS `projectID`,NULL AS `customer`,`a`.`ID` AS `invoiceID`,1 AS `typeID`,`b`.`ID` AS `typeDetailID`,`a`.`locationID` AS `locationID`,`b`.`quantitySent` AS `quantity`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`b`.`itemID` AS `itemID`,concat('[',`c`.`itemCode`,']',`c`.`description`) AS `itemName`,0 AS `amountExcludedtax`,NULL AS `taxid`,0 AS `taxamount`,NULL AS `drAccountID`,NULL AS `crAccountID`,NULL AS `drTaxAccountID`,NULL AS `crTaxAccountID`,if((`b`.`invoiceID` > 0),`c`.`cogsID`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'unInvoiceAR')))) AS `cogsAcctID`,`c`.`inventoriesID` AS `inventoriesAcctID` from (`comp_delivery_order` `a` join (`comp_delivery_detail` `b` left join `item` `c` on((`b`.`itemID` = `c`.`ID`)))) where ((`a`.`ID` = `b`.`deliveryID`) and (`a`.`updateAble` = 1) and (`a`.`isDelete` = 0)) */;

--
-- Final view structure for view `view_unpost_gst_transaction`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_gst_transaction`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_unpost_gst_transaction` AS select `a`.`ID` AS `paymentID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,NULL AS `supplierID`,NULL AS `purchaseInvoiceID`,concat(`a`.`Description`,'[',`a`.`vendor_cust_name`,']') AS `supplierName`,0 AS `lineNo`,NULL AS `paymentDetailID`,NULL AS `supplierInvoiceNo`,`a`.`reference` AS `item`,`b`.`taxAmountDr` AS `amtPaid_amtAppl`,0 AS `discount_bankCharges`,`b`.`accountID` AS `drAccountID`,(select `comp_gst_transaction_detail`.`accountID` from `comp_gst_transaction_detail` where ((`comp_gst_transaction_detail`.`gstTransID` = `a`.`ID`) and (`comp_gst_transaction_detail`.`taxAmountCr` > 0))) AS `crAccountID`,NULL AS `drDiscountAccountID`,NULL AS `crDiscountAccountID` from (`comp_gst_transaction` `a` join `comp_gst_transaction_detail` `b`) where ((`a`.`ID` = `b`.`gstTransID`) and (`b`.`taxAmountDr` > 0) and (`a`.`updateAble` = 1) and (`a`.`isDelete` = 0)) */;

--
-- Final view structure for view `view_unpost_other_payment`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_other_payment`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_unpost_other_payment` AS select `a`.`ID` AS `othersPaymentID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,NULL AS `supplierID`,NULL AS `purchaseInvoiceID`,`b`.`ID` AS `paymentDetailID`,NULL AS `supplierInvoiceNo`,`b`.`lineNo` AS `lineNo`,`b`.`itemdescription` AS `itemdescription`,`b`.`amountExcludedTax` AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxamount`,`b`.`accountID` AS `drAccountID`,(select `comp_bank`.`linkAccountID` from `comp_bank` where (`comp_bank`.`ID` = `a`.`bankId`)) AS `crAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `drTaxAccountID`,(select `comp_bank`.`linkAccountID` from `comp_bank` where (`comp_bank`.`ID` = `a`.`bankId`)) AS `crTaxAccountID` from (`comp_payment_others` `a` join `comp_payment_others_without_item` `b`) where ((`a`.`ID` = `b`.`otherPaymentID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) */;

--
-- Final view structure for view `view_unpost_other_receive`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_other_receive`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_unpost_other_receive` AS select `a`.`projectID` AS `projectID`,`a`.`receiveFrom` AS `receiveFrom`,`a`.`ID` AS `otherReceiveID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,NULL AS `NULL`,`b`.`description` AS `itemdescription`,`b`.`amountExcludedTax` AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxamount`,(select `comp_bank`.`linkAccountID` from `comp_bank` where (`comp_bank`.`ID` = `a`.`bankID`)) AS `drAccountID`,`b`.`accountNoID` AS `crAccountID`,(select `comp_bank`.`linkAccountID` from `comp_bank` where (`comp_bank`.`ID` = `a`.`bankID`)) AS `drTaxAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `crTaxAccountID` from (`comp_receive_payment_others` `a` join `comp_receive_payment_others_detail` `b`) where ((`a`.`ID` = `b`.`receivePaymentOthersID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) */;

--
-- Final view structure for view `view_unpost_payment`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_payment`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_unpost_payment` AS select `a`.`ID` AS `paymentID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`supplierID` AS `supplierID`,NULL AS `purchaseInvoiceID`,`b`.`supplierName` AS `supplierName`,0 AS `lineNo`,NULL AS `paymentDetailID`,NULL AS `supplierInvoiceNo`,`a`.`referenceNo` AS `item`,`a`.`bankCharges` AS `amtPaid_amtAppl`,0 AS `discount_bankCharges`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'bankchargesAccount'))) AS `drAccountID`,(select `comp_bank`.`linkAccountID` from `comp_bank` where (`comp_bank`.`ID` = `a`.`bankID`)) AS `crAccountID`,NULL AS `drDiscountAccountID`,NULL AS `crDiscountAccountID` from (`comp_payment` `a` join `supplier` `b`) where ((`a`.`supplierID` = `b`.`ID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) union select `a`.`ID` AS `paymentID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`supplierID` AS `supplierID`,`b`.`purchaseInvoiceID` AS `purchaseInvoiceID`,`e`.`supplierName` AS `supplierName`,`b`.`lineNo` AS `lineNo`,`b`.`ID` AS `paymentDetailID`,`c`.`supplierInvoiceNo` AS `supplierInvoiceNo`,concat(concat(concat(`d`.`formNo`,'['),convert(lpad(`d`.`serialNo`,8,'0') using latin1)),']') AS `item`,(`b`.`amountApplied` - `b`.`discount`) AS `amtPaid_amtAppl`,`b`.`discount` AS `discount_bankCharges`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `drAccountID`,(select `comp_bank`.`linkAccountID` from `comp_bank` where (`comp_bank`.`ID` = `a`.`bankID`)) AS `crAccountID`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `drDiscountAccountID`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'payDisc'))) AS `crDiscountAccountID` from (((`comp_payment` `a` join (`comp_payment_detail` `b` left join `comp_supplier_invoice` `d` on((`d`.`ID` = `b`.`purchaseInvoiceID`)))) join `comp_supplier_invoice` `c`) join `supplier` `e`) where ((`a`.`supplierID` = `e`.`ID`) and (`a`.`ID` = `b`.`paymentID`) and (`c`.`ID` = `b`.`purchaseInvoiceID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) union select `a`.`ID` AS `paymentID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`supplierID` AS `supplierID`,`b`.`historicalinvoiceID` AS `purchaseInvoiceID`,`e`.`supplierName` AS `supplierName`,`b`.`ID` AS `lineNo`,`b`.`ID` AS `paymentDetailID`,`c`.`supplierInvoiceNo` AS `supplierInvoiceNo`,concat(concat(concat(`d`.`formNo`,'['),convert(lpad(`d`.`serialNo`,8,'0') using latin1)),']') AS `item`,`b`.`amountApplied` AS `amtPaid_amtAppl`,NULL AS `discount_bankCharges`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `drAccountID`,(select `comp_bank`.`linkAccountID` from `comp_bank` where (`comp_bank`.`ID` = `a`.`bankID`)) AS `crAccountID`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `drDiscountAccountID`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'payDisc'))) AS `crDiscountAccountID` from (((`comp_payment` `a` join (`comp_payment_detail_historical_invoice` `b` left join `comp_historical_supplier_invoice` `d` on((`d`.`ID` = `b`.`historicalinvoiceID`)))) join `comp_historical_supplier_invoice` `c`) join `supplier` `e`) where ((`a`.`supplierID` = `e`.`ID`) and (`a`.`ID` = `b`.`paymentID`) and (`c`.`ID` = `b`.`historicalinvoiceID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) union select `a`.`ID` AS `paymentID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`supplierID` AS `supplierID`,`b`.`creditnoteID` AS `purchaseInvoiceID`,`e`.`supplierName` AS `supplierName`,`b`.`ID` AS `lineNo`,`b`.`ID` AS `paymentDetailID`,`c`.`supplierInvoiceID` AS `supplierInvoiceNo`,concat(concat(concat(`d`.`formNo`,'['),convert(lpad(`d`.`serialNo`,8,'0') using latin1)),']') AS `item`,`b`.`amountApplied` AS `amtPaid_amtAppl`,NULL AS `discount_bankCharges`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `drAccountID`,(select `comp_bank`.`linkAccountID` from `comp_bank` where (`comp_bank`.`ID` = `a`.`bankID`)) AS `crAccountID`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `drDiscountAccountID`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'payDisc'))) AS `crDiscountAccountID` from (((`comp_payment` `a` join (`comp_payment_detail_creditnote` `b` left join `comp_supplier_creditnote` `d` on((`d`.`ID` = `b`.`creditnoteID`)))) join `comp_supplier_creditnote` `c`) join `supplier` `e`) where ((`a`.`supplierID` = `e`.`ID`) and (`a`.`ID` = `b`.`paymentID`) and (`c`.`ID` = `b`.`creditnoteID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) */;

--
-- Final view structure for view `view_unpost_receive_item`
--

/*!50001 DROP VIEW IF EXISTS `view_unpost_receive_item`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_unpost_receive_item` AS select `a`.`ID` AS `receiveID`,`a`.`companyID` AS `companyID`,`a`.`locationID` AS `locationID`,`a`.`deliveryDate` AS `transactionDate`,`a`.`supplierID` AS `supplierID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`serialNo`,8,'0') using latin1)),']') AS `formNo`,`b`.`lineNo` AS `lineNo`,`b`.`itemID` AS `itemID`,concat('[',`c`.`itemCode`,']',`c`.`name`) AS `itemName`,`a`.`exchangeRate` AS `exchangeRate`,`b`.`unitPrice` AS `unitPrice`,`b`.`quantityReceived` AS `quantityReceived`,`b`.`umID` AS `umID`,`b`.`amount` AS `amount`,ifnull((select `item`.`inventoriesID` from `item` where (`item`.`ID` = `b`.`itemID`)),(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'invAcct')))) AS `drAccountID`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'unInvoiceAP'))) AS `crAccountID` from ((`comp_receive_item` `a` join `comp_receive_item_detail` `b`) join `item` `c`) where ((`a`.`updateAble` = 1) and (`a`.`ID` = `b`.`receiveID`) and (`b`.`itemID` = `c`.`ID`)) */;

--
-- Final view structure for view `view_wakaf_accrual`
--

/*!50001 DROP VIEW IF EXISTS `view_wakaf_accrual`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_wakaf_accrual` AS select `b`.`companyID` AS `companyID`,`b`.`acctID` AS `acctID`,`b`.`year` AS `year`,sum(`b`.`total`) AS `totalAmount` from (`company` `a` join `comp_acc_det` `b`) where ((`a`.`ID` = `b`.`companyID`) and `b`.`acctID` in (select distinct `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where (`comp_control_acct_setup`.`accountCode` = 'wakafAcrual'))) group by `b`.`companyID`,`b`.`acctID`,`b`.`year` */;

--
-- Final view structure for view `view_wakaf_from_profit`
--

/*!50001 DROP VIEW IF EXISTS `view_wakaf_from_profit`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_wakaf_from_profit` AS select `a`.`companyID` AS `companyid`,`a`.`year` AS `year`,`c`.`ID` AS `acctType`,sum(`a`.`amountdr`) AS `totalDr`,sum(`a`.`amountcr`) AS `totalCr` from ((`comp_acc_det` `a` join `comp_chart_of_acct` `b`) join `_ref_acct_group` `c`) where ((`b`.`ID` = `a`.`acctID`) and (`c`.`ID` = `b`.`acctGroupID`) and (`c`.`ID` in (3,4))) group by `a`.`companyID`,`a`.`year`,`acctType` */;


