{"id":1922,"date":"2025-01-13T13:25:32","date_gmt":"2025-01-13T05:25:32","guid":{"rendered":"https:\/\/www.tonghin.com.my\/blog\/?p=1922"},"modified":"2025-01-13T13:25:33","modified_gmt":"2025-01-13T05:25:33","slug":"internship-week-12-add-transfer-receive-service-and-update-transfer","status":"publish","type":"post","link":"https:\/\/www.tonghin.com.my\/blog\/2025\/01\/13\/internship-week-12-add-transfer-receive-service-and-update-transfer\/","title":{"rendered":"Internship (Week 12): Add Transfer Receive Service and Update Transfer"},"content":{"rendered":"\n<p>Starting the first day of this week, I begin updating the schema required from the last discussion. I reduce the number of objects while adding the respective details user IDs, and I remove unnecessary objects. I also modify the line items for the transfer order by changing the list of transfer DOs and receive items from objects to strings. Afterward, I proceed to update the repositories, services and tests based on the new schema while also adding more static methods for the store and user. Once the tests passed, I continue by creating the transfer receive components including the commands for create, cancel and query for lists, the API controllers for commands and queries, the repositories for CRUD operations and the logic services. After creating all the necessary parts, I focus on refining the transfer DO logic and tests. Meanwhile, Mr. Peter stated that the transfer DO may contain multiple transfer orders to be issued. Additionally, when the user wants to create a new transfer receive by receiving multiple transfer DOs.<\/p>\n\n\n\n<p>On the last day of the year, I add some exceptions to ensure consistent store for both transfer DOs and transfer receives. I also refine the transfer DO services, particularly the create and cancel DO methods, to support scenarios where the transfer DO contains multiple transfer orders. This required updating the logic for issuing or canceling multiple transfer orders and revising the corresponding tests. After all the transfer DO tests passed, I update the transfer receive logic for creating multiple transfer DOs and updated both the transfer DOs and transfer orders after creation. Meanwhile, I rename certain elements to make them more meaningful and user-friendly. Mr. Peter also pointed out a scenario I had overlooked regarding the cancellation of transfer orders flag. Additionally, he suggested dividing the transfer order tests into smaller sections for easier navigation. To improve readability, I decide to exclude the tests from the file, planning to address this after the public holiday.<\/p>\n\n\n\n<p>Happy New Year! I start by separating the transfer order tests and checking them, renaming components for better understanding while rename the error messages for both transfer orders and DOs. I then began implementing the new transfer order cancellation logic discussed earlier. Although the implementation involved some challenges initially, I successfully complete it and pass the tests. Next, I worked on the creation of transfer receive components and added additional tests. After successfully completing the transfer receive creation process, Mr. Peter requested new repositories for creation and deletion, excluding history. He also mentioned adding a LookUp for TypeConfig. After creating the repositories and lookup, I added methods for creating them based on the item barcode and store following the creation of a new transfer receive. Finally, Mr. Peter also reminded to add the exception for destination matching the for the user.<\/p>\n\n\n\n<h4>Conclusion<\/h4>\n\n\n\n<p>Since this week is the penultimate week of my internship, I focus on refining and extending key features such as transport DO and transport receive logic, while working on feedback to improve test structure and naming conventions to increase clarity. Despite the challenges, I am able to successfully implement and validate complex functionality such as multiple transfer order processing, storage establishment and enhance cancellation logic. With only one week left, my goal is to complete the remaining tasks, improve the system and ensure a seamless handover of my contribution to the team.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Starting the first day of this week, I begin updating the schema required from the last discussion. I reduce the number of objects while adding the respective details user IDs, and I remove unnecessary objects. I also modify the line items for the transfer order by changing the list of transfer DOs and receive items &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.tonghin.com.my\/blog\/2025\/01\/13\/internship-week-12-add-transfer-receive-service-and-update-transfer\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Internship (Week 12): Add Transfer Receive Service and Update Transfer&#8221;<\/span><\/a><\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v15.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Internship (Week 12): Add Transfer Receive Service and Update Transfer<\/title>\n<meta name=\"description\" content=\"Penultimate week of my internship, I focus on refining and extending key features such as transport DO and transport receive logic.\" \/>\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\/2025\/01\/13\/internship-week-12-add-transfer-receive-service-and-update-transfer\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Internship (Week 12): Add Transfer Receive Service and Update Transfer\" \/>\n<meta property=\"og:description\" content=\"Penultimate week of my internship, I focus on refining and extending key features such as transport DO and transport receive logic.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.tonghin.com.my\/blog\/2025\/01\/13\/internship-week-12-add-transfer-receive-service-and-update-transfer\/\" \/>\n<meta property=\"og:site_name\" content=\"Tong Hin&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2025-01-13T05:25:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-01-13T05:25:33+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=\"3 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\/2025\/01\/13\/internship-week-12-add-transfer-receive-service-and-update-transfer\/#webpage\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/2025\/01\/13\/internship-week-12-add-transfer-receive-service-and-update-transfer\/\",\"name\":\"Internship (Week 12): Add Transfer Receive Service and Update Transfer\",\"isPartOf\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#website\"},\"datePublished\":\"2025-01-13T05:25:32+00:00\",\"dateModified\":\"2025-01-13T05:25:33+00:00\",\"description\":\"Penultimate week of my internship, I focus on refining and extending key features such as transport DO and transport receive logic.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2025\/01\/13\/internship-week-12-add-transfer-receive-service-and-update-transfer\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.tonghin.com.my\/blog\/2025\/01\/13\/internship-week-12-add-transfer-receive-service-and-update-transfer\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2025\/01\/13\/internship-week-12-add-transfer-receive-service-and-update-transfer\/#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\/2025\/01\/13\/internship-week-12-add-transfer-receive-service-and-update-transfer\/\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/2025\/01\/13\/internship-week-12-add-transfer-receive-service-and-update-transfer\/\",\"name\":\"Internship (Week 12): Add Transfer Receive Service and Update Transfer\"}}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2025\/01\/13\/internship-week-12-add-transfer-receive-service-and-update-transfer\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2025\/01\/13\/internship-week-12-add-transfer-receive-service-and-update-transfer\/#webpage\"},\"author\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#\/schema\/person\/fb4d75677cd7632e197b8b04dd488c68\"},\"headline\":\"Internship (Week 12): Add Transfer Receive Service and Update Transfer\",\"datePublished\":\"2025-01-13T05:25:32+00:00\",\"dateModified\":\"2025-01-13T05:25:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2025\/01\/13\/internship-week-12-add-transfer-receive-service-and-update-transfer\/#webpage\"},\"publisher\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\"},\"articleSection\":\"Experiential\",\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#\/schema\/person\/fb4d75677cd7632e197b8b04dd488c68\",\"name\":\"Lee Wai Lun\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ddc37519924feb741e1cc09e5393f95c?s=96&d=mm&r=g\",\"caption\":\"Lee Wai Lun\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/1922"}],"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\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/comments?post=1922"}],"version-history":[{"count":11,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/1922\/revisions"}],"predecessor-version":[{"id":1978,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/1922\/revisions\/1978"}],"wp:attachment":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/media?parent=1922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/categories?post=1922"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/tags?post=1922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}