From 41541e4bc26d0880030b0702737a9c3f96e7053e Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Tue, 23 Oct 2012 10:54:35 +0200 Subject: [PATCH 1/4] add charges and unitcharges in update statement --- htdocs/fourn/class/fournisseur.product.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 5b12f4956d2..3c238369924 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -189,7 +189,7 @@ class ProductFournisseur extends Product $sql.= " tva_tx = ".$tva_tx.","; $sql.= " fk_availability = ".$availability.","; $sql.= " entity = ".$conf->entity.","; - $sql.= " charges = ".($charges != ''?price2num($charges):"null"); + $sql.= " charges = ".$charges; $sql.= " WHERE rowid = ".$this->product_fourn_price_id; // TODO Add price_base_type and price_ttc @@ -219,18 +219,20 @@ class ProductFournisseur extends Product { // Add price for this quantity to supplier $sql = "INSERT INTO ".MAIN_DB_PREFIX."product_fournisseur_price("; - $sql.= "datec, fk_product, fk_soc, ref_fourn, fk_user, price, quantity, remise_percent, remise, unitprice, tva_tx, fk_availability, entity)"; + $sql.= "datec, fk_product, fk_soc, ref_fourn, fk_user, price, quantity, remise_percent, remise, unitprice, tva_tx, charges, unitcharges, fk_availability, entity)"; $sql.= " values('".$this->db->idate($now)."',"; $sql.= " ".$this->id.","; $sql.= " ".$fourn->id.","; $sql.= " '".$this->db->escape($ref_fourn)."',"; $sql.= " ".$user->id.","; - $sql.= " ".price2num($buyprice).","; + $sql.= " ".$buyprice.","; $sql.= " ".$qty.","; $sql.= " ".$remise_percent.","; $sql.= " ".$remise.","; $sql.= " ".$unitBuyPrice.","; $sql.= " ".$tva_tx.","; + $sql.= " ".$charges.","; + $sql.= " ".$unitCharges.","; $sql.= " ".$availability.","; $sql.= $conf->entity; $sql.=")"; From 485fab74784afe421d976ddd1c0dae3f5726584a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 23 Oct 2012 23:45:32 +0200 Subject: [PATCH 2/4] Try to fix warning of warning of buildroot and desktop into packaging --- build/launchpad/README | 48 +++++++++++++++++++++++++-------- build/rpm/dolibarr_generic.spec | 11 +++++--- 2 files changed, 44 insertions(+), 15 deletions(-) diff --git a/build/launchpad/README b/build/launchpad/README index cac4aa625b3..e49e1d213b9 100644 --- a/build/launchpad/README +++ b/build/launchpad/README @@ -12,7 +12,10 @@ a package onto LaunchPad # To install all packagers tools: # sudo apt-get install bzr-builder bzr dpatch pbuilder debootstrap devscripts + # Init local working env +#---------------------------------- + - Create account on launchpad.org - Create Project - Link project to official SCM server @@ -21,32 +24,53 @@ a package onto LaunchPad - Run from command line: bzr launchpad-login yourlogin bzr whoami "Your Name " -- Create a file /.pbuilderrc with content + bzr whoami +- Create a file ~/.pbuilderrc with content COMPONENTS="main universe multiverse restricted" - Create chroot ubuntu env sudo pbuilder create [--distribution sid|squeeze] -- Edit file ~/.bashrc ti add +- Edit file ~/.bashrc to add DEBFULLNAME="" DEBEMAIL="" -# Init package tools for launchpad + +# Push/declare sources to Launchpad +#---------------------------------- + - Create a Bazaar directory mkdir bzr -- Create debian directory and upload it onto bzr branch ~yourlogin/dolibarr/debian +- Create a series + Call it 'dev' or 'stable' + Add file with *: http://www.dolibarr.org/files/stable/package_debian-ubuntu/dolibarr_3.2.*.tar.gz + ??? Configure Series branch - Link to series ??? + bzr init + bzr add + bzr commit -m "Init" + bzr push lp:~eldy/dolibarr/stable + +# Init package tools for launchpad +#---------------------------------- + +- Create debian directory and upload it onto bzr branch ~yourlogin/+junk/debian-[dev|stable] cd bzr mkdir debian cd debian - bzr init cp -pr dolibarr_root/debian bzr/debian - bzr add debian - bzr commit -m "Init" - bzr push lp:~eldy/dolibarr/debian + bzr init + bzr add + bzr commit -m "Init control files" + bzr push lp:~eldy/+junk/debian-[dev|stable] (put here any branch name) or download it from launchpad bazaar: cd bzr - bzr branch lp:~eldy/dolibarr/debian + bzr branch lp:~eldy/+junk/debian-[dev|stable] - To update this debian directory, edit files into the bzr dir and run + bzr status bzr commit -m "Description of change" - bzr push lp:~eldy/dolibarr/debian + bzr push lp:~eldy/+junk/debian-[dev|stable] + +# Define a recipe into launchpad (a rule to build packages into a PPA) +#---------------------------------- + - Create a file dolibarr.recipe with content cd bzr vi dolibarr.recipe @@ -61,7 +85,9 @@ DEBEMAIL="" sudo pbuilder build /_.dsc -# To get/download package: +# To get/download package from PPA: +#---------------------------------- + Add signing key of the Launchpad repository: > gpg --keyserver keyserver.ubuntu.com --recv-key A38BF8FD > sudo apt-key add ~/.gnupg/pubring.gpg diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec index 01940a7fcf0..ffd1e8c5ab5 100755 --- a/build/rpm/dolibarr_generic.spec +++ b/build/rpm/dolibarr_generic.spec @@ -85,7 +85,7 @@ de Recursos Empresariales (ERP) y Gestión de la Relación con los Clientes (CRM) así como para para otras diferentes actividades. Dolibarr ha sido diseñado para suministrarle solamente las funcionalidades que necesita y haciendo hincapié en su facilidad de uso. - + %description -l fr Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs, artisans ou associations. Il permet de gérer vos clients, prospect, @@ -117,7 +117,11 @@ cui hai bisogno ed essere facile da usare. #---- install %install + +%if 0%{?sles_version} +%else %{__rm} -rf $RPM_BUILD_ROOT +%endif %{__mkdir} -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name} %{__install} -m 644 build/rpm/conf.php $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/conf.php @@ -183,10 +187,9 @@ do fi done >>%{name}.lang -%if 0%{?suse_version} +%if 0%{?suse_version} || 0%{?sles_version} # Enable this command to tag desktop file for suse -%suse_update_desktop_file dolibarr - +%suse_update_desktop_file dolibarr Office Finance # Enable this command to allow suse detection of duplicate files and create hardlinks instead %fdupes $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs %endif From 1999452701c4819a5a34ab77f6f62c6678b9a9c8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 23 Oct 2012 23:49:16 +0200 Subject: [PATCH 3/4] Fix: Avoid warnings --- htdocs/core/class/html.form.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 471948cbd59..32f76d60eeb 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -292,8 +292,8 @@ class Form { $tmp=explode(':',$inputType); $inputType=$tmp[0]; - $rows=($tmp[1]?$tmp[1]:'8'); - $cols=($tmp[2]?$tmp[2]:'80'); + $rows=(empty($tmp[1])?'8':$tmp[1]); + $cols=(empty($tmp[2])?'80':$tmp[2]); } else if (preg_match('/^ckeditor/',$inputType)) { From aefbebe833d44a9e4e7f4f812b857d40ce04f2f3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 24 Oct 2012 02:15:47 +0200 Subject: [PATCH 4/4] Start README to describe usage of OBS packaging platform --- build/obs/README | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 build/obs/README diff --git a/build/obs/README b/build/obs/README new file mode 100644 index 00000000000..0d0e99ffb51 --- /dev/null +++ b/build/obs/README @@ -0,0 +1,19 @@ +README (English) +################################################## +OBS Package tools +################################################## + +This directory contains files to explain how to publish +a package onto OBS + + +# Create a project onto OBS +#---------------------------------- +https://build.opensuse.org + + +Add attributes: +OBS:Screenshots URL of screenshot +OBS:QualityCategory Development|Testing|Stable|Private +OBS:Maintained 1 +