Skip to content

Commit 7057dbc

Browse files
authored
Merge pull request #72 from Cybrarist/v3.6
V3.6
2 parents 32485e5 + be076e2 commit 7057dbc

File tree

14 files changed

+612
-293
lines changed

14 files changed

+612
-293
lines changed

app/Console/Commands/DiscountInstallCommand.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,14 +322,15 @@ public function handle(): void
322322
hint: ($os == "linux" || $os == "mac") ? "/var/www/discount" : "C:\\path\\to\\project"
323323
);
324324

325+
325326
if ($how_to_run == "cron" && ($os == "mac" || $os == "linux")) {
326327
$this->setup_cron_linux($path, $project);
327328
} elseif ($how_to_run == "terminal" && ($os == "mac" || $os == "linux")) {
328329
$this->setup_terminal_linux($path, $project);
329330
} elseif ($how_to_run == "cron" && $os == "windows") {
330-
$this->setup_cron_windows($path, $os);
331+
$this->setup_cron_windows($path, $project);
331332
} elseif ($how_to_run == "terminal" && $os == "windows") {
332-
$this->setup_terminal_windows($path, $os);
333+
$this->setup_terminal_windows($path, $project);
333334
}
334335

335336
}

app/Filament/Resources/ProductResource/RelationManagers/StoresRelationManager.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,16 @@ public function table(Table $table): Table
145145
->step(0.01)
146146
->label('Notify when cheaper than')
147147
->suffix(CurrencyHelper::get_currencies(currency_id: $action->getRecord()->currency_id)),
148+
149+
Forms\Components\TextInput::make('notify_percentage')
150+
->numeric()
151+
->step(0.01)
152+
->label('Notify percentage'),
153+
148154
])->using(function ($record, array $data) {
149155
$record->products()->updateExistingPivot($this->ownerRecord->id, [
150156
'notify_price' => $data['notify_price'] * 100,
157+
'notify_percentage' => $data['notify_percentage'] * 100,
151158
'add_shipping' => $data['add_shipping'],
152159
]);
153160

app/Helpers/ProductHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ public static function get_product_history_per_store($product_id): array
6464
->orderBy("date", "desc")
6565
->selectRaw(
6666
"store_id,
67-
date,
68-
price,
67+
date,
68+
price,
6969
$concat as con_date"
7070
)
7171
->get()

0 commit comments

Comments
 (0)