From c1e21986153130903cd52bbbdbff9d009a5d0af8 Mon Sep 17 00:00:00 2001 From: laptop-claude Date: Thu, 30 Jul 2026 03:31:43 +0300 Subject: [PATCH] =?UTF-8?q?kargo.js=20do=C4=9Fdu;=20fiyat.js'e=20kargoluTo?= =?UTF-8?q?plam()=20eklendi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fiyat.js | 4 ++++ kargo.js | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 kargo.js diff --git a/fiyat.js b/fiyat.js index c961393..d9d03ef 100644 --- a/fiyat.js +++ b/fiyat.js @@ -10,3 +10,7 @@ const KDV = 20; // yüzde function kdvliFiyat(fiyat) { return fiyat + (fiyat * KDV / 100); } + +function kargoluToplam(sepetTutari) { + return sepetTutari + kargoUcreti(sepetTutari); +} diff --git a/kargo.js b/kargo.js new file mode 100644 index 0000000..0eb08aa --- /dev/null +++ b/kargo.js @@ -0,0 +1,7 @@ +// Kargo hesabı +const KARGO_UCRETI = 49.90; // TL +const KARGO_BEDAVA_SINIRI = 500; // TL üzeri bedava + +function kargoUcreti(sepetTutari) { + return sepetTutari >= KARGO_BEDAVA_SINIRI ? 0 : KARGO_UCRETI; +}