|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
|
|
4
|
|
|
namespace Page\Admin; |
|
5
|
|
|
|
|
6
|
|
|
|
|
7
|
|
|
class TaxManagePage extends AbstractAdminPageStyleGuide |
|
8
|
|
|
{ |
|
9
|
|
|
public static $登録完了メッセージ = '.c-container .c-contentsArea .alert-success'; |
|
10
|
|
|
|
|
11
|
|
|
public function __construct(\AcceptanceTester $I) |
|
12
|
|
|
{ |
|
13
|
|
|
parent::__construct($I); |
|
14
|
|
|
} |
|
15
|
|
|
|
|
16
|
|
|
public static function go($I) |
|
17
|
|
|
{ |
|
18
|
|
|
$page = new self($I); |
|
19
|
|
|
return $page->goPage('/setting/shop/tax', '税率設定基本情報設定'); |
|
20
|
|
|
} |
|
21
|
|
|
|
|
22
|
|
|
public function 入力_消費税率($row, $value) { |
|
23
|
|
|
$this->tester->fillField(['css' => 'table tbody tr:nth-child('.$row.') input[type=number]'], $value); |
|
24
|
|
|
return $this; |
|
25
|
|
|
} |
|
26
|
|
|
|
|
27
|
|
|
public function 入力_適用日($value) { |
|
28
|
|
|
$this->tester->executeJS("document.getElementById('tax_rule_apply_date_date').value = '{$value}'"); |
|
29
|
|
|
return $this; |
|
30
|
|
|
} |
|
31
|
|
|
|
|
32
|
|
|
public function 入力_適用時($value) { |
|
33
|
|
|
$this->tester->executeJS("document.getElementById('tax_rule_apply_date_time').value = '{$value}'"); |
|
34
|
|
|
return $this; |
|
35
|
|
|
} |
|
36
|
|
|
|
|
37
|
|
|
public function 入力_個別税率設定($row, $value) { |
|
38
|
|
|
$this->tester->checkOption(['css' => 'table tbody tr:nth-child('.$row.') select:nth-child(1)'], $value); |
|
39
|
|
|
return $this; |
|
40
|
|
|
} |
|
41
|
|
|
|
|
42
|
|
|
public function 個別税率設定_登録() |
|
43
|
|
|
{ |
|
44
|
|
|
$this->tester->click('#form1 div div div:nth-child(2) button'); |
|
45
|
|
|
return $this; |
|
46
|
|
|
} |
|
47
|
|
|
|
|
48
|
|
|
public function 一覧_編集($rowNum) |
|
49
|
|
|
{ |
|
50
|
|
|
$this->tester->click("table tbody tr:nth-child(${rowNum}) .edit-button"); |
|
51
|
|
|
return $this; |
|
52
|
|
|
} |
|
53
|
|
|
|
|
54
|
|
|
public function 一覧_削除($rowNum) |
|
55
|
|
|
{ |
|
56
|
|
|
$this->tester->click("table tbody tr:nth-child(${rowNum}) > td.align-middle.action > div > div div:nth-child(2) > a"); |
|
57
|
|
|
$this->tester->acceptPopup(); |
|
58
|
|
|
return $this; |
|
59
|
|
|
} |
|
60
|
|
|
|
|
61
|
|
|
public function 一覧_税率($rowNum) |
|
62
|
|
|
{ |
|
63
|
|
|
return "table > tbody > tr:nth-child(${rowNum}) > td.align-middle.text-right .list"; |
|
64
|
|
|
} |
|
65
|
|
|
|
|
66
|
|
|
public function 共通税率設定_登録() |
|
67
|
|
|
{ |
|
68
|
|
|
$this->tester->click('table tbody tr:nth-child(1) button'); |
|
69
|
|
|
return; |
|
70
|
|
|
} |
|
71
|
|
|
|
|
72
|
|
|
public function 決定($row) |
|
73
|
|
|
{ |
|
74
|
|
|
$this->tester->click('table tbody tr:nth-child('.$row.') > td > div.edit > button.btn.btn-ec-conversion'); |
|
75
|
|
|
return; |
|
76
|
|
|
} |
|
77
|
|
|
} |