Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Carmine Di Gruttola committed Aug 31, 2022
2 parents 04545ab + 2128d72 commit 010bc1b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
11 changes: 5 additions & 6 deletions electronicinvoicefields.php
Original file line number Diff line number Diff line change
Expand Up @@ -664,14 +664,13 @@ private function retrieveValuesFromCustomerAddress($params): void
private function insertAddressCustomerType(): bool
{
$sql = [];
$sql[] = 'INSERT INTO `' . _DB_PREFIX_ . 'einvoice_customer_type` (`id_addresscustomertype`,`removable`,`date_add`,`date_upd`) VALUES
(1, 0, NOW(), NOW()),
(2, 0, NOW(), NOW()),
(3, 0, NOW(), NOW()),
(4, 0, NOW(), NOW());';
$sql[] = 'INSERT INTO `' . _DB_PREFIX_ . 'einvoice_customer_type` (`id_addresscustomertype`,`removable`,`need_invoice`,`date_add`,`date_upd`) VALUES
(1, 0, 0, NOW(), NOW()),
(2, 0, 1, NOW(), NOW()),
(3, 0, 1, NOW(), NOW()),
(4, 0, 1, NOW(), NOW());';

foreach (Language::getLanguages() as $lang) {
PrestaShopLogger::addLog('insertAddressCustomerType ' . $lang['id_lang']);
$sql[] = 'INSERT INTO ' . _DB_PREFIX_ . 'einvoice_customer_type_lang (`id_addresscustomertype`, `id_lang`, `name`) VALUES '
. '(1, ' . $lang['id_lang'] . ", '" . $this->trans('Private', [], 'Modules.Electronicinvoicefields.Einvoice', $lang['locale']) . "'),"
. '(2, ' . $lang['id_lang'] . ", '" . $this->trans('Company/Professional', [], 'Modules.Electronicinvoicefields.Einvoice', $lang['locale']) . "'),"
Expand Down
10 changes: 10 additions & 0 deletions vendor/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>

0 comments on commit 010bc1b

Please sign in to comment.