From 5715233fb02eac74b4bad44f6a4debc8025ef8d8 Mon Sep 17 00:00:00 2001
From: Speed <infinity.speed03@gmail.com>
Date: Wed, 18 Jan 2017 19:38:50 +0100
Subject: [PATCH] Updated script sync members from LDAP

Replace "Cotisation" class with its new name "Subscription"
---
 scripts/members/sync_members_ldap2dolibarr.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/members/sync_members_ldap2dolibarr.php b/scripts/members/sync_members_ldap2dolibarr.php
index 2319a10a0fd..e7adb80e733 100755
--- a/scripts/members/sync_members_ldap2dolibarr.php
+++ b/scripts/members/sync_members_ldap2dolibarr.php
@@ -38,7 +38,7 @@ require_once($path."../../htdocs/master.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/core/lib/date.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/core/class/ldap.class.php");
 require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php");
-require_once(DOL_DOCUMENT_ROOT."/adherents/class/cotisation.class.php");
+require_once(DOL_DOCUMENT_ROOT."/adherents/class/subscription.class.php");
 
 $langs->load("main");
 $langs->load("errors");
@@ -291,7 +291,7 @@ if ($result >= 0)
 			{
 				// Cree premiere cotisation et met a jour datefin dans adherent
 				//print "xx".$datefirst."\n";
-				$crowid=$member->cotisation($datefirst, $pricefirst, 0);
+				$crowid=$member->subscription($datefirst, $pricefirst, 0);
 			}
 
 			// Insert last subscription
@@ -299,7 +299,7 @@ if ($result >= 0)
 			{
 				// Cree derniere cotisation et met a jour datefin dans adherent
 				//print "yy".dol_print_date($datelast)."\n";
-				$crowid=$member->cotisation($datelast, $pricelast, 0);
+				$crowid=$member->subscription($datelast, $pricelast, 0);
 			}
 
 		}
-- 
GitLab