{"id":310,"date":"2021-04-27T13:58:57","date_gmt":"2021-04-27T05:58:57","guid":{"rendered":"https:\/\/www.tonghin.com.my\/blog\/?p=310"},"modified":"2021-04-27T13:58:59","modified_gmt":"2021-04-27T05:58:59","slug":"fixing-errors-and-bugs-in-the-project-module","status":"publish","type":"post","link":"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/27\/fixing-errors-and-bugs-in-the-project-module\/","title":{"rendered":"Fixing errors and bugs in the project module"},"content":{"rendered":"\n<p>Since I have completed the purchase invoice from both purchase order and goods received, I spent the week checking the codes, and finding bugs to be solved to ensure that the module runs as intended without any problems. <\/p>\n\n\n\n<p>I also had problems with the quantity mapping, as the total quantity being mapped in purchase invoice from purchase order is not the same as the total quantity from purchase invoice from goods received line item. The error was because I was initially reading the quantity from purchase invoice line item and goods receive line item instead of reading from the same entity which is goods receive line item. Due to this, different total quantity was being displayed in the UI. <\/p>\n\n\n\n<p>Next, I wrote integration tests for purchase invoice from purchase order and goods received. The tests included creating new purchase invoices, and loading the list of purchase invoices, as well as viewing the individual purchase invoices. <\/p>\n\n\n\n<p>When writing tests, mocks are being used. Mock uses the concept of testing a unit of code which depends on a group of other codes, such that the code will be tested even though its dependent codes are not written or contain bugs. In this case, mocks act as a platform which provides the test with its all needed requirements and environment to ensure that it works and pass as intended. <\/p>\n\n\n\n<p>I also learnt how to resolve issues in Git. Meaning that once an issue is assigned to a person, and it is solved, to resolve the issue on Git, comments such as Fix, Close and Resolve are written alongside to the issue  number created, as well as the codes need to be pushed so the changes can be viewed and tracked. <\/p>\n\n\n\n<p>See you all next week \ud83d\ude42 <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since I have completed the purchase invoice from both purchase order and goods received, I spent the week checking the codes, and finding bugs to be solved to ensure that the module runs as intended without any problems. I also had problems with the quantity mapping, as the total quantity being mapped in purchase invoice &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/27\/fixing-errors-and-bugs-in-the-project-module\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Fixing errors and bugs in the project module&#8221;<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[10,3],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v15.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Fixing errors and bugs in the project module | Tong Hin&#039;s Blog<\/title>\n<meta name=\"description\" content=\"The usage of mocks in integration and unit tests. As well as the ways of resolving issues in Git by writing appropriate comments.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/27\/fixing-errors-and-bugs-in-the-project-module\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Fixing errors and bugs in the project module | Tong Hin&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"The usage of mocks in integration and unit tests. As well as the ways of resolving issues in Git by writing appropriate comments.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/27\/fixing-errors-and-bugs-in-the-project-module\/\" \/>\n<meta property=\"og:site_name\" content=\"Tong Hin&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-04-27T05:58:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-04-27T05:58:59+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data1\" content=\"2 minutes\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\",\"name\":\"TONG HIN MACHINERY\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"sameAs\":[\"https:\/\/www.youtube.com\/channel\/UC60EoxJMNbu8mV0LuEGfrBg\"],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#logo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/wp-content\/uploads\/2020\/10\/web_logo_180_180.jpg\",\"width\":180,\"height\":180,\"caption\":\"TONG HIN MACHINERY\"},\"image\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#website\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"name\":\"Tong Hin&#039;s Blog\",\"description\":\"Sharing About Technology\",\"publisher\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.tonghin.com.my\/blog\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/27\/fixing-errors-and-bugs-in-the-project-module\/#webpage\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/27\/fixing-errors-and-bugs-in-the-project-module\/\",\"name\":\"Fixing errors and bugs in the project module | Tong Hin&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#website\"},\"datePublished\":\"2021-04-27T05:58:57+00:00\",\"dateModified\":\"2021-04-27T05:58:59+00:00\",\"description\":\"The usage of mocks in integration and unit tests. As well as the ways of resolving issues in Git by writing appropriate comments.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/27\/fixing-errors-and-bugs-in-the-project-module\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/27\/fixing-errors-and-bugs-in-the-project-module\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/27\/fixing-errors-and-bugs-in-the-project-module\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/27\/fixing-errors-and-bugs-in-the-project-module\/\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/27\/fixing-errors-and-bugs-in-the-project-module\/\",\"name\":\"Fixing errors and bugs in the project module\"}}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/27\/fixing-errors-and-bugs-in-the-project-module\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/27\/fixing-errors-and-bugs-in-the-project-module\/#webpage\"},\"author\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#\/schema\/person\/11b81d489377d44deb601a79a57599ee\"},\"headline\":\"Fixing errors and bugs in the project module\",\"datePublished\":\"2021-04-27T05:58:57+00:00\",\"dateModified\":\"2021-04-27T05:58:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/27\/fixing-errors-and-bugs-in-the-project-module\/#webpage\"},\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\"},\"keywords\":\"mvvm,tdd\",\"articleSection\":\"Experiential\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/27\/fixing-errors-and-bugs-in-the-project-module\/#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#\/schema\/person\/11b81d489377d44deb601a79a57599ee\",\"name\":\"Faizah Chaibou\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5c69df35ce6d69b7d1b66311b4144ea8?s=96&d=mm&r=g\",\"caption\":\"Faizah Chaibou\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/310"}],"collection":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/comments?post=310"}],"version-history":[{"count":1,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/310\/revisions"}],"predecessor-version":[{"id":311,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/310\/revisions\/311"}],"wp:attachment":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/media?parent=310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/categories?post=310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/tags?post=310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}