This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$days = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun']; | |
$openings = ['Open1', 'Close1', 'Open2', 'Close2']; | |
// flag tells if we need to show 2 or 4 columns for hours in view | |
$flagTests = ['Open2', 'Close2']; | |
$flag = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$saleInvoiceTaxRates = json_decode($saleInvoice->taxRates); | |
foreach ($saleInvoiceTaxRates as $key => $value) { | |
if (array_key_exists($key, $taxRates)) { | |
$taxRates[$key] += $value; | |
} | |
else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// pick 1 picture for each of the 3 selected companies: | |
$pictures = []; | |
foreach ($companies as $company) { | |
$companyPictures = json_decode($company->pictures); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Call must be free if calledNumber is in the same customer file: | |
$internalNumbers = TelephonyLine::where('customer_file_id', $call->customer_file_id)->pluck('phoneLine')->toArray(); | |
if (in_array($call->calledNumber, $internalNumbers)) { | |
$call->sellingPriceWithoutTax = 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$header = ['first name', 'last name', 'company', 'email', 'phone', 'mobilePhone', 'address', 'postCode', 'city']; | |
$data = Customer::select('mainContactFirstName', 'mainContactLastName', 'name', 'emailAddress', 'phone', 'mobilePhone', 'mainAddressLine1', 'mainAddressPostalCode', 'mainAddressCity')->get()->toArray(); | |
$csv = Writer::createFromPath(storage_path('app/public/customers.csv'), 'w'); | |
$csv->insertOne($header); | |
$csv->insertAll($data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* get line for ombutel call | |
* @param $file | |
* @param $line | |
*/ | |
private function getOmbutelCall($file, $line) | |
{ | |
$values = str_getcsv($line, ',', '"'); | |
if (isset($values[0]) && is_numeric($values[0])) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$telcoSources = [ | |
'mobile-data' => [ | |
'source' => 'mobile', | |
'destinations' => [ | |
'National' => 'mobile/national/mobile-data', | |
], | |
], | |
'mobile-mms' => [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private function cogilogLine($line) | |
{ | |
return $line['journal'] ?? '' . "\t" . $line['date'] ?? '' . "\t" . $line['piece'] ?? '' . "\t" . $line['account'] ?? '' . "\t" . $line['section'] ?? '' . "\t" . $line['term'] ?? '' . "\t" . $line['debit'] ?? '' . "\t" . $line['credit'] ?? '' . "\t" . $line['journal'] ?? '' . "\t" . $line['accountName'] ?? '' . "\t" . $line['sectionName'] ?? '' . '' . "\t" . ''. "\t" . '' . "\n"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
use Auth; | |
use Ovh\Api; | |
use App\ConsumerKey; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Console\Commands; | |
use App\ConfigOvh; | |
use App\OvhBill; | |
use App\OvhBillDetail; | |
use GuzzleHttp\Client; |