Corrected emails, payment credit
This commit is contained in:
parent
ae3b136175
commit
293c559d7e
@ -27,58 +27,138 @@ if ($clientId) {
|
||||
if (!$client) {
|
||||
die("Klient nie został znaleziony.");
|
||||
}
|
||||
|
||||
// Calculate used credit
|
||||
$available_credit = $client['credit_balance'];
|
||||
$used_credit = $client['credit_limit'] - $client['credit_balance'];
|
||||
}
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$name = $_POST['name'] ?? '';
|
||||
$tax_id = $_POST['tax_id'] ?? '';
|
||||
$address = $_POST['address'] ?? '';
|
||||
$city = $_POST['city'] ?? '';
|
||||
$zip_code = $_POST['zip_code'] ?? '';
|
||||
$credit_limit = $_POST['credit_limit'] ?? 0;
|
||||
// Handle payment cancellation
|
||||
if (isset($_POST['cancel_payment'])) {
|
||||
$log_id = $_POST['log_id'] ?? null;
|
||||
if ($log_id) {
|
||||
$db->beginTransaction();
|
||||
try {
|
||||
// Get the payment amount from the log
|
||||
$logStmt = $db->prepare("SELECT * FROM client_credit_log WHERE id = :id AND client_id = :client_id");
|
||||
$logStmt->execute(['id' => $log_id, 'client_id' => $clientId]);
|
||||
$logEntry = $logStmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if (empty($name)) {
|
||||
$errorMessage = 'Nazwa klienta jest wymagana.';
|
||||
if ($logEntry && $logEntry['transaction_type'] === 'payment') {
|
||||
// Revert the credit balance
|
||||
$new_credit_balance = $client['credit_balance'] - $logEntry['amount'];
|
||||
|
||||
$updateStmt = $db->prepare("UPDATE clients SET credit_balance = :credit_balance WHERE id = :id");
|
||||
$updateStmt->execute(['credit_balance' => $new_credit_balance, 'id' => $clientId]);
|
||||
|
||||
// Delete the log entry
|
||||
$deleteStmt = $db->prepare("DELETE FROM client_credit_log WHERE id = :id");
|
||||
$deleteStmt->execute(['id' => $log_id]);
|
||||
|
||||
$db->commit();
|
||||
$successMessage = "Płatność została pomyślnie anulowana.";
|
||||
|
||||
// Re-fetch client data
|
||||
$stmt = $db->prepare("SELECT * FROM clients WHERE id = :id");
|
||||
$stmt->execute(['id' => $clientId]);
|
||||
$client = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
$available_credit = $client['credit_balance'];
|
||||
$used_credit = $client['credit_limit'] - $client['credit_balance'];
|
||||
} else {
|
||||
$db->rollBack();
|
||||
$errorMessage = "Nie znaleziono wpisu płatności lub transakcja nie jest płatnością.";
|
||||
}
|
||||
} catch (PDOException $e) {
|
||||
$db->rollBack();
|
||||
$errorMessage = "Wystąpił błąd podczas anulowania płatności.";
|
||||
// error_log($e->getMessage()); // For debugging
|
||||
}
|
||||
}
|
||||
} elseif (isset($_POST['payback_submit'])) {
|
||||
$payback_amount = (float)($_POST['payback_amount'] ?? 0);
|
||||
$used_credit_for_validation = $client['credit_limit'] - $client['credit_balance'];
|
||||
|
||||
if ($payback_amount <= 0) {
|
||||
$errorMessage = 'Kwota spłaty musi być większa od zera.';
|
||||
} elseif ($payback_amount > $used_credit_for_validation) {
|
||||
$errorMessage = "Kwota spłaty nie może być wyższa niż wykorzystany kredyt (" . number_format($used_credit_for_validation, 2, ',', ' ') . " PLN).";
|
||||
} else {
|
||||
try {
|
||||
$new_credit_balance = $client['credit_balance'] + $payback_amount;
|
||||
|
||||
$stmt = $db->prepare("UPDATE clients SET credit_balance = :credit_balance WHERE id = :id");
|
||||
$stmt->execute(['credit_balance' => $new_credit_balance, 'id' => $clientId]);
|
||||
|
||||
// Log the transaction
|
||||
$logStmt = $db->prepare("INSERT INTO client_credit_log (client_id, amount, transaction_type, notes) VALUES (:client_id, :amount, :transaction_type, :notes)");
|
||||
$logStmt->execute([
|
||||
'client_id' => $clientId,
|
||||
'amount' => $payback_amount,
|
||||
'transaction_type' => 'payment',
|
||||
'notes' => 'Credit payback'
|
||||
]);
|
||||
|
||||
$successMessage = 'Spłata kredytu została pomyślnie przetworzona.';
|
||||
|
||||
// Re-fetch data to display updated values
|
||||
$stmt = $db->prepare("SELECT * FROM clients WHERE id = :id");
|
||||
$stmt->execute(['id' => $clientId]);
|
||||
$client = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
$available_credit = $client['credit_balance'];
|
||||
$used_credit = $client['credit_limit'] - $client['credit_balance'];
|
||||
|
||||
} catch (PDOException $e) {
|
||||
$errorMessage = 'Wystąpił błąd podczas przetwarzania spłaty kredytu.';
|
||||
// error_log($e->getMessage()); // Uncomment for debugging
|
||||
}
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
if ($isNewClient) {
|
||||
$stmt = $db->prepare("INSERT INTO clients (name, nip, street, city, postal_code, credit_limit) VALUES (:name, :tax_id, :address, :city, :zip_code, :credit_limit)");
|
||||
} else {
|
||||
$stmt = $db->prepare("UPDATE clients SET name = :name, nip = :tax_id, street = :address, city = :city, postal_code = :zip_code, credit_limit = :credit_limit WHERE id = :id");
|
||||
$name = $_POST['name'] ?? '';
|
||||
$tax_id = $_POST['tax_id'] ?? '';
|
||||
$address = $_POST['address'] ?? '';
|
||||
$city = $_POST['city'] ?? '';
|
||||
$zip_code = $_POST['zip_code'] ?? '';
|
||||
$credit_limit = $_POST['credit_limit'] ?? 0;
|
||||
|
||||
if (empty($name)) {
|
||||
$errorMessage = 'Nazwa klienta jest wymagana.';
|
||||
} else {
|
||||
try {
|
||||
if ($isNewClient) {
|
||||
$stmt = $db->prepare("INSERT INTO clients (name, nip, street, city, postal_code, credit_limit) VALUES (:name, :tax_id, :address, :city, :zip_code, :credit_limit)");
|
||||
} else {
|
||||
$stmt = $db->prepare("UPDATE clients SET name = :name, nip = :tax_id, street = :address, city = :city, postal_code = :zip_code, credit_limit = :credit_limit WHERE id = :id");
|
||||
}
|
||||
|
||||
$params = [
|
||||
'name' => $name,
|
||||
'tax_id' => $tax_id,
|
||||
'address' => $address,
|
||||
'city' => $city,
|
||||
'zip_code' => $zip_code,
|
||||
'credit_limit' => $credit_limit
|
||||
];
|
||||
|
||||
if (!$isNewClient) {
|
||||
$params['id'] = $clientId;
|
||||
}
|
||||
|
||||
$stmt->execute($params);
|
||||
|
||||
if ($isNewClient) {
|
||||
$clientId = $db->lastInsertId();
|
||||
header('Location: clients.php?status=created');
|
||||
exit;
|
||||
}
|
||||
$successMessage = 'Dane klienta zostały zaktualizowane.';
|
||||
// Re-fetch data to display updated values
|
||||
$stmt = $db->prepare("SELECT * FROM clients WHERE id = :id");
|
||||
$stmt->execute(['id' => $clientId]);
|
||||
$client = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
} catch (PDOException $e) {
|
||||
$errorMessage = 'Wystąpił błąd podczas zapisywania danych klienta.';
|
||||
// error_log($e->getMessage()); // Uncomment for debugging
|
||||
}
|
||||
|
||||
$params = [
|
||||
'name' => $name,
|
||||
'tax_id' => $tax_id,
|
||||
'address' => $address,
|
||||
'city' => $city,
|
||||
'zip_code' => $zip_code,
|
||||
'credit_limit' => $credit_limit
|
||||
];
|
||||
|
||||
if (!$isNewClient) {
|
||||
$params['id'] = $clientId;
|
||||
}
|
||||
|
||||
$stmt->execute($params);
|
||||
|
||||
if ($isNewClient) {
|
||||
$clientId = $db->lastInsertId();
|
||||
header('Location: clients.php?status=created');
|
||||
exit;
|
||||
}
|
||||
$successMessage = 'Dane klienta zostały zaktualizowane.';
|
||||
// Re-fetch data to display updated values
|
||||
$stmt = $db->prepare("SELECT * FROM clients WHERE id = :id");
|
||||
$stmt->execute(['id' => $clientId]);
|
||||
$client = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
} catch (PDOException $e) {
|
||||
$errorMessage = 'Wystąpił błąd podczas zapisywania danych klienta.';
|
||||
// error_log($e->getMessage()); // Uncomment for debugging
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -137,14 +217,67 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Dostępny kredyt</label>
|
||||
<p class="form-control-plaintext fw-bold <?php echo (($client['credit_limit'] - $used_credit) < 0) ? 'text-danger' : 'text-success'; ?>">
|
||||
<?php echo number_format($client['credit_limit'] - $used_credit, 2, ',', ' '); ?> PLN
|
||||
<p class="form-control-plaintext fw-bold <?php echo ($available_credit < 0) ? 'text-danger' : 'text-success'; ?>">
|
||||
<?php echo number_format($available_credit, 2, ',', ' '); ?> PLN
|
||||
</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<button type="submit" class="btn btn-primary">Zapisz</button>
|
||||
<a href="clients.php" class="btn btn-secondary">Anuluj</a>
|
||||
</form>
|
||||
<?php if ($clientId): ?>
|
||||
<hr>
|
||||
<h5 class="mt-4">Spłata kredytu</h5>
|
||||
<form method="post" class="mt-3">
|
||||
<div class="mb-3">
|
||||
<label for="payback_amount" class="form-label">Kwota spłaty</label>
|
||||
<input type="number" step="0.01" class="form-control" id="payback_amount" name="payback_amount" required>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success" name="payback_submit">Zatwierdź spłatę</button>
|
||||
</form>
|
||||
|
||||
<hr>
|
||||
<h5 class="mt-4">Historia kredytu</h5>
|
||||
<?php
|
||||
$logStmt = $db->prepare("SELECT * FROM client_credit_log WHERE client_id = :client_id ORDER BY created_at DESC");
|
||||
$logStmt->execute(['client_id' => $clientId]);
|
||||
$creditLogs = $logStmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
?>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Data</th>
|
||||
<th>Typ</th>
|
||||
<th>Kwota</th>
|
||||
<th>Notatki</th>
|
||||
<th>Akcje</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($creditLogs as $log): ?>
|
||||
<tr>
|
||||
<td><?php echo htmlspecialchars($log['created_at']); ?></td>
|
||||
<td><?php echo htmlspecialchars($log['transaction_type']); ?></td>
|
||||
<td><?php echo number_format($log['amount'], 2, ',', ' '); ?> PLN</td>
|
||||
<td><?php echo htmlspecialchars($log['notes']); ?></td>
|
||||
<td>
|
||||
<?php if ($log['transaction_type'] === 'payment'): ?>
|
||||
<form method="post" onsubmit="return confirm('Czy na pewno chcesz anulować tę płatność?');" style="display: inline;">
|
||||
<input type="hidden" name="log_id" value="<?php echo $log['id']; ?>">
|
||||
<button type="submit" name="cancel_payment" class="btn btn-danger btn-sm">Anuluj</button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php if (empty($creditLogs)): ?>
|
||||
<tr>
|
||||
<td colspan="5" class="text-center">Brak historii kredytowej.</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
12
db/migrations/029_create_credit_log_table.sql
Normal file
12
db/migrations/029_create_credit_log_table.sql
Normal file
@ -0,0 +1,12 @@
|
||||
-- Migration to create the client_credit_log table
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `client_credit_log` (
|
||||
`id` INT AUTO_INCREMENT PRIMARY KEY,
|
||||
`client_id` INT NOT NULL,
|
||||
`amount` DECIMAL(10, 2) NOT NULL,
|
||||
`transaction_type` VARCHAR(50) NOT NULL DEFAULT 'payment',
|
||||
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
`notes` TEXT,
|
||||
FOREIGN KEY (`client_id`) REFERENCES `clients`(`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
424
debug_price.log
424
debug_price.log
@ -3187,3 +3187,427 @@ Product price query executed. Found: {"price_net":"233.20","price_gross":"286.84
|
||||
Found product price. Net: 233.2, Gross: 286.84
|
||||
FINAL: Returning Net: 233.2, Gross: 286.84
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 1, client 1
|
||||
Client price query executed. Found: {"price_net":"894.31","price_gross":"1100.00"}
|
||||
Found client price. Net: 894.31, Gross: 1100
|
||||
FINAL: Returning Net: 894.31, Gross: 1100
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 2, client 1
|
||||
Client price query executed. Found: {"price_net":"1056.91","price_gross":"1300.00"}
|
||||
Found client price. Net: 1056.91, Gross: 1300
|
||||
FINAL: Returning Net: 1056.91, Gross: 1300
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 3, client 1
|
||||
Client price query executed. Found: {"price_net":"32.52","price_gross":"40.00"}
|
||||
Found client price. Net: 32.52, Gross: 40
|
||||
FINAL: Returning Net: 32.52, Gross: 40
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 4, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"9.95","price_gross":"12.24"}
|
||||
Found product price. Net: 9.95, Gross: 12.24
|
||||
FINAL: Returning Net: 9.95, Gross: 12.24
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 5, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"68.00","price_gross":"83.64"}
|
||||
Found product price. Net: 68, Gross: 83.64
|
||||
FINAL: Returning Net: 68, Gross: 83.64
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 6, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"171.60","price_gross":"211.07"}
|
||||
Found product price. Net: 171.6, Gross: 211.07
|
||||
FINAL: Returning Net: 171.6, Gross: 211.07
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 7, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"233.20","price_gross":"286.84"}
|
||||
Found product price. Net: 233.2, Gross: 286.84
|
||||
FINAL: Returning Net: 233.2, Gross: 286.84
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 5, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"68.00","price_gross":"83.64"}
|
||||
Found product price. Net: 68, Gross: 83.64
|
||||
FINAL: Returning Net: 68, Gross: 83.64
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 5, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"68.00","price_gross":"83.64"}
|
||||
Found product price. Net: 68, Gross: 83.64
|
||||
FINAL: Returning Net: 68, Gross: 83.64
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 5, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"68.00","price_gross":"83.64"}
|
||||
Found product price. Net: 68, Gross: 83.64
|
||||
FINAL: Returning Net: 68, Gross: 83.64
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 1, client 1
|
||||
Client price query executed. Found: {"price_net":"894.31","price_gross":"1100.00"}
|
||||
Found client price. Net: 894.31, Gross: 1100
|
||||
FINAL: Returning Net: 894.31, Gross: 1100
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 2, client 1
|
||||
Client price query executed. Found: {"price_net":"1056.91","price_gross":"1300.00"}
|
||||
Found client price. Net: 1056.91, Gross: 1300
|
||||
FINAL: Returning Net: 1056.91, Gross: 1300
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 3, client 1
|
||||
Client price query executed. Found: {"price_net":"32.52","price_gross":"40.00"}
|
||||
Found client price. Net: 32.52, Gross: 40
|
||||
FINAL: Returning Net: 32.52, Gross: 40
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 4, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"9.95","price_gross":"12.24"}
|
||||
Found product price. Net: 9.95, Gross: 12.24
|
||||
FINAL: Returning Net: 9.95, Gross: 12.24
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 5, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"68.00","price_gross":"83.64"}
|
||||
Found product price. Net: 68, Gross: 83.64
|
||||
FINAL: Returning Net: 68, Gross: 83.64
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 6, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"171.60","price_gross":"211.07"}
|
||||
Found product price. Net: 171.6, Gross: 211.07
|
||||
FINAL: Returning Net: 171.6, Gross: 211.07
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 7, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"233.20","price_gross":"286.84"}
|
||||
Found product price. Net: 233.2, Gross: 286.84
|
||||
FINAL: Returning Net: 233.2, Gross: 286.84
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 1, client 1
|
||||
Client price query executed. Found: {"price_net":"894.31","price_gross":"1100.00"}
|
||||
Found client price. Net: 894.31, Gross: 1100
|
||||
FINAL: Returning Net: 894.31, Gross: 1100
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 2, client 1
|
||||
Client price query executed. Found: {"price_net":"1056.91","price_gross":"1300.00"}
|
||||
Found client price. Net: 1056.91, Gross: 1300
|
||||
FINAL: Returning Net: 1056.91, Gross: 1300
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 3, client 1
|
||||
Client price query executed. Found: {"price_net":"32.52","price_gross":"40.00"}
|
||||
Found client price. Net: 32.52, Gross: 40
|
||||
FINAL: Returning Net: 32.52, Gross: 40
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 4, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"9.95","price_gross":"12.24"}
|
||||
Found product price. Net: 9.95, Gross: 12.24
|
||||
FINAL: Returning Net: 9.95, Gross: 12.24
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 5, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"68.00","price_gross":"83.64"}
|
||||
Found product price. Net: 68, Gross: 83.64
|
||||
FINAL: Returning Net: 68, Gross: 83.64
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 6, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"171.60","price_gross":"211.07"}
|
||||
Found product price. Net: 171.6, Gross: 211.07
|
||||
FINAL: Returning Net: 171.6, Gross: 211.07
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 7, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"233.20","price_gross":"286.84"}
|
||||
Found product price. Net: 233.2, Gross: 286.84
|
||||
FINAL: Returning Net: 233.2, Gross: 286.84
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 1, client 1
|
||||
Client price query executed. Found: {"price_net":"894.31","price_gross":"1100.00"}
|
||||
Found client price. Net: 894.31, Gross: 1100
|
||||
FINAL: Returning Net: 894.31, Gross: 1100
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 2, client 1
|
||||
Client price query executed. Found: {"price_net":"1056.91","price_gross":"1300.00"}
|
||||
Found client price. Net: 1056.91, Gross: 1300
|
||||
FINAL: Returning Net: 1056.91, Gross: 1300
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 3, client 1
|
||||
Client price query executed. Found: {"price_net":"32.52","price_gross":"40.00"}
|
||||
Found client price. Net: 32.52, Gross: 40
|
||||
FINAL: Returning Net: 32.52, Gross: 40
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 4, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"9.95","price_gross":"12.24"}
|
||||
Found product price. Net: 9.95, Gross: 12.24
|
||||
FINAL: Returning Net: 9.95, Gross: 12.24
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 5, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"68.00","price_gross":"83.64"}
|
||||
Found product price. Net: 68, Gross: 83.64
|
||||
FINAL: Returning Net: 68, Gross: 83.64
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 6, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"171.60","price_gross":"211.07"}
|
||||
Found product price. Net: 171.6, Gross: 211.07
|
||||
FINAL: Returning Net: 171.6, Gross: 211.07
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 7, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"233.20","price_gross":"286.84"}
|
||||
Found product price. Net: 233.2, Gross: 286.84
|
||||
FINAL: Returning Net: 233.2, Gross: 286.84
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 1, client 1
|
||||
Client price query executed. Found: {"price_net":"894.31","price_gross":"1100.00"}
|
||||
Found client price. Net: 894.31, Gross: 1100
|
||||
FINAL: Returning Net: 894.31, Gross: 1100
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 2, client 1
|
||||
Client price query executed. Found: {"price_net":"1056.91","price_gross":"1300.00"}
|
||||
Found client price. Net: 1056.91, Gross: 1300
|
||||
FINAL: Returning Net: 1056.91, Gross: 1300
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 3, client 1
|
||||
Client price query executed. Found: {"price_net":"32.52","price_gross":"40.00"}
|
||||
Found client price. Net: 32.52, Gross: 40
|
||||
FINAL: Returning Net: 32.52, Gross: 40
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 4, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"9.95","price_gross":"12.24"}
|
||||
Found product price. Net: 9.95, Gross: 12.24
|
||||
FINAL: Returning Net: 9.95, Gross: 12.24
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 5, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"68.00","price_gross":"83.64"}
|
||||
Found product price. Net: 68, Gross: 83.64
|
||||
FINAL: Returning Net: 68, Gross: 83.64
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 6, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"171.60","price_gross":"211.07"}
|
||||
Found product price. Net: 171.6, Gross: 211.07
|
||||
FINAL: Returning Net: 171.6, Gross: 211.07
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 7, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"233.20","price_gross":"286.84"}
|
||||
Found product price. Net: 233.2, Gross: 286.84
|
||||
FINAL: Returning Net: 233.2, Gross: 286.84
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 1, client 1
|
||||
Client price query executed. Found: {"price_net":"894.31","price_gross":"1100.00"}
|
||||
Found client price. Net: 894.31, Gross: 1100
|
||||
FINAL: Returning Net: 894.31, Gross: 1100
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 2, client 1
|
||||
Client price query executed. Found: {"price_net":"1056.91","price_gross":"1300.00"}
|
||||
Found client price. Net: 1056.91, Gross: 1300
|
||||
FINAL: Returning Net: 1056.91, Gross: 1300
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 3, client 1
|
||||
Client price query executed. Found: {"price_net":"32.52","price_gross":"40.00"}
|
||||
Found client price. Net: 32.52, Gross: 40
|
||||
FINAL: Returning Net: 32.52, Gross: 40
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 4, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"9.95","price_gross":"12.24"}
|
||||
Found product price. Net: 9.95, Gross: 12.24
|
||||
FINAL: Returning Net: 9.95, Gross: 12.24
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 5, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"68.00","price_gross":"83.64"}
|
||||
Found product price. Net: 68, Gross: 83.64
|
||||
FINAL: Returning Net: 68, Gross: 83.64
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 6, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"171.60","price_gross":"211.07"}
|
||||
Found product price. Net: 171.6, Gross: 211.07
|
||||
FINAL: Returning Net: 171.6, Gross: 211.07
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 7, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"233.20","price_gross":"286.84"}
|
||||
Found product price. Net: 233.2, Gross: 286.84
|
||||
FINAL: Returning Net: 233.2, Gross: 286.84
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 1, client 1
|
||||
Client price query executed. Found: {"price_net":"894.31","price_gross":"1100.00"}
|
||||
Found client price. Net: 894.31, Gross: 1100
|
||||
FINAL: Returning Net: 894.31, Gross: 1100
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 2, client 1
|
||||
Client price query executed. Found: {"price_net":"1056.91","price_gross":"1300.00"}
|
||||
Found client price. Net: 1056.91, Gross: 1300
|
||||
FINAL: Returning Net: 1056.91, Gross: 1300
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 3, client 1
|
||||
Client price query executed. Found: {"price_net":"32.52","price_gross":"40.00"}
|
||||
Found client price. Net: 32.52, Gross: 40
|
||||
FINAL: Returning Net: 32.52, Gross: 40
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 4, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"9.95","price_gross":"12.24"}
|
||||
Found product price. Net: 9.95, Gross: 12.24
|
||||
FINAL: Returning Net: 9.95, Gross: 12.24
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 5, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"68.00","price_gross":"83.64"}
|
||||
Found product price. Net: 68, Gross: 83.64
|
||||
FINAL: Returning Net: 68, Gross: 83.64
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 6, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"171.60","price_gross":"211.07"}
|
||||
Found product price. Net: 171.6, Gross: 211.07
|
||||
FINAL: Returning Net: 171.6, Gross: 211.07
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 7, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"233.20","price_gross":"286.84"}
|
||||
Found product price. Net: 233.2, Gross: 286.84
|
||||
FINAL: Returning Net: 233.2, Gross: 286.84
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 1, client 1
|
||||
Client price query executed. Found: {"price_net":"894.31","price_gross":"1100.00"}
|
||||
Found client price. Net: 894.31, Gross: 1100
|
||||
FINAL: Returning Net: 894.31, Gross: 1100
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 2, client 1
|
||||
Client price query executed. Found: {"price_net":"1056.91","price_gross":"1300.00"}
|
||||
Found client price. Net: 1056.91, Gross: 1300
|
||||
FINAL: Returning Net: 1056.91, Gross: 1300
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 3, client 1
|
||||
Client price query executed. Found: {"price_net":"32.52","price_gross":"40.00"}
|
||||
Found client price. Net: 32.52, Gross: 40
|
||||
FINAL: Returning Net: 32.52, Gross: 40
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 4, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"9.95","price_gross":"12.24"}
|
||||
Found product price. Net: 9.95, Gross: 12.24
|
||||
FINAL: Returning Net: 9.95, Gross: 12.24
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 5, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"68.00","price_gross":"83.64"}
|
||||
Found product price. Net: 68, Gross: 83.64
|
||||
FINAL: Returning Net: 68, Gross: 83.64
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 6, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"171.60","price_gross":"211.07"}
|
||||
Found product price. Net: 171.6, Gross: 211.07
|
||||
FINAL: Returning Net: 171.6, Gross: 211.07
|
||||
---
|
||||
---
|
||||
START getEffectivePrice for product 7, client 1
|
||||
Client price query executed. Found: No
|
||||
Client price not found or not set, falling back to product price.
|
||||
Product price query executed. Found: {"price_net":"233.20","price_gross":"286.84"}
|
||||
Found product price. Net: 233.2, Gross: 286.84
|
||||
FINAL: Returning Net: 233.2, Gross: 286.84
|
||||
---
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user