| 1 | <?php |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | class Adjustmentcost_test extends TestCase |
| 12 | { |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | public function __construct() { |
| 18 | parent::__construct(); |
| 19 | $ci = &get_instance(); |
| 20 | $ci->load->helper('validator_helper'); |
| 21 | $this->code = substr(md5(uniqid(mt_rand(), true)), 0, 5); |
| 22 | $_SESSION =array ( |
| 23 | '__ci_last_regenerate' => 1674475513, |
| 24 | 'lang' => 'th', |
| 25 | 'tLangID' => 1, |
| 26 | 'tSesUserLogin' => '009', |
| 27 | 'tSesUsrRoleCodeMulti' => '\'00002\'', |
| 28 | 'nSesUsrRoleLevel' => 99, |
| 29 | 'tSesUsrAgnCode' => NULL, |
| 30 | 'tSesUsrAgnName' => NULL, |
| 31 | 'tSesUsrMerCode' => NULL, |
| 32 | 'tSesUsrMerName' => NULL, |
| 33 | 'tSesUsrBchCodeDefault' => '00001', |
| 34 | 'tSesUsrBchNameDefault' => 'AdaSoft00001', |
| 35 | 'tSesUsrBchCodeMulti' => '\'00001\'', |
| 36 | 'tSesUsrBchNameMulti' => '\'AdaSoft00001\'', |
| 37 | 'nSesUsrBchCount' => 0, |
| 38 | 'tSesUsrShpCodeDefault' => '00014', |
| 39 | 'tSesUsrShpNameDefault' => 'รันไทม์ช็อป', |
| 40 | 'tSesUsrShpCodeMulti' => '\'00014\'', |
| 41 | 'tSesUsrShpNameMulti' => '\'รันไทม์ช็อป\'', |
| 42 | 'nSesUsrShpCount' => 0, |
| 43 | 'tSesUsrWahCode' => '00001', |
| 44 | 'tSesUsrWahName' => 'คลังขาย', |
| 45 | 'tSesUsrLoginLevel' => 'HQ', |
| 46 | 'tSesUsrLoginAgency' => 0, |
| 47 | 'bSesLogIn' => TRUE, |
| 48 | 'tSesUserCode' => '00002', |
| 49 | 'tSesUsername' => '00002', |
| 50 | 'tSesUsrDptName' => NULL, |
| 51 | 'tSesUsrDptCode' => NULL, |
| 52 | 'tSesUsrUsername' => 'Adasoft', |
| 53 | 'tSesUsrImagePerson' => NULL, |
| 54 | 'tSesUsrInfo' => |
| 55 | array ( |
| 56 | 'FTUsrStaActive' => 1, |
| 57 | 'FTUsrLogType' => 1, |
| 58 | 'FTStaError' => 0, |
| 59 | 'FTUsrCode' => '00002', |
| 60 | 'FTUsrName' => 'Adasoft', |
| 61 | 'FTDptCode' => NULL, |
| 62 | 'FTDptName' => NULL, |
| 63 | 'FTImgObj' => NULL, |
| 64 | ), |
| 65 | 'tSesUsrGroup' => |
| 66 | array ( |
| 67 | 0 => |
| 68 | array ( |
| 69 | 'FTUsrCode' => '00002', |
| 70 | 'FTAgnCode' => NULL, |
| 71 | 'FTAgnName' => NULL, |
| 72 | 'FTBchCode' => NULL, |
| 73 | 'FTBchName' => NULL, |
| 74 | 'FTShpCode' => NULL, |
| 75 | 'FTShpName' => NULL, |
| 76 | 'FTMerCode' => NULL, |
| 77 | 'FTMerName' => NULL, |
| 78 | 'FTWahCode' => NULL, |
| 79 | 'FTWahName' => NULL, |
| 80 | 'FTLoginLevel' => 'HQ', |
| 81 | 'FTStaLoginAgn' => 0, |
| 82 | ), |
| 83 | ), |
| 84 | 'tSesSessionID' => '0000220230123185822', |
| 85 | 'tSesSessionDate' => '2023-01-23 18:58:22', |
| 86 | 'tLangEdit' => 1, |
| 87 | 'bIsHaveAgn' => NULL, |
| 88 | 'tSesUsrLevel' => 'HQ', |
| 89 | 'tSesUsrRoleSpcCodeMulti' => '\'00002\',\'00003\',\'00004\',\'00005\',\'00006\',\'00007\',\'00008\',\'00009\',\'00010\',\'00011\',\'00012\',\'00013\',\'00014\',\'00016\',\'00017\',\'00018\',\'00019\',\'00020\',\'00021\',\'00022\',\'00023\',\'00024\',\'00025\',\'00026\',\'00027\',\'00028\',\'00029\',\'00030\',\'00031\',\'00032\',\'00033\',\'00034\',\'00035\',\'00036\',\'00037\',\'00038\'', |
| 90 | 'bShpEnabled' => 1, |
| 91 | 'bAgnEnabled' => 1, |
| 92 | 'bLockerEnabled' => NULL, |
| 93 | 'bPdtFasionEnabled' => NULL, |
| 94 | 'tSesHQBchCode' => '00001', |
| 95 | 'bSesRegStaLicense' => 1, |
| 96 | 'tSesCstKey' => '52a8a4705e6c', |
| 97 | 'bSesRegStaBuyPackage' => 1, |
| 98 | ); |
| 99 | |
| 100 | $_COOKIE['nBrwTopWebCookie_00002'] = 50; |
| 101 | $_COOKIE['nSesTopPdt_00002'] = 50; |
| 102 | } |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | |
| 110 | |
| 111 | |
| 112 | |
| 113 | |
| 114 | |
| 115 | |
| 116 | |
| 117 | |
| 118 | |
| 119 | |
| 120 | |
| 121 | |
| 122 | public function test_ADC_เข้าหน้าแรกต้องสำเร็จ(){ |
| 123 | print " 1.เข้าหน้าแรกต้องสำเร็จ \n"; |
| 124 | $oOutput = $this->request( |
| 125 | 'POST', |
| 126 | 'document/adjustmentcost/cAdjustmentcost/index/0/0' |
| 127 | ); |
| 128 | $this->assertStringContainsString('oetADCStaBrowse', $oOutput); |
| 129 | $this->assertResponseCode(200); |
| 130 | } |
| 131 | |
| 132 | |
| 133 | public function test_ADC_โหลดข้อมูลตัวกรอง(){ |
| 134 | print " 2.โหลดข้อมูลตัวกรอง \n"; |
| 135 | $oOutput = $this->request( |
| 136 | 'POST', |
| 137 | 'document/adjustmentcost/cAdjustmentcost/FSvCADCFormSearchList' |
| 138 | ); |
| 139 | $this->assertStringContainsString('oahADCAdvanceSearch', $oOutput); |
| 140 | $this->assertResponseCode(200); |
| 141 | } |
| 142 | |
| 143 | |
| 144 | |
| 145 | public function test_ADC_โหลดข้อมูลมาแสดงเป็นตารางต้องสำเร็จ(){ |
| 146 | print " 3.โหลดข้อมูลมาแสดงเป็นตารางต้องสำเร็จ \n"; |
| 147 | $aParam = array( |
| 148 | 'oAdvanceSearch' => array( |
| 149 | 'tSearchAll' => '', |
| 150 | 'tSearchBchCodeFrom' => '', |
| 151 | 'tSearchBchCodeTo' => '', |
| 152 | 'tSearchDocDateFrom' => '', |
| 153 | 'tSearchDocDateTo' => '', |
| 154 | 'tSearchStaDoc' => '0', |
| 155 | ), |
| 156 | 'nPageCurrent' => '1', |
| 157 | ); |
| 158 | $oOutput = $this->request( |
| 159 | 'POST', |
| 160 | 'document/adjustmentcost/cAdjustmentcost/FSoCASTDataTable', |
| 161 | $aParam |
| 162 | ); |
| 163 | $this->assertStringContainsString('Success', $oOutput); |
| 164 | $this->assertResponseCode(200); |
| 165 | } |
| 166 | |
| 167 | |
| 168 | |
| 169 | public function test_ADC_โหลดข้อมูลมาแสดงเป็นตารางแบบมีเงื่อนไขหน้า_2_ต้องสำเร็จ(){ |
| 170 | print " 4.โหลดข้อมูลมาแสดงเป็นตารางแบบมีเงื่อนไขหน้า_2_ต้องสำเร็จ \n"; |
| 171 | $aParam = array( |
| 172 | 'oAdvanceSearch' => array( |
| 173 | 'tSearchAll' => '', |
| 174 | 'tSearchBchCodeFrom' => '', |
| 175 | 'tSearchBchCodeTo' => '', |
| 176 | 'tSearchDocDateFrom' => '', |
| 177 | 'tSearchDocDateTo' => '', |
| 178 | 'tSearchStaDoc' => '0', |
| 179 | ), |
| 180 | 'nPageCurrent' => '2', |
| 181 | ); |
| 182 | $oOutput = $this->request( |
| 183 | 'POST', |
| 184 | 'document/adjustmentcost/cAdjustmentcost/FSoCASTDataTable', |
| 185 | $aParam |
| 186 | ); |
| 187 | $this->assertStringContainsString('Success', $oOutput); |
| 188 | $this->assertResponseCode(200); |
| 189 | } |
| 190 | |
| 191 | |
| 192 | |
| 193 | public function test_ADC_โหลดข้อมูลมาแสดงเป็นตารางแบบมีเงื่อนไขหน้า_2_และมีการกรองต้องสำเร็จ(){ |
| 194 | print " 5.โหลดข้อมูลมาแสดงเป็นตารางแบบมีเงื่อนไขหน้า_2_และมีการกรองต้องสำเร็จ \n"; |
| 195 | $aParam = array( |
| 196 | 'oAdvanceSearch' => array( |
| 197 | 'tSearchAll' => 'AC0000123000005', |
| 198 | 'tSearchBchCodeFrom' => '', |
| 199 | 'tSearchBchCodeTo' => '', |
| 200 | 'tSearchDocDateFrom' => '', |
| 201 | 'tSearchDocDateTo' => '', |
| 202 | 'tSearchStaDoc' => '0', |
| 203 | ), |
| 204 | 'nPageCurrent' => '1', |
| 205 | ); |
| 206 | $oOutput = $this->request( |
| 207 | 'POST', |
| 208 | 'document/adjustmentcost/cAdjustmentcost/FSoCASTDataTable', |
| 209 | $aParam |
| 210 | ); |
| 211 | $this->assertStringContainsString('Success', $oOutput); |
| 212 | $this->assertResponseCode(200); |
| 213 | } |
| 214 | |
| 215 | |
| 216 | |
| 217 | |
| 218 | public function test_ADC_เปิดหน้าเพิ่มเอกสารต้องสำเร็จ(){ |
| 219 | print " 6.เปิดหน้าเพิ่มเอกสารต้องสำเร็จ\n"; |
| 220 | |
| 221 | $oOutput = $this->request( |
| 222 | 'POST', |
| 223 | 'document/adjustmentcost/cAdjustmentcost/FSvCADCAddPage', |
| 224 | ); |
| 225 | $this->assertStringContainsString('Success', $oOutput); |
| 226 | $this->assertResponseCode(200); |
| 227 | } |
| 228 | |
| 229 | |
| 230 | |
| 231 | |
| 232 | |
| 233 | public function test_ADC_โหลดข้อมูลรายการสินค้าแสดงเป็นตารางต้องสำเร็จ(){ |
| 234 | print " 7.โหลดข้อมูลรายการสินค้าแสดงเป็นตารางต้องสำเร็จ\n"; |
| 235 | |
| 236 | $oOutput = $this->request( |
| 237 | 'POST', |
| 238 | 'document/adjustmentcost/cAdjustmentcost/FSvCADCAddPage' |
| 239 | ); |
| 240 | $this->assertStringContainsString('<table class=\"table table-striped xCNTablePDTMoreOne\">', $oOutput); |
| 241 | $this->assertResponseCode(200); |
| 242 | |
| 243 | } |
| 244 | |
| 245 | |
| 246 | |
| 247 | |
| 248 | public function test_ADC_เพิ่มข้อมูลสินค้า_1_รายการต้องสำเร็จ(){ |
| 249 | print " 8.เพิ่มข้อมูลสินค้า_1_รายการต้องสำเร็จ\n"; |
| 250 | $ci = &get_instance(); |
| 251 | $ci->load->database(); |
| 252 | |
| 253 | $aParam['aProduct'][0] = array( |
| 254 | 'pnPdtCode' => '00046', |
| 255 | 'ptPunCode' => '00012', |
| 256 | 'ptBarCode' => '0000743202', |
| 257 | 'packData' => array( |
| 258 | 'SHP' => '', |
| 259 | 'BCH' => '', |
| 260 | 'PDTCode' => '00046', |
| 261 | 'PDTName' => 'ข้าวปั้นซีอิ้วขาว', |
| 262 | 'PUNCode' => '00012', |
| 263 | 'Barcode' => '0000743202', |
| 264 | 'PUNName' => 'อัน', |
| 265 | 'IMAGE' => '#92f294', |
| 266 | 'Price' => 0, |
| 267 | 'LOCSEQ' => 0, |
| 268 | 'AlwDis' => 1, |
| 269 | 'AlwVat' => 1, |
| 270 | 'nVat' => 7.0000, |
| 271 | 'NetAfHD' => 0, |
| 272 | 'PDTSpc' => '-' |
| 273 | ) |
| 274 | ); |
| 275 | $oOutput = $this->request( |
| 276 | 'POST', |
| 277 | 'document/adjustmentcost/cAdjustmentcost/FSoCADCGetPdtFromPdtCode', |
| 278 | $aParam |
| 279 | ); |
| 280 | $this->assertStringContainsString('success', $oOutput); |
| 281 | $this->assertResponseCode(200); |
| 282 | |
| 283 | |
| 284 | } |
| 285 | |
| 286 | |
| 287 | |
| 288 | |
| 289 | |
| 290 | public function test_ADC_เพิ่มข้อมูลสินค้า_2_รายการต้องสำเร็จ(){ |
| 291 | print " 9.เพิ่มข้อมูลสินค้า_2_รายการต้องสำเร็จ\n"; |
| 292 | $ci = &get_instance(); |
| 293 | $ci->load->database(); |
| 294 | |
| 295 | |
| 296 | |
| 297 | $aParam['aProduct'][0] = array( |
| 298 | 'pnPdtCode' => '00046', |
| 299 | 'ptPunCode' => '00012', |
| 300 | 'ptBarCode' => '0000743202', |
| 301 | 'packData' => array( |
| 302 | 'SHP' => '', |
| 303 | 'BCH' => '', |
| 304 | 'PDTCode' => '00046', |
| 305 | 'PDTName' => 'ข้าวปั้นซีอิ้วขาว', |
| 306 | 'PUNCode' => '00012', |
| 307 | 'Barcode' => '0000743202', |
| 308 | 'PUNName' => 'อัน', |
| 309 | 'IMAGE' => '#92f294', |
| 310 | 'Price' => 0, |
| 311 | 'LOCSEQ' => 0, |
| 312 | 'AlwDis' => 1, |
| 313 | 'AlwVat' => 1, |
| 314 | 'nVat' => 7.0000, |
| 315 | 'NetAfHD' => 0, |
| 316 | 'PDTSpc' => '-' |
| 317 | ) |
| 318 | ); |
| 319 | |
| 320 | $aParam['aProduct'][1] = array( |
| 321 | 'pnPdtCode' => '00046', |
| 322 | 'ptPunCode' => '00012', |
| 323 | 'ptBarCode' => '0000743202', |
| 324 | 'packData' => array( |
| 325 | 'SHP' => '', |
| 326 | 'BCH' => '', |
| 327 | 'PDTCode' => '00046', |
| 328 | 'PDTName' => 'ข้าวปั้นซีอิ้วขาว', |
| 329 | 'PUNCode' => '00012', |
| 330 | 'Barcode' => '0000743202', |
| 331 | 'PUNName' => 'อัน', |
| 332 | 'IMAGE' => '#92f294', |
| 333 | 'Price' => 0, |
| 334 | 'LOCSEQ' => 0, |
| 335 | 'AlwDis' => 1, |
| 336 | 'AlwVat' => 1, |
| 337 | 'nVat' => 7.0000, |
| 338 | 'NetAfHD' => 0, |
| 339 | 'PDTSpc' => '-' |
| 340 | ) |
| 341 | ); |
| 342 | $oOutput = $this->request( |
| 343 | 'POST', |
| 344 | 'document/adjustmentcost/cAdjustmentcost/FSoCADCGetPdtFromPdtCode', |
| 345 | $aParam |
| 346 | ); |
| 347 | $this->assertStringContainsString('success', $oOutput); |
| 348 | $this->assertResponseCode(200); |
| 349 | |
| 350 | } |
| 351 | |
| 352 | |
| 353 | |
| 354 | |
| 355 | |
| 356 | |
| 357 | |
| 358 | public function test_ADC_บันทึกเอกสาร_กำหนดเงื่อนไขครบถ้วน(){ |
| 359 | print " 10.บันทึกเอกสารกำหนดเงื่อนไขครบถ้วน\n"; |
| 360 | $tSesSessionID = $_SESSION['tSesSessionID']; |
| 361 | $ci = &get_instance(); |
| 362 | $ci->load->database(); |
| 363 | |
| 364 | |
| 365 | $aParam = array( |
| 366 | 'ohdADCDocNo' => '', |
| 367 | 'ohdADCBchCode' => '00001', |
| 368 | 'oetADCDocDate' => '2023-03-29', |
| 369 | 'oetADCDocTime' => '21:51:00', |
| 370 | 'oetADCEffectiveDate' => '2023-03-29', |
| 371 | 'oetADCRefInt' => '', |
| 372 | 'oetADCRefIntDate' => '', |
| 373 | 'otaADCRmk' => '', |
| 374 | 'ocmADCDocType' => '12', |
| 375 | 'aDataInsert' => array( |
| 376 | array('1','00045','กาแฟแก้ว 22','8851907115272','0.00','10.00','10.00','1','00011','1.0000') |
| 377 | ), |
| 378 | ); |
| 379 | |
| 380 | |
| 381 | $oOutput = $this->request( |
| 382 | 'POST', |
| 383 | 'document/adjustmentcost/cAdjustmentcost/FSoCADCEventAdd', |
| 384 | $aParam |
| 385 | ); |
| 386 | $this->assertStringContainsString('success', $oOutput); |
| 387 | $this->assertResponseCode(200); |
| 388 | |
| 389 | } |
| 390 | |
| 391 | |
| 392 | public function test_ADC_บันทึกเอกสาร_กำหนดบางเงื่อนไข(){ |
| 393 | print " 11.test_ADC_บันทึกเอกสาร_กำหนดบางเงื่อนไข\n"; |
| 394 | $tSesSessionID = $_SESSION['tSesSessionID']; |
| 395 | $ci = &get_instance(); |
| 396 | $ci->load->database(); |
| 397 | |
| 398 | |
| 399 | $aParam = array( |
| 400 | 'ohdADCDocNo' => '', |
| 401 | 'ohdADCBchCode' => '00001', |
| 402 | 'oetADCDocDate' => '2023-03-29', |
| 403 | 'oetADCDocTime' => '21:51:00', |
| 404 | 'oetADCEffectiveDate' => '2023-03-29', |
| 405 | 'oetADCRefInt' => '', |
| 406 | 'oetADCRefIntDate' => '', |
| 407 | 'otaADCRmk' => 'ทดสอบ', |
| 408 | 'ocmADCDocType' => '12', |
| 409 | 'aDataInsert' => array( |
| 410 | array('1','00045','กาแฟแก้ว 22','8851907115272','0.00','10.00','10.00','1','00011','1.0000') |
| 411 | ), |
| 412 | ); |
| 413 | |
| 414 | $oOutput = $this->request( |
| 415 | 'POST', |
| 416 | 'document/adjustmentcost/cAdjustmentcost/FSoCADCEventAdd', |
| 417 | $aParam |
| 418 | ); |
| 419 | $this->assertStringContainsString('success', $oOutput); |
| 420 | $this->assertResponseCode(200); |
| 421 | |
| 422 | } |
| 423 | |
| 424 | |
| 425 | |
| 426 | |
| 427 | |
| 428 | |
| 429 | public function test_ADC_โหลดข้อมูลหน้าจอแก้ไขเอกสาร(){ |
| 430 | print " 12.โหลดข้อมูลหน้าจอแก้ไขเอกสาร\n"; |
| 431 | $tSesSessionID = $_SESSION['tSesSessionID']; |
| 432 | $ci = &get_instance(); |
| 433 | $ci->load->database(); |
| 434 | |
| 435 | |
| 436 | $aParam = array( |
| 437 | 'ptXchDocNo' => 'AC0000123000007', |
| 438 | 'pnTypeAdc' => '12', |
| 439 | ); |
| 440 | |
| 441 | |
| 442 | $oOutput = $this->request( |
| 443 | 'POST', |
| 444 | 'document/adjustmentcost/cAdjustmentcost/FSvCADCEditPage', |
| 445 | $aParam |
| 446 | ); |
| 447 | $this->assertStringContainsString('Success', $oOutput); |
| 448 | $this->assertResponseCode(200); |
| 449 | |
| 450 | } |
| 451 | |
| 452 | |
| 453 | |
| 454 | |
| 455 | public function test_ADC_ยกเลิกเอกสาร(){ |
| 456 | print " 13.ยกเลิกเอกสาร\n"; |
| 457 | $tSesSessionID = $_SESSION['tSesSessionID']; |
| 458 | $ci = &get_instance(); |
| 459 | $ci->load->database(); |
| 460 | |
| 461 | |
| 462 | $aParam = array( |
| 463 | 'tXchDocNo' => 'AC0000123000007' |
| 464 | ); |
| 465 | |
| 466 | |
| 467 | $oOutput = $this->request( |
| 468 | 'POST', |
| 469 | 'document/adjustmentcost/cAdjustmentcost/FSoCADCCancel', |
| 470 | $aParam |
| 471 | ); |
| 472 | $this->assertStringContainsString('Cancel done', $oOutput); |
| 473 | $this->assertResponseCode(200); |
| 474 | |
| 475 | } |
| 476 | |
| 477 | |
| 478 | |
| 479 | public function test_ADC_อนุมัติเอกสาร(){ |
| 480 | print " 14.อนุมัติเอกสาร\n"; |
| 481 | $tSesSessionID = $_SESSION['tSesSessionID']; |
| 482 | $ci = &get_instance(); |
| 483 | $ci->load->database(); |
| 484 | |
| 485 | |
| 486 | $aParam = array( |
| 487 | 'ptADCDocNo' => 'AC0000123000008', |
| 488 | 'ptADCBchCode' => '00001', |
| 489 | 'ptADCStaApv' => '', |
| 490 | ); |
| 491 | |
| 492 | $oOutput = $this->request( |
| 493 | 'POST', |
| 494 | 'document/adjustmentcost/cAdjustmentcost/FSvCADCApproveDocument', |
| 495 | $aParam |
| 496 | ); |
| 497 | $this->assertResponseCode(200); |
| 498 | |
| 499 | } |
| 500 | |
| 501 | |
| 502 | |
| 503 | |
| 504 | public function test_ADC_ลบเอกสาร_1_รายการ(){ |
| 505 | print " 15.ลบเอกสาร_1_รายการ\n"; |
| 506 | $tSesSessionID = $_SESSION['tSesSessionID']; |
| 507 | $ci = &get_instance(); |
| 508 | $ci->load->database(); |
| 509 | |
| 510 | |
| 511 | $aParam = array( |
| 512 | 'tADCDocNo' => 'AC0000123000009', |
| 513 | ); |
| 514 | |
| 515 | |
| 516 | $oOutput = $this->request( |
| 517 | 'POST', |
| 518 | 'document/adjustmentcost/cAdjustmentcost/FSoCADCDeleteEventDoc', |
| 519 | $aParam |
| 520 | ); |
| 521 | $this->assertStringContainsString('Success', $oOutput); |
| 522 | $this->assertResponseCode(200); |
| 523 | |
| 524 | } |
| 525 | |
| 526 | |
| 527 | public function test_ADC_ลบเอกสาร_2_รายการ(){ |
| 528 | print " 16.ลบเอกสาร_2_รายการ\n"; |
| 529 | $tSesSessionID = $_SESSION['tSesSessionID']; |
| 530 | $ci = &get_instance(); |
| 531 | $ci->load->database(); |
| 532 | |
| 533 | |
| 534 | $aParam = array( |
| 535 | 'tADCDocNo' => array( |
| 536 | '' => 'AC0000123000006', |
| 537 | '' => 'AC0000123000005 ', |
| 538 | ), |
| 539 | ); |
| 540 | |
| 541 | $oOutput = $this->request( |
| 542 | 'POST', |
| 543 | 'document/adjustmentcost/cAdjustmentcost/FSoCADCDeleteEventDoc', |
| 544 | $aParam |
| 545 | ); |
| 546 | $this->assertStringContainsString('Success', $oOutput); |
| 547 | $this->assertResponseCode(200); |
| 548 | |
| 549 | } |
| 550 | |
| 551 | |
| 552 | public function test_ADC_นำเข้าสินค้าผ่านการอ้างอิงเอกสารใบรับของ(){ |
| 553 | print " 17.ADC_นำเข้าสินค้าผ่านการอ้างอิงเอกสารใบรับของ\n"; |
| 554 | $tSesSessionID = $_SESSION['tSesSessionID']; |
| 555 | $ci = &get_instance(); |
| 556 | $ci->load->database(); |
| 557 | |
| 558 | $aParam = array( |
| 559 | 'tTable' => 'TAPTPiDT', |
| 560 | 'tDocNo' => 'PS000012300002', |
| 561 | 'tPdtCodeDup' => '', |
| 562 | ); |
| 563 | |
| 564 | $oOutput = $this->request( |
| 565 | 'POST', |
| 566 | 'document/adjustmentcost/cAdjustmentcost/FSoCADCGetPdtFromDoc', |
| 567 | $aParam |
| 568 | ); |
| 569 | $this->assertStringContainsString('success', $oOutput); |
| 570 | $this->assertResponseCode(200); |
| 571 | |
| 572 | } |
| 573 | |
| 574 | |
| 575 | public function test_ADC_นำเข้าสินค้าผ่านการอ้างอิงเอกสารใบรับเข้า(){ |
| 576 | print " 18.ADC_นำเข้าสินค้าผ่านการอ้างอิงเอกสารใบรับเข้า\n"; |
| 577 | $tSesSessionID = $_SESSION['tSesSessionID']; |
| 578 | $ci = &get_instance(); |
| 579 | $ci->load->database(); |
| 580 | |
| 581 | $aParam = array( |
| 582 | 'tTable' => 'TCNTPdtTwiDT', |
| 583 | 'tDocNo' => 'WI0000123000009', |
| 584 | 'tPdtCodeDup' => '', |
| 585 | ); |
| 586 | |
| 587 | $oOutput = $this->request( |
| 588 | 'POST', |
| 589 | 'document/adjustmentcost/cAdjustmentcost/FSoCADCGetPdtFromDoc', |
| 590 | $aParam |
| 591 | ); |
| 592 | $this->assertStringContainsString('success', $oOutput); |
| 593 | $this->assertResponseCode(200); |
| 594 | |
| 595 | } |
| 596 | |
| 597 | } |