Skip to content

Commit

Permalink
removed taxRates from team model
Browse files Browse the repository at this point in the history
  • Loading branch information
neerajsohal committed Jun 28, 2023
1 parent 317ba4f commit 5bdd3f4
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 40 deletions.
2 changes: 1 addition & 1 deletion config/electrik.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* It is used in case the identufy a plan as a free plan in the system
*/

'free_plan_id' => 'prod_MOurX66bBOn5oD',
'free_plan_id' => null,

/**
* This is your fallback plan id defined in plans.php config file.
Expand Down
4 changes: 0 additions & 4 deletions src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,6 @@ public function handle() {
STRIPE_KEY=
STRIPE_SECRET=
CASHIER_TAX_RATE_SGST=
CASHIER_TAX_RATE_CGST=
CASHIER_TAX_RATE_IGST=
EOF, FILE_APPEND);

file_put_contents(app_path().'/Providers/AppServiceProvider.php',
Expand Down
70 changes: 35 additions & 35 deletions src/Models/Team.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,41 +32,41 @@ protected static function booted() {
}));
}

public function taxRates() {
\Log::info('checking applicable tax raates');
if($this->billingAddress()->first()->country == "IN") {
\Log::info('india found');
if($this->billingAddress()->first()->state == "UP") {
\Log::info('delhi found');
\Log::info(env('CASHIER_TAX_RATE_SGST'));
\Log::info(env('CASHIER_TAX_RATE_CGST'));
return [
env('CASHIER_TAX_RATE_SGST'),
env('CASHIER_TAX_RATE_CGST')
];
} else {
\Log::info('outside delhi found');
return [
env('CASHIER_TAX_RATE_IGST'),
];
}
} else {
if($this->billingAddress()->first()->country == "") {
\Log::info('no country found');
\Log::info('applying sgst' . env('CASHIER_TAX_RATE_SGST'));
\Log::info('applying cgst' . env('CASHIER_TAX_RATE_CGST'));
return [
env('CASHIER_TAX_RATE_SGST'),
env('CASHIER_TAX_RATE_CGST')
];
} else {
\Log::info('outside india found');
return [
env('CASHIER_TAX_RATE_IGST'),
];
}
}
}
// public function taxRates() {
// \Log::info('checking applicable tax raates');
// if($this->billingAddress()->first()->country == "IN") {
// \Log::info('india found');
// if($this->billingAddress()->first()->state == "UP") {
// \Log::info('delhi found');
// \Log::info(env('CASHIER_TAX_RATE_SGST'));
// \Log::info(env('CASHIER_TAX_RATE_CGST'));
// return [
// env('CASHIER_TAX_RATE_SGST'),
// env('CASHIER_TAX_RATE_CGST')
// ];
// } else {
// \Log::info('outside delhi found');
// return [
// env('CASHIER_TAX_RATE_IGST'),
// ];
// }
// } else {
// if($this->billingAddress()->first()->country == "") {
// \Log::info('no country found');
// \Log::info('applying sgst' . env('CASHIER_TAX_RATE_SGST'));
// \Log::info('applying cgst' . env('CASHIER_TAX_RATE_CGST'));
// return [
// env('CASHIER_TAX_RATE_SGST'),
// env('CASHIER_TAX_RATE_CGST')
// ];
// } else {
// \Log::info('outside india found');
// return [
// env('CASHIER_TAX_RATE_IGST'),
// ];
// }
// }
// }

/**
* Get the customer name that should be synced to Stripe.
Expand Down

0 comments on commit 5bdd3f4

Please sign in to comment.