{"action":"created","comment":{"url":"https://api.github.com/repos/danliris/bateeq-module/pulls/comments/215580988","pull_request_review_id":152873787,"id":215580988,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTU4MDk4OA==","diff_hunk":"@@ -0,0 +1,166 @@\n+require(\"should\");\n+var helper = require(\"../../../helper\");\n+\n+var unitPaymentQuantityCorrectionNoteDataUtil = require(\"../../../data-util/purchasing/unit-payment-quantity-correction-note-data-util\");\n+var UnitPaymentQuantityCorrectionNoteManager = require(\"../../../../src/managers/purchasing/unit-payment-quantity-correction-note-manager\");\n+var unitPaymentQuantityCorrectionNoteManager = null;\n+\n+before('#00. connect db', function (done) {\n+    helper.getDb()\n+        .then((db) => {\n+            unitPaymentQuantityCorrectionNoteManager = new UnitPaymentQuantityCorrectionNoteManager(db, {\n+                username: 'unit-test'\n+            });\n+            done();\n+        })\n+        .catch(e => {\n+            done(e);\n+        });\n+});\n+\n+it('#01. should error when create with empty data ', function(done) {\n+    unitPaymentQuantityCorrectionNoteManager.create({})\n+        .then((id) => {\n+            done(\"should error when create with empty data\");\n+        })\n+        .catch(e => {\n+            try {\n+                done();\n+            }\n+            catch (ex) {\n+                done(ex);\n+            }\n+        });\n+});\n+\n+it('#02. should success when create new unit-payment-quantity-correction-note', function (done) {\n+    unitPaymentQuantityCorrectionNoteDataUtil.getNewTestDataInsertTwice()\n+        .then((data) => {\n+            data._id.should.be.Object();\n+            createdId = data._id;\n+            done();\n+        })\n+        .catch(e => {\n+            done(e);\n+        });\n+});\n+\n+\n+it('#03. should success when get pdf ', function(done) {\n+    unitPaymentQuantityCorrectionNoteManager.pdf(createdId)\n+        .then((binary) => {\n+            done();\n+        })\n+        .catch(e => {\n+            try {\n+                done();\n+            }\n+            catch (ex) {\n+                done(ex);\n+            }\n+        });\n+});\n+\n+it(\"#04. should success when get report with date parameter\", function(done) {\n+    unitPaymentQuantityCorrectionNoteManager.getMonitoringKoreksi({\"dateForm\" : \"2017-02-01\", \"dateTo\" : \"2017-02-01\"})\n+        .then((result) => {\n+            result.should.instanceof(Array);\n+            done();\n+        })\n+        .catch((e) => {\n+            done(e);\n+        });\n+});\n+\n+ var resultForExcelTest = {};\n+it('#05. should success when get data with Start Date', function (done) {\n+    var query = {};\n+    query.dateFrom = \"2017-02-01\";\n+    query.dateTo = \"2017-02-01\";\n+\n+    unitPaymentQuantityCorrectionNoteManager.getMonitoringKoreksi(query)\n+        .then(result => {\n+            var po = result;\n+            resultForExcelTest.data = [{\n+            \"date\" : new Date(),\n+            \"no\":\"A221\",\n+            \"unitPaymentOrder.no\":\"AAA\",\n+            items:\n+               { \n+                   quantity : 3,\n+                   pricePerUnit : 1000,\n+                   priceTotal :3000,\n+                   purchaseOrder :\n+                    {\n+                        purchaseOrderExternal : { no :\"BBB\"},\n+                        purchaseRequest : {  no :\"aaaa\"},\n+                        unit:{\n+                            name :\"ccc\"\n+\n+                        },\n+                    },\n+                    product: {\n+                        code : \"sss\",\n+                        name :\"sdsd\",\n+\n+                    },\n+                    currency: {\n+                        code : \"sss\",\n+                    },\n+                    uom :\n+                    {unit : \"MTR\"},\n+                    \n+               }\n+                ,\n+                unitPaymentOrder : \n+                {\n+                    category : {\n+                        name : \"ddd\"\n+                    },\n+                    supplier : {\n+                        name : \"aaa\",\n+                        code : \"ccc\"\n+                    }\n+                },\n+            \n+            \"returNoteNo\":\"ccc\",\n+            \"incomeTaxCorrectionNo\":\"ccc\",\n+            \"incomeTaxCorrectionDate\": new Date(),\n+            \"Jumlah\":100,\n+            \"HARGA\":2000,\n+            \"TOTAL\":2000,\n+            \"useIncomeTax\":true,\n+            \"_createdBy\":\"AAA\"\n+        }];\n+            po.should.instanceof(Array);\n+            done();\n+        }).catch(e => {\n+            done(e);\n+        });\n+});\n+\n+it('#06. should success when get data for Excel Report', function (done) {\n+    var query = {};\n+    query.dateFrom = \"2017-02-01\";\n+    query.dateTo = \"2017-02-01\";\n+\n+    unitPaymentQuantityCorrectionNoteManager.getXls(resultForExcelTest, query)\n+        .then(xlsData => {             \n+            xlsData.should.have.property('data');\n+            xlsData.should.have.property('options');\n+            xlsData.should.have.property('name');\n+            done();\n+        }).catch(e => {","path":"test/managers/purchasing/quantity-correction/create.js","position":153,"original_position":153,"commit_id":"7b242e3baa4c2781c741cd24c647db67c862567d","original_commit_id":"7b242e3baa4c2781c741cd24c647db67c862567d","user":{"login":"houndci-bot","id":6697940,"node_id":"MDQ6VXNlcjY2OTc5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').","created_at":"2018-09-06T10:49:10Z","updated_at":"2018-09-06T10:49:12Z","html_url":"https://github.com/danliris/bateeq-module/pull/597#discussion_r215580988","pull_request_url":"https://api.github.com/repos/danliris/bateeq-module/pulls/597","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/danliris/bateeq-module/pulls/comments/215580988"},"html":{"href":"https://github.com/danliris/bateeq-module/pull/597#discussion_r215580988"},"pull_request":{"href":"https://api.github.com/repos/danliris/bateeq-module/pulls/597"}}},"pull_request":{"url":"https://api.github.com/repos/danliris/bateeq-module/pulls/597","id":213574633,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzNTc0NjMz","html_url":"https://github.com/danliris/bateeq-module/pull/597","diff_url":"https://github.com/danliris/bateeq-module/pull/597.diff","patch_url":"https://github.com/danliris/bateeq-module/pull/597.patch","issue_url":"https://api.github.com/repos/danliris/bateeq-module/issues/597","number":597,"state":"open","locked":false,"title":"Pembelian Umum : koreksi harga dan koreksi jumlah","user":{"login":"novalinahtb","id":38346495,"node_id":"MDQ6VXNlcjM4MzQ2NDk1","avatar_url":"https://avatars2.githubusercontent.com/u/38346495?v=4","gravatar_id":"","url":"https://api.github.com/users/novalinahtb","html_url":"https://github.com/novalinahtb","followers_url":"https://api.github.com/users/novalinahtb/followers","following_url":"https://api.github.com/users/novalinahtb/following{/other_user}","gists_url":"https://api.github.com/users/novalinahtb/gists{/gist_id}","starred_url":"https://api.github.com/users/novalinahtb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novalinahtb/subscriptions","organizations_url":"https://api.github.com/users/novalinahtb/orgs","repos_url":"https://api.github.com/users/novalinahtb/repos","events_url":"https://api.github.com/users/novalinahtb/events{/privacy}","received_events_url":"https://api.github.com/users/novalinahtb/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-09-06T10:48:56Z","updated_at":"2018-09-06T10:49:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b1f9bd85173530afe33185743e7772cfaa9c2f97","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/danliris/bateeq-module/pulls/597/commits","review_comments_url":"https://api.github.com/repos/danliris/bateeq-module/pulls/597/comments","review_comment_url":"https://api.github.com/repos/danliris/bateeq-module/pulls/comments{/number}","comments_url":"https://api.github.com/repos/danliris/bateeq-module/issues/597/comments","statuses_url":"https://api.github.com/repos/danliris/bateeq-module/statuses/7b242e3baa4c2781c741cd24c647db67c862567d","head":{"label":"danliris:uat","ref":"uat","sha":"7b242e3baa4c2781c741cd24c647db67c862567d","user":{"login":"danliris","id":20855729,"node_id":"MDQ6VXNlcjIwODU1NzI5","avatar_url":"https://avatars0.githubusercontent.com/u/20855729?v=4","gravatar_id":"","url":"https://api.github.com/users/danliris","html_url":"https://github.com/danliris","followers_url":"https://api.github.com/users/danliris/followers","following_url":"https://api.github.com/users/danliris/following{/other_user}","gists_url":"https://api.github.com/users/danliris/gists{/gist_id}","starred_url":"https://api.github.com/users/danliris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danliris/subscriptions","organizations_url":"https://api.github.com/users/danliris/orgs","repos_url":"https://api.github.com/users/danliris/repos","events_url":"https://api.github.com/users/danliris/events{/privacy}","received_events_url":"https://api.github.com/users/danliris/received_events","type":"User","site_admin":false},"repo":{"id":61858352,"node_id":"MDEwOlJlcG9zaXRvcnk2MTg1ODM1Mg==","name":"bateeq-module","full_name":"danliris/bateeq-module","owner":{"login":"danliris","id":20855729,"node_id":"MDQ6VXNlcjIwODU1NzI5","avatar_url":"https://avatars0.githubusercontent.com/u/20855729?v=4","gravatar_id":"","url":"https://api.github.com/users/danliris","html_url":"https://github.com/danliris","followers_url":"https://api.github.com/users/danliris/followers","following_url":"https://api.github.com/users/danliris/following{/other_user}","gists_url":"https://api.github.com/users/danliris/gists{/gist_id}","starred_url":"https://api.github.com/users/danliris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danliris/subscriptions","organizations_url":"https://api.github.com/users/danliris/orgs","repos_url":"https://api.github.com/users/danliris/repos","events_url":"https://api.github.com/users/danliris/events{/privacy}","received_events_url":"https://api.github.com/users/danliris/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danliris/bateeq-module","description":"bateeq module","fork":false,"url":"https://api.github.com/repos/danliris/bateeq-module","forks_url":"https://api.github.com/repos/danliris/bateeq-module/forks","keys_url":"https://api.github.com/repos/danliris/bateeq-module/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danliris/bateeq-module/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danliris/bateeq-module/teams","hooks_url":"https://api.github.com/repos/danliris/bateeq-module/hooks","issue_events_url":"https://api.github.com/repos/danliris/bateeq-module/issues/events{/number}","events_url":"https://api.github.com/repos/danliris/bateeq-module/events","assignees_url":"https://api.github.com/repos/danliris/bateeq-module/assignees{/user}","branches_url":"https://api.github.com/repos/danliris/bateeq-module/branches{/branch}","tags_url":"https://api.github.com/repos/danliris/bateeq-module/tags","blobs_url":"https://api.github.com/repos/danliris/bateeq-module/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danliris/bateeq-module/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danliris/bateeq-module/git/refs{/sha}","trees_url":"https://api.github.com/repos/danliris/bateeq-module/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danliris/bateeq-module/statuses/{sha}","languages_url":"https://api.github.com/repos/danliris/bateeq-module/languages","stargazers_url":"https://api.github.com/repos/danliris/bateeq-module/stargazers","contributors_url":"https://api.github.com/repos/danliris/bateeq-module/contributors","subscribers_url":"https://api.github.com/repos/danliris/bateeq-module/subscribers","subscription_url":"https://api.github.com/repos/danliris/bateeq-module/subscription","commits_url":"https://api.github.com/repos/danliris/bateeq-module/commits{/sha}","git_commits_url":"https://api.github.com/repos/danliris/bateeq-module/git/commits{/sha}","comments_url":"https://api.github.com/repos/danliris/bateeq-module/comments{/number}","issue_comment_url":"https://api.github.com/repos/danliris/bateeq-module/issues/comments{/number}","contents_url":"https://api.github.com/repos/danliris/bateeq-module/contents/{+path}","compare_url":"https://api.github.com/repos/danliris/bateeq-module/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danliris/bateeq-module/merges","archive_url":"https://api.github.com/repos/danliris/bateeq-module/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danliris/bateeq-module/downloads","issues_url":"https://api.github.com/repos/danliris/bateeq-module/issues{/number}","pulls_url":"https://api.github.com/repos/danliris/bateeq-module/pulls{/number}","milestones_url":"https://api.github.com/repos/danliris/bateeq-module/milestones{/number}","notifications_url":"https://api.github.com/repos/danliris/bateeq-module/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danliris/bateeq-module/labels{/name}","releases_url":"https://api.github.com/repos/danliris/bateeq-module/releases{/id}","deployments_url":"https://api.github.com/repos/danliris/bateeq-module/deployments","created_at":"2016-06-24T05:10:07Z","updated_at":"2018-08-08T16:13:18Z","pushed_at":"2018-09-06T10:48:56Z","git_url":"git://github.com/danliris/bateeq-module.git","ssh_url":"git@github.com:danliris/bateeq-module.git","clone_url":"https://github.com/danliris/bateeq-module.git","svn_url":"https://github.com/danliris/bateeq-module","homepage":null,"size":1784,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":15,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"danliris:master","ref":"master","sha":"3de8b53deb6c346909c8e01604a885584634e5f2","user":{"login":"danliris","id":20855729,"node_id":"MDQ6VXNlcjIwODU1NzI5","avatar_url":"https://avatars0.githubusercontent.com/u/20855729?v=4","gravatar_id":"","url":"https://api.github.com/users/danliris","html_url":"https://github.com/danliris","followers_url":"https://api.github.com/users/danliris/followers","following_url":"https://api.github.com/users/danliris/following{/other_user}","gists_url":"https://api.github.com/users/danliris/gists{/gist_id}","starred_url":"https://api.github.com/users/danliris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danliris/subscriptions","organizations_url":"https://api.github.com/users/danliris/orgs","repos_url":"https://api.github.com/users/danliris/repos","events_url":"https://api.github.com/users/danliris/events{/privacy}","received_events_url":"https://api.github.com/users/danliris/received_events","type":"User","site_admin":false},"repo":{"id":61858352,"node_id":"MDEwOlJlcG9zaXRvcnk2MTg1ODM1Mg==","name":"bateeq-module","full_name":"danliris/bateeq-module","owner":{"login":"danliris","id":20855729,"node_id":"MDQ6VXNlcjIwODU1NzI5","avatar_url":"https://avatars0.githubusercontent.com/u/20855729?v=4","gravatar_id":"","url":"https://api.github.com/users/danliris","html_url":"https://github.com/danliris","followers_url":"https://api.github.com/users/danliris/followers","following_url":"https://api.github.com/users/danliris/following{/other_user}","gists_url":"https://api.github.com/users/danliris/gists{/gist_id}","starred_url":"https://api.github.com/users/danliris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danliris/subscriptions","organizations_url":"https://api.github.com/users/danliris/orgs","repos_url":"https://api.github.com/users/danliris/repos","events_url":"https://api.github.com/users/danliris/events{/privacy}","received_events_url":"https://api.github.com/users/danliris/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danliris/bateeq-module","description":"bateeq module","fork":false,"url":"https://api.github.com/repos/danliris/bateeq-module","forks_url":"https://api.github.com/repos/danliris/bateeq-module/forks","keys_url":"https://api.github.com/repos/danliris/bateeq-module/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danliris/bateeq-module/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danliris/bateeq-module/teams","hooks_url":"https://api.github.com/repos/danliris/bateeq-module/hooks","issue_events_url":"https://api.github.com/repos/danliris/bateeq-module/issues/events{/number}","events_url":"https://api.github.com/repos/danliris/bateeq-module/events","assignees_url":"https://api.github.com/repos/danliris/bateeq-module/assignees{/user}","branches_url":"https://api.github.com/repos/danliris/bateeq-module/branches{/branch}","tags_url":"https://api.github.com/repos/danliris/bateeq-module/tags","blobs_url":"https://api.github.com/repos/danliris/bateeq-module/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danliris/bateeq-module/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danliris/bateeq-module/git/refs{/sha}","trees_url":"https://api.github.com/repos/danliris/bateeq-module/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danliris/bateeq-module/statuses/{sha}","languages_url":"https://api.github.com/repos/danliris/bateeq-module/languages","stargazers_url":"https://api.github.com/repos/danliris/bateeq-module/stargazers","contributors_url":"https://api.github.com/repos/danliris/bateeq-module/contributors","subscribers_url":"https://api.github.com/repos/danliris/bateeq-module/subscribers","subscription_url":"https://api.github.com/repos/danliris/bateeq-module/subscription","commits_url":"https://api.github.com/repos/danliris/bateeq-module/commits{/sha}","git_commits_url":"https://api.github.com/repos/danliris/bateeq-module/git/commits{/sha}","comments_url":"https://api.github.com/repos/danliris/bateeq-module/comments{/number}","issue_comment_url":"https://api.github.com/repos/danliris/bateeq-module/issues/comments{/number}","contents_url":"https://api.github.com/repos/danliris/bateeq-module/contents/{+path}","compare_url":"https://api.github.com/repos/danliris/bateeq-module/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danliris/bateeq-module/merges","archive_url":"https://api.github.com/repos/danliris/bateeq-module/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danliris/bateeq-module/downloads","issues_url":"https://api.github.com/repos/danliris/bateeq-module/issues{/number}","pulls_url":"https://api.github.com/repos/danliris/bateeq-module/pulls{/number}","milestones_url":"https://api.github.com/repos/danliris/bateeq-module/milestones{/number}","notifications_url":"https://api.github.com/repos/danliris/bateeq-module/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danliris/bateeq-module/labels{/name}","releases_url":"https://api.github.com/repos/danliris/bateeq-module/releases{/id}","deployments_url":"https://api.github.com/repos/danliris/bateeq-module/deployments","created_at":"2016-06-24T05:10:07Z","updated_at":"2018-08-08T16:13:18Z","pushed_at":"2018-09-06T10:48:56Z","git_url":"git://github.com/danliris/bateeq-module.git","ssh_url":"git@github.com:danliris/bateeq-module.git","clone_url":"https://github.com/danliris/bateeq-module.git","svn_url":"https://github.com/danliris/bateeq-module","homepage":null,"size":1784,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":15,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/danliris/bateeq-module/pulls/597"},"html":{"href":"https://github.com/danliris/bateeq-module/pull/597"},"issue":{"href":"https://api.github.com/repos/danliris/bateeq-module/issues/597"},"comments":{"href":"https://api.github.com/repos/danliris/bateeq-module/issues/597/comments"},"review_comments":{"href":"https://api.github.com/repos/danliris/bateeq-module/pulls/597/comments"},"review_comment":{"href":"https://api.github.com/repos/danliris/bateeq-module/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/danliris/bateeq-module/pulls/597/commits"},"statuses":{"href":"https://api.github.com/repos/danliris/bateeq-module/statuses/7b242e3baa4c2781c741cd24c647db67c862567d"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"houndci-bot"}}