From c3cc421fd4e644c15157042e31b09eba07d93ec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 11 May 2015 12:25:23 +0200 Subject: [PATCH] First import --- importorderlines/.gitignore | 1 + importorderlines/admin/admin.php | 69 ++++++ importorderlines/admin/example-en_US.png | Bin 0 -> 16060 bytes importorderlines/admin/example-es_ES.png | Bin 0 -> 15752 bytes importorderlines/admin/index.html | 0 importorderlines/class/Utils.php | 231 ++++++++++++++++++ .../class/actions_importorderlines.class.php | 190 ++++++++++++++ importorderlines/class/index.html | 0 importorderlines/composer.json | 8 + importorderlines/composer.lock | 75 ++++++ importorderlines/core/index.html | 0 importorderlines/core/modules/index.html | 0 .../modules/modImportorderlines.class.php | 162 ++++++++++++ importorderlines/index.html | 0 .../langs/en_US/importorderlines.lang | 26 ++ .../langs/es_ES/importorderlines.lang | 30 +++ importorderlines/langs/index.html | 0 17 files changed, 792 insertions(+) create mode 100644 importorderlines/.gitignore create mode 100644 importorderlines/admin/admin.php create mode 100644 importorderlines/admin/example-en_US.png create mode 100644 importorderlines/admin/example-es_ES.png create mode 100644 importorderlines/admin/index.html create mode 100644 importorderlines/class/Utils.php create mode 100644 importorderlines/class/actions_importorderlines.class.php create mode 100644 importorderlines/class/index.html create mode 100644 importorderlines/composer.json create mode 100644 importorderlines/composer.lock create mode 100644 importorderlines/core/index.html create mode 100644 importorderlines/core/modules/index.html create mode 100644 importorderlines/core/modules/modImportorderlines.class.php create mode 100644 importorderlines/index.html create mode 100644 importorderlines/langs/en_US/importorderlines.lang create mode 100644 importorderlines/langs/es_ES/importorderlines.lang create mode 100644 importorderlines/langs/index.html diff --git a/importorderlines/.gitignore b/importorderlines/.gitignore new file mode 100644 index 0000000..7951405 --- /dev/null +++ b/importorderlines/.gitignore @@ -0,0 +1 @@ +lib \ No newline at end of file diff --git a/importorderlines/admin/admin.php b/importorderlines/admin/admin.php new file mode 100644 index 0000000..f0b2284 --- /dev/null +++ b/importorderlines/admin/admin.php @@ -0,0 +1,69 @@ + + * + * This file is part of Importorderlines. + * + * Multismtp is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Multismtp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Multismtp. If not, see . + */ + +require '../../main.inc.php'; + +$langs->load('admin'); +$langs->load('importorderlines@importorderlines'); + +llxHeader(); + +$linkback=''.$langs->trans("BackToModuleList").''; +print_fiche_titre($langs->trans('ImportOrderLinesInfo'), $linkback); + +?> + +
trans('ImportOrderLinesTitle') ?>
+ +

trans('ImportOrderLinesInfoFormat') ?>

+

trans('ImportOrderLinesInfoFormatMore') ?>

+

trans('ImportOrderLinesInfoFormatCreate', + $langs->transnoentities('Tools'), + $langs->transnoentities('NewExport'), + $langs->transnoentities('Products'), + $langs->transnoentities('Ref') + ).$langs->trans('ImportOrderLinesInfoFormatCreate2', + $langs->transnoentities('Label'), + $langs->transnoentities('Qty') + ) ?>

+

trans('ImportOrderLinesInfoFormatExample') ?>

+<?php echo $langs->trans('ImportOrderLinesInfoFormatExampleImgAlt') ?> + +

+ +
trans('ImportOrderLinesInfoUsing') ?>
+ +

trans('ImportOrderLinesInfoUsingOrder', $langs->transnoentities('ImportOrderLines')) ?>

+ +
+ +
trans('ImportOrderLinesAbout') ?>
+ +

trans('ImportOrderLinesAuthor', 'http://marcosgdf.com') ?>

+

trans('ImportOrderLinesContact', 'hola@marcosgdf.com') ?>

+ +Q=2DaGC0-Q9}2yHf&`w!z)qwYa;xyA=)YF2PUwJn#3O@BBa4 z6_V_|XJ*fynKk!X>rRNWq7*U$0m8d??~rAr#Z@8i%aB(JJRIbI?p_wbyLV6kYcVlp z88IN}ix6C^XD?uTAheWE|*p~mUPY}v13=4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k}dOO1{&7;vOGpi z^c=O%OOxzc=yDSr1T_x<6i5{l9Q?<5ljF6x`jh zbwDx|4TN~!*Glo2kgV&REkO2=+>83%C0(rLD9ik)= z#y#e2mXJB=@)^QxQ#g5SishB;doXepT?9EDd$by3b}7n$Y@6oco~}dt#1(T$G2deV zm0*yF91%NZ+EYim;Q_Eo(zm$>;aDA`->U+8_J``y5o=Agt4(0lX*u0ycMQPXYQgYUu5Ee^$Z1WM2wECP5xC{%I|6`r_(!X6i!B5fBvh#n&q|MSC`3%|vPZ60CMk29~* z2U3r;pL8$CZ92c9`U4K5>WUm;Ek=lz>ee8_a}0zg?e^NSHTipK=+54f=+`1b}PMR1Iy^d@{m(qtEH%*^-s#~w6}qysZXvvVP~-NSp4Y8O1O`7%*Cc2o zAbQkK8o*JF*O{h)p}(?iO=KuxO7oRf37VbS}y-lodO&ns?(AB zkP)Z4d8Qts{{q#a4Q(Jx*}u9|2`wZkPkSyWZ^)%~DEH8AjpI(l{jct1G08#A_e#_u zQ1xMVy*4I|FoLqh6WkGHtNj_W~>dAH>UP71Xh2*Yy!1o9h9R2sl&N32;;uWGsKmHGhaCi#< literal 0 HcmV?d00001 diff --git a/importorderlines/admin/example-es_ES.png b/importorderlines/admin/example-es_ES.png new file mode 100644 index 0000000000000000000000000000000000000000..46f1fbf5dd8750a90bf5067ed196d28882e6647b GIT binary patch literal 15752 zcmZX*1z1~Mvw&N)xVt;F1%kUfrMR|8aCf)hR@}9?dvOo$P@ER0XmEE5H~qf<{O8NAi79E8I<;|Nn=<;$>YS7Ou=sO(=5&HL`oZIou8yH_JNl6uX zNl7XdX9sgDTeCNBm=a734d2T%GmRJ-85)jEet3uC?4cGB5v^v}-QP3W(@!;EI7pR~ zuBW$2gtgfpfa}{a)Pqz2I0~Bhc=hZxSJLGBLcmj-;jBe3(0UUHm`!h<14GTnfwo1;F)q;khepB#YI!o}G^ zGgWxA1S^l#j2MxPVWb=IYn1rwJF(`sBdigmJppt5(!HxaYCjVKI^+@C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9<`vVmZ}D=Psy7q3Y}ABprP{pPfYtQA5S$b^ffpts2N@8JLk1;^2L8z=JNyAx`{ zNLAMUg8wi0@qE(pg|bs`4T1zS8n5d6C}$jR^(xe}Cu6t=uqA_E(&p3F%i=va{gxGl z7trT;>6XA|BvMZ=cJb9Zzb_Boc8|~Tu|cIKH+nbpW|Cs(ewJ8S44~VaXAr;YkaQGd zV+z)+3=Nz;kz{-;>9Jt#RCI4_aw)+W_fU7BP7iNVUtX>3U4y&g!|I!UNIG0 XQA>P29^U@_;jX;2l2na^VbK2r?+#mM literal 0 HcmV?d00001 diff --git a/importorderlines/admin/index.html b/importorderlines/admin/index.html new file mode 100644 index 0000000..e69de29 diff --git a/importorderlines/class/Utils.php b/importorderlines/class/Utils.php new file mode 100644 index 0000000..96d1fd0 --- /dev/null +++ b/importorderlines/class/Utils.php @@ -0,0 +1,231 @@ + + * + * This file is part of Importorderlines. + * + * Multismtp is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Multismtp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Multismtp. If not, see . + */ + +/** + * Dolibarr license: + * + * You can find a copy of the code at http://github.com/dolibarr/dolibarr + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +class Utils +{ + + /** + * Piece of code extracted from Form::formconfirm to show a confirm dialog with a upload form + * File input has name 'uploadfile' + * + * @param string $page Url of page to call if confirmation is OK + * @param string $title Title + * @param string $question Question + * @param string $action Action + * @param string $label Label of the input + * @return string HTML code + */ + public static function uploadForm($page, $title, $question, $action, $label) + { + global $langs; + + $formconfirm = "\n\n"; + + $formconfirm.= '
'."\n"; + $formconfirm.= ''; + $formconfirm.= ''."\n"; + + $formconfirm.= ''."\n"; + + // Line title + $formconfirm.= ''."\n"; + + // Line form fields + $formconfirm.=''."\n"; + $formconfirm.=''."\n"; + + // Line with question + $formconfirm.= ''; + $formconfirm.= ''; + $formconfirm.= ''; + $formconfirm.= ''."\n"; + + $formconfirm.= '
'.img_picto('','recent').' '.$title.'
'."\n"; + $formconfirm.=$label.''; + $formconfirm.= ''; + $formconfirm.='
'."\n"; + + $formconfirm.= "
\n"; + $formconfirm.= '
'; + + $formconfirm.= "\n"; + + return $formconfirm; + } + + /** + * Adds a product to the order + * + * @param Commande $object Order object + * @param Product $prod Product to add + * @param int $qty Quantity of the product + * @throws Exception + */ + public static function addOrderLine(Commande $object, Product $prod, $qty) + { + global $db, $conf, $mysoc, $langs; + + $tva_tx = get_default_tva($mysoc, $object->client, $prod->id); + $tva_npr = get_default_npr($mysoc, $object->client, $prod->id); + + if (! empty($conf->global->PRODUIT_MULTIPRICES) && ! empty($object->client->price_level)) + { + $pu_ht = $prod->multiprices [$object->client->price_level]; + $pu_ttc = $prod->multiprices_ttc [$object->client->price_level]; + $price_base_type = $prod->multiprices_base_type [$object->client->price_level]; + + if (isset($prod->multiprices_tva_tx[$object->client->price_level])) { + $tva_tx=$prod->multiprices_tva_tx[$object->client->price_level]; + } + if (isset($prod->multiprices_recuperableonly[$object->client->price_level])) { + $tva_npr=$prod->multiprices_recuperableonly[$object->client->price_level]; + } + } + elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) + { + require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php'; + + $prodcustprice = new Productcustomerprice($db); + + $filter = array('t.fk_product' => $prod->id,'t.fk_soc' => $object->thirdparty->id); + + $result = $prodcustprice->fetch_all('', '', 0, 0, $filter); + if ($result >= 0) { + if (count($prodcustprice->lines) > 0) { + $pu_ht = price($prodcustprice->lines[0]->price); + $pu_ttc = price($prodcustprice->lines[0]->price_ttc); + $price_base_type = $prodcustprice->lines[0]->price_base_type; + $prod->tva_tx = $prodcustprice->lines[0]->tva_tx; + } else { + $pu_ht = $prod->price; + $pu_ttc = $prod->price_ttc; + $price_base_type = $prod->price_base_type; + } + } else { + throw new Exception($prodcustprice->error); + } + } + else + { + $pu_ht = $prod->price; + $pu_ttc = $prod->price_ttc; + $price_base_type = $prod->price_base_type; + } + + // if price ht is forced (ie: calculated by margin rate and cost price) + if (! empty($price_ht)) { + $pu_ht = price2num($price_ht, 'MU'); + $pu_ttc = price2num($pu_ht * (1 + ($tva_tx / 100)), 'MU'); + } + + // On reevalue prix selon taux tva car taux tva transaction peut etre different + // de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur). + elseif ($tva_tx != $prod->tva_tx) { + if ($price_base_type != 'HT') { + $pu_ht = price2num($pu_ttc / (1 + ($tva_tx / 100)), 'MU'); + } else { + $pu_ttc = price2num($pu_ht * (1 + ($tva_tx / 100)), 'MU'); + } + } + + // Define output language + if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { + $outputlangs = $langs; + $newlang = ''; + if (empty($newlang) && GETPOST('lang_id')) + $newlang = GETPOST('lang_id'); + if (empty($newlang)) + $newlang = $object->client->default_lang; + if (! empty($newlang)) { + $outputlangs = new Translate("", $conf); + $outputlangs->setDefaultLang($newlang); + } + + $desc = (! empty($prod->multilangs [$outputlangs->defaultlang] ["description"])) ? $prod->multilangs [$outputlangs->defaultlang] ["description"] : $prod->description; + } else { + $desc = $prod->description; + } + + // Add custom code and origin country into description + if (empty($conf->global->MAIN_PRODUCT_DISABLE_CUSTOMCOUNTRYCODE) && (! empty($prod->customcode) || ! empty($prod->country_code))) { + $tmptxt = '('; + if (! empty($prod->customcode)) + $tmptxt .= $langs->transnoentitiesnoconv("CustomCode") . ': ' . $prod->customcode; + if (! empty($prod->customcode) && ! empty($prod->country_code)) + $tmptxt .= ' - '; + if (! empty($prod->country_code)) + $tmptxt .= $langs->transnoentitiesnoconv("CountryOrigin") . ': ' . getCountry($prod->country_code, 0, $db, $langs, 0); + $tmptxt .= ')'; + $desc = dol_concatdesc($desc, $tmptxt); + } + + // Local Taxes + $localtax1_tx = get_localtax($tva_tx, 1, $object->client); + $localtax2_tx = get_localtax($tva_tx, 2, $object->client); + + $info_bits = 0; + if ($tva_npr) + $info_bits |= 0x01; + + // Insert line + $result = $object->addline( + $desc, + $pu_ht, + $qty, + $tva_tx, + $localtax1_tx, + $localtax2_tx, + $prod->id, + 0, + $info_bits, + 0, + $price_base_type, + $pu_ttc, + '', + '', + $prod->type + ); + + if ($result < 0) { + throw new Exception($langs->trans('ErrorAddOrderLine', $prod->ref)); + } + } + +} \ No newline at end of file diff --git a/importorderlines/class/actions_importorderlines.class.php b/importorderlines/class/actions_importorderlines.class.php new file mode 100644 index 0000000..b97c517 --- /dev/null +++ b/importorderlines/class/actions_importorderlines.class.php @@ -0,0 +1,190 @@ + + * + * This file is part of Importorderlines. + * + * Multismtp is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Multismtp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Multismtp. If not, see . + */ + +class ActionsImportorderlineexcel +{ + /** + * @param array() $parameters Hook metadatas (context, etc...) + * @param Commande &$object The object to process + * @param string &$action Current action (if set). Generally create or edit or null + * @param HookManager $hookmanager Hook manager propagated to allow calling another hook + * @return int < 0 on error, 0 on success, 1 to replace standard code + */ + public function addMoreActionsButtons($parameters, Commande &$object, &$action, HookManager $hookmanager) + { + global $langs; + + $langs->load('importorderlines@importorderlines'); + + if ($object->statut < 1) { + print ''; + } + + return 0; + } + + /** + * @param array() $parameters Hook metadatas (context, etc...) + * @param Commande &$object The object to process + * @param string &$action Current action (if set). Generally create or edit or null + * @param HookManager $hookmanager Hook manager propagated to allow calling another hook + * @return int < 0 on error, 0 on success, 1 to replace standard code + */ + public function formConfirm($parameters, Commande &$object, &$action, HookManager $hookmanager) + { + global $langs, $db, $conf; + + $langs->load('importorderlines@importorderlines'); + + if ($object->statut >= 1) { + return 0; + } + + require 'Utils.php'; + + if ($action == 'import') { + + $this->resprints = Utils::uploadForm( + $_SERVER["PHP_SELF"] . '?id=' . $object->id, + $langs->trans('ImportOrderLines'), + $langs->trans('ConfirmCloneOrder', $object->ref), + 'confirm_import', + $langs->trans('SelectFileToImport') + ); + + } elseif ($action == 'confirm_import') { + + try { + + if (!isset($_FILES['uploadfile'])) { + throw new Exception($langs->trans('UploadFileError')); + } + + $file = $_FILES['uploadfile']; + + if (!is_uploaded_file($file['tmp_name'])) { + throw new Exception($langs->trans('UploadFileError')); + } + + if ($file['error'] != UPLOAD_ERR_OK) { + throw new Exception($langs->trans('UploadFileError'), $file['error']); + } + + require dirname(__FILE__).'/../lib/phpoffice/phpexcel/Classes/PHPExcel.php'; + + //Supported PHPExcel File readers to ensure we deal with a Spreadsheet. + $supported_filereaders = array( + 'CSV', + 'Excel2007', + 'Excel5', + 'OOCalc', + 'Excel2003XML' + ); + + if (!in_array(PHPExcel_IOFactory::identify($file['tmp_name']), $supported_filereaders)) { + throw new Exception($langs->trans('UploadFileErrorUnsupportedFormat')); + } + + try { + $excelfd = PHPExcel_IOFactory::load($file['tmp_name']); + } catch (PHPExcel_Reader_Exception $e) { + throw new Exception($e->getMessage()); + } + + $activesheet = $excelfd->getActiveSheet(); + + //Check of the format + $a1 = $activesheet->getCell('A1')->getValue() == $langs->trans('Ref'); + $b1 = $activesheet->getCell('B1')->getValue() == $langs->trans('Label'); + $c1 = $activesheet->getCell('C1')->getValue() == $langs->trans('Qty'); + + if (!$a1 || !$b1 || !$c1) { + throw new Exception($langs->trans('UploadFileErrorFormat')); + } + + $maxrow = $activesheet->getHighestRow(); + + for ($i = 2; $i <= $maxrow; $i++) { + + $qty = (int) $activesheet->getCellByColumnAndRow(2, $i)->getValue(); + + if ($qty > 0) { + + $ref = $activesheet->getCellByColumnAndRow(0, $i)->getValue(); + + $prod = new Product($db); + + if ($prod->fetch('', $ref) <= 0) { + throw new Exception($langs->trans('ErrorProductNotFound', $ref)); + } + + Utils::addOrderLine($object, $prod, $qty); + + unset($prod); + } + } + + } catch (Exception $e) { + + $message = $e->getMessage(); + + setEventMessage($e->getMessage(), 'errors'); + + if ($e->getCode()) { + $message .= '. Error code: '.$e->getCode(); + } + + dol_syslog('[importorderlines] '.$message, LOG_DEBUG); + + return -1; + } + + //Delete temporary file + unlink($file['tmp_name']); + + //Reload the object with new lines + $object->fetch($object->id); + + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { + // Define output language + $outputlangs = $langs; + $newlang = GETPOST('lang_id', 'alpha'); + if (! empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) + $newlang = $object->client->default_lang; + if (! empty($newlang)) { + $outputlangs = new Translate("", $conf); + $outputlangs->setDefaultLang($newlang); + } + + // PDF + $hidedetails = (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0); + $hidedesc = (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0); + $hideref = (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0); + + commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + } + + } + + return 0; + } + +} \ No newline at end of file diff --git a/importorderlines/class/index.html b/importorderlines/class/index.html new file mode 100644 index 0000000..e69de29 diff --git a/importorderlines/composer.json b/importorderlines/composer.json new file mode 100644 index 0000000..bcf0b70 --- /dev/null +++ b/importorderlines/composer.json @@ -0,0 +1,8 @@ +{ + "require" : { + "phpoffice/phpexcel": "1.8" + }, + "config" : { + "vendor-dir" : "lib" + } +} \ No newline at end of file diff --git a/importorderlines/composer.lock b/importorderlines/composer.lock new file mode 100644 index 0000000..353103d --- /dev/null +++ b/importorderlines/composer.lock @@ -0,0 +1,75 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "hash": "827da9bb9fbf53e5a92048ec576b2636", + "packages": [ + { + "name": "phpoffice/phpexcel", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PHPExcel.git", + "reference": "e69a5e4d0ffa7fb6f171859e0a04346e580df30b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PHPExcel/zipball/e69a5e4d0ffa7fb6f171859e0a04346e580df30b", + "reference": "e69a5e4d0ffa7fb6f171859e0a04346e580df30b", + "shasum": "" + }, + "require": { + "ext-xml": "*", + "ext-xmlwriter": "*", + "php": ">=5.2.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "PHPExcel": "Classes/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "http://blog.maartenballiauw.be" + }, + { + "name": "Mark Baker" + }, + { + "name": "Franck Lefevre", + "homepage": "http://blog.rootslabs.net" + }, + { + "name": "Erik Tilt" + } + ], + "description": "PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "http://phpexcel.codeplex.com", + "keywords": [ + "OpenXML", + "excel", + "php", + "spreadsheet", + "xls", + "xlsx" + ], + "time": "2014-03-02 15:22:49" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/importorderlines/core/index.html b/importorderlines/core/index.html new file mode 100644 index 0000000..e69de29 diff --git a/importorderlines/core/modules/index.html b/importorderlines/core/modules/index.html new file mode 100644 index 0000000..e69de29 diff --git a/importorderlines/core/modules/modImportorderlines.class.php b/importorderlines/core/modules/modImportorderlines.class.php new file mode 100644 index 0000000..a165528 --- /dev/null +++ b/importorderlines/core/modules/modImportorderlines.class.php @@ -0,0 +1,162 @@ + + * + * This file is part of Importorderlines. + * + * Multismtp is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Multismtp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Multismtp. If not, see . + */ + +/* Copyright (C) 2003 Rodolphe Quiedeville + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2015 Marcos García + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \defgroup mymodule Module MyModule + * \brief Example of a module descriptor. + * Such a file must be copied into htdocs/mymodule/core/modules directory. + * \file htdocs/mymodule/core/modules/modMyModule.class.php + * \ingroup mymodule + * \brief Description and activation file for module MyModule + */ +include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php'; + + +/** + * Description and activation class for module MyModule + */ +class modImportOrderLines extends DolibarrModules +{ + /** + * Constructor. Define names, constants, directories, boxes, permissions + * + * @param DoliDB $db Database handler + */ + function __construct($db) + { + global $langs,$conf; + + $this->db = $db; + + // Id for module (must be unique). + // Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id). + $this->numero = 402001; + // Key text used to identify module (for permissions, menus, etc...) + $this->rights_class = 'importorderlines'; + + // Family can be 'crm','financial','hr','projects','products','ecm','technic','other' + // It is used to group modules in module setup page + $this->family = "crm"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = 'Import order lines'; + // Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module) + $this->description = "Import order lines from spreasheet files"; + // Possible values for version are: 'development', 'experimental', 'dolibarr' or version + $this->version = '1.0'; + // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase) + $this->const_name = 'MAIN_MODULE_IMPORTORDERLINES'; + // Where to store the module in setup page (0=common,1=interface,2=others,3=very specific) + $this->special = 2; + // Name of image file used for this module. + // If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue' + // If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module' + $this->picto='generic'; + + $this->module_parts = array( + 'hooks' => array( + 'ordercard' + ) + ); + + // Data directories to create when module is enabled. + // Example: this->dirs = array("/mymodule/temp"); + $this->dirs = array(); + + // Config pages. Put here list of php page, stored into mymodule/admin directory, to use to setup module. + $this->config_page_url = array("admin.php@importorderlines"); + + // Dependencies + $this->hidden = false; // A condition to hide module + $this->depends = array( + 'modCommande', + 'modProducts' + ); // List of modules id that must be enabled if this module is enabled + $this->requiredby = array(); // List of modules id to disable if this one is disabled + $this->conflictwith = array(); // List of modules id this module is in conflict with + $this->phpmin = array(5,0); // Minimum version of PHP required by module + $this->need_dolibarr_version = array(3,6); // Minimum version of Dolibarr required by module + $this->langfiles = array("importorderlines@importorderlines"); + + $this->const = array(); + $this->tabs = array(); + + // Dictionaries + if (! isset($conf->mymodule->enabled)) + { + $conf->mymodule=new stdClass(); + $conf->mymodule->enabled=0; + } + $this->dictionaries=array(); + $this->boxes = array(); // List of boxes + $this->rights = array(); // Permission array used by this module + $this->menu = array(); // List of menus to add + } + + /** + * Function called when module is enabled. + * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. + * It also creates data directories + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function init($options='') + { + $sql = array(); + + return $this->_init($sql, $options); + } + + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { + $sql = array(); + + return $this->_remove($sql, $options); + } + +} \ No newline at end of file diff --git a/importorderlines/index.html b/importorderlines/index.html new file mode 100644 index 0000000..e69de29 diff --git a/importorderlines/langs/en_US/importorderlines.lang b/importorderlines/langs/en_US/importorderlines.lang new file mode 100644 index 0000000..cc810a5 --- /dev/null +++ b/importorderlines/langs/en_US/importorderlines.lang @@ -0,0 +1,26 @@ +ImportOrderLinesInfo=Information of Import Order Lines module +ImportOrderLines=Import order lines +SelectFileToImport=Select the file you want to import +UploadFileError=There was a problem while uploading the file +UploadFileErrorUnsupportedFormat=Uploaded file is not a valid Spreadsheet +UploadFileErrorFormat=Uploaded file does not match expected document format +ErrorProductNotFound=Product with ref %s not found +ErrorAddOrderLine=Error while trying to add product %s to the order + +#Admin page +ImportOrderLinesTitle=Import file +ImportOrderLinesInfoFormat=The import file is a spreadsheet that has the following format: +ImportOrderLinesInfoFormatA=Column A: %s +ImportOrderLinesInfoFormatB=Column B: %s +ImportOrderLinesInfoFormatC=Column C: %s +ImportOrderLinesInfoFormatMore=First row will hold the column header in the language configured in Dolibarr. The rest of the columns will be ignored. +ImportOrderLinesInfoFormatCreate=To generate the import file, access %s » %s » %s and select inputs "%s" +ImportOrderLinesInfoFormatCreate2= and "%s". Select CSV, Excel 2007 or Excel 95 format and then edit the file to add the column "%s". +ImportOrderLinesInfoFormatExample=Final result should look like the following: +ImportOrderLinesInfoFormatExampleImgSrc=example-en_US.png +ImportOrderLinesInfoFormatExampleImgAlt=Import example +ImportOrderLinesInfoUsing=How does it work +ImportOrderLinesInfoUsingOrder=Clients should fill the quantities they want to order in the order file. Then we create a customer order and click the button "%s", then we upload the order file and all products with quantity more or equal to 1 will be added. +ImportOrderLinesAbout=About +ImportOrderLinesAuthor=Module developed by Marcos García de La Fuente %s. +ImportOrderLinesContact=If you experience any problems with the module, you can contact me at %s \ No newline at end of file diff --git a/importorderlines/langs/es_ES/importorderlines.lang b/importorderlines/langs/es_ES/importorderlines.lang new file mode 100644 index 0000000..ba3ad48 --- /dev/null +++ b/importorderlines/langs/es_ES/importorderlines.lang @@ -0,0 +1,30 @@ +#Module info +Module402001Name=Importar líneas de pedido desde un archivo Excel +Module402001Desc=Importa líneas de pedido desde un archivo Excel + +ImportOrderLinesInfo=Información del módulo Importación de líneas de pedido +ImportOrderLines=Importar líneas de pedido +SelectFileToImport=Seleccione el archivo que desea importar +UploadFileError=Ha ocurrido un error al subir el archivo +UploadFileErrorUnsupportedFormat=El archivo subido no es una hoja de cálculo válida +UploadFileErrorFormat=El archivo subido no contiene el formato de documento esperado +ErrorProductNotFound=El producto con la referencia %s no ha sido encontrado +ErrorAddOrderLine=Error al intentar añadir el producto %s al pedido + +#Admin page +ImportOrderLinesTitle=Archivo de importación +ImportOrderLinesInfoFormat=El archivo de importación es una hoja de cálculo que posee el siguiente formato: +ImportOrderLinesInfoFormatA=Columna A: %s +ImportOrderLinesInfoFormatB=Columna B: %s +ImportOrderLinesInfoFormatC=Columna C: %s +ImportOrderLinesInfoFormatMore=La primera fila contendrá el título de la columna en el idioma configurado por Dolibarr. El resto de las columnas serán ignoradas. +ImportOrderLinesInfoFormatCreate=Para generar un archivo de importación, acceda a %s » %s » %s y seleccione los campos "%s" +ImportOrderLinesInfoFormatCreate2= y "%s". Seleccione el formato CSV, Excel 2007 o Excel 95 y a continuación edite el archivo para añadir la columna "%s". +ImportOrderLinesInfoFormatExample=El resultado final debería ser parecido al siguiente: +ImportOrderLinesInfoFormatExampleImgSrc=example-es_ES.png +ImportOrderLinesInfoFormatExampleImgAlt=Ejemplo de importación +ImportOrderLinesInfoUsing=Funcionamiento +ImportOrderLinesInfoUsingOrder=El cliente deberá rellenar la hoja de pedido anotando el número de cantidades que desea de cada producto. Entonces crearemos un pedido de cliente y haremos click sobre el botón "%s", subiremos el archivo y se añadirán al pedido todos aquellos productos que tengan una cantidad igual o superior a 1. +ImportOrderLinesAbout=Acerca de +ImportOrderLinesAuthor=Módulo desarrollado por Marcos García de La Fuente %s. +ImportOrderLinesContact=Si experimenta problemas con el módulo puede contactar conmigo en %s \ No newline at end of file diff --git a/importorderlines/langs/index.html b/importorderlines/langs/index.html new file mode 100644 index 0000000..e69de29