Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1386 connectés 

 


 Mot :   Pseudo :  
  Aller à la page :
 
 Page :   1  2  3  4  5  ..  188  189  190  191  192  193
Auteur Sujet :

[Topic Outil] sauvegardez le contenu de votre presse papier

n°2275102
-the_unfor​given-
frakkinn home : 1123.6536.5321
Posté le 05-02-2016 à 23:15:26  profilanswer
 

Reprise du message précédent :
  DGV_PartsNumber.Rows(hti.RowIndex).Selected = True


---------------
FACEBOUKE , bordel a photos :o
mood
Publicité
Posté le 05-02-2016 à 23:15:26  profilanswer
 

n°2275184
Tristou
This is where the fun begins
Posté le 08-02-2016 à 13:43:25  profilanswer
 

-> supprimer sidebar avec les logos


---------------
"About your cat Mr. Schrödinger : I have good news and bad news"
n°2275463
masklinn
í dag viðrar vel til loftárása
Posté le 11-02-2016 à 13:49:21  profilanswer
 

http://xkcd.com/378/


---------------
Stick a parrot in a Call of Duty lobby, and you're gonna get a racist parrot. — Cody
n°2275614
-the_unfor​given-
frakkinn home : 1123.6536.5321
Posté le 14-02-2016 à 00:52:27  profilanswer
 
n°2275615
flo850
moi je
Posté le 14-02-2016 à 00:55:35  profilanswer
 

UPDATE activite_agent JOIN ( select
aa_old.id,aa_new.debut,aa_new.fin,aa_new.duree,aa_new.duree_indemnise,vaarp.reste_a_payer,aa_new.cout
 from v_activite_agent_reste_a_paye vaarp
 inner join activite_agent aa_old on vaarp.activite_agent_id = aa_old.id
 inner join activite_agent aa_new on
 aa_new.activite_id = aa_old.activite_id
 and aa_new.debut = aa_old.debut
 and aa_new.agent_id = aa_old.agent_id
 and aa_new.cout = -1 * vaarp.reste_a_payer
 WHERE reste_a_payer < 0 and aa_new.statut_paiement  is null

 

) as t ON t.id = activite_agent.id
SET
activite_agent.duree= t.duree,
activite_agent.fin = t.fin,
activite_agent.duree_indemnise = t.duree_indemnise,
activite_agent.cout = t.cout

 

puis effacement des lignes avec statut paiement null

 


recoller les aai a labonne aa

  

UPDATE activite_agent_indemnisation aai,activite_agent aa
SET aai.activite_agent_id = (
select aa_new.id  FROM activite_agent aa_new
 WHERE
  aa.activite_id = aa_new.activite_id
  AND aa_new.debut = aa.debut
  and aa_new.agent_id = aa.agent_id
  and aa_new.type_paiement = aa.type_paiement
 ORDER BY aa_new.cout DESC, aa_new.id desc
  LIMIT 1
)  

 

where aa.duree = 0 AND  aai.activite_agent_id = aa.id  

 

where aa.duree = 0 AND  aai.activite_agent_id = aa.id  

 


virer les cadavres :

 

delete  aa.* from activite a ,activite_agent aa   where aa.activite_id = a.id and aa.duree= 0 and aa.debut = aa.fin and  not
exists (select 1 from activite_agent_indemnisation aai where activite_agent_id = aa.id) ;


Message édité par flo850 le 11-03-2016 à 17:04:23

---------------

n°2275922
Tristou
This is where the fun begins
Posté le 19-02-2016 à 16:58:20  profilanswer
 

Hello, I love you
Let me jump in your game


---------------
"About your cat Mr. Schrödinger : I have good news and bad news"
n°2277104
flo850
moi je
Posté le 07-03-2016 à 09:21:19  profilanswer
 

installer cordova  
 set JAVA_OPTS=-Dhttp.proxyHost=10.0.1.1 -Dhttp.proxyPort=3128 -Dhttp.proxyUser=partner -Dhttp.proxyPasswo
rd=partenaire -Dhttps.proxyHost=10.0.1.1 -Dhttps.proxyPort=3128 -Dhttps.proxyUser=partner -Dhttps.proxyPassword=
partenaire -Dsdk.dir=C:/Users/flonumero/AppData/Local/Android/android-sdk
 
 
ionic : SET PROXY=


---------------

n°2277394
souk
Tourist
Posté le 10-03-2016 à 10:42:00  profilanswer
 
n°2277398
masklinn
í dag viðrar vel til loftárása
Posté le 10-03-2016 à 11:33:30  profilanswer
 

https://www.youtube.com/watch?v=YZPKR7HzM_s


---------------
Stick a parrot in a Call of Duty lobby, and you're gonna get a racist parrot. — Cody
n°2277454
Tristou
This is where the fun begins
Posté le 10-03-2016 à 20:37:42  profilanswer
 

journey to the center of the tardis


---------------
"About your cat Mr. Schrödinger : I have good news and bad news"
mood
Publicité
Posté le 10-03-2016 à 20:37:42  profilanswer
 

n°2277529
-the_unfor​given-
frakkinn home : 1123.6536.5321
Posté le 13-03-2016 à 07:21:42  profilanswer
 
n°2278656
souk
Tourist
Posté le 31-03-2016 à 13:42:32  profilanswer
 
n°2278658
masklinn
í dag viðrar vel til loftárása
Posté le 31-03-2016 à 14:00:53  profilanswer
 

Top-Down operator precedence


---------------
Stick a parrot in a Call of Duty lobby, and you're gonna get a racist parrot. — Cody
n°2278825
sligor
Posté le 02-04-2016 à 20:25:26  profilanswer
 

http://img4.hostingpics.net/pics/301784MYLUNGSHAVECOLLAPSED.gif


---------------
qwerty-fr
n°2279214
flo850
moi je
Posté le 09-04-2016 à 13:41:47  profilanswer
 

React requirejs https://github.com/philix/jsx-requirejs-plugin


---------------

n°2279217
masklinn
í dag viðrar vel til loftárása
Posté le 09-04-2016 à 14:39:00  profilanswer
 

Kenryll'ah


---------------
Stick a parrot in a Call of Duty lobby, and you're gonna get a racist parrot. — Cody
n°2279311
Chelmi18
Posté le 12-04-2016 à 08:47:06  profilanswer
 

- sese.029.001.03 R
- sese.031.001.03 R
- sese.023.001.03 W/R
- sese.024.001.03 R
- sese.025.001.03 R
- sese.027.001.03 R
- camt.053.001.03 R
- semt.002.001.05 R
- semt.017.001.03 R
- semt.020.001.03 R
- head.001.001.01 W

n°2279414
masklinn
í dag viðrar vel til loftárása
Posté le 13-04-2016 à 19:12:45  profilanswer
 

It was needed in an older version before I put leftpad into my kernel. You can probably remove that line.


---------------
Stick a parrot in a Call of Duty lobby, and you're gonna get a racist parrot. — Cody
n°2279480
Tristou
This is where the fun begins
Posté le 14-04-2016 à 15:57:36  profilanswer
 

https://www.youtube.com/watch?v=Sw9 [...] tml5=False


---------------
"About your cat Mr. Schrödinger : I have good news and bad news"
n°2279574
flo850
moi je
Posté le 16-04-2016 à 17:31:04  profilanswer
 

SITAC SVG : http://codepen.io/anon/pen/aNGpLj


---------------

n°2279654
souk
Tourist
Posté le 18-04-2016 à 17:48:46  profilanswer
 

http://forums.androidcentral.com/m [...] tures.html


---------------
L'inventeur de la cédille est un certain monsieur Groçon .
n°2279703
souk
Tourist
Posté le 19-04-2016 à 11:20:57  profilanswer
 

http://asciiwwdc.com/


---------------
L'inventeur de la cédille est un certain monsieur Groçon .
n°2280643
sligor
Posté le 02-05-2016 à 23:37:32  profilanswer
 

http://reho.st/self/fcd3b6d5a21e07c82c3dd35fde65bc1e2079dc51.jpg


---------------
qwerty-fr
n°2282101
Profil sup​primé
Posté le 23-05-2016 à 20:08:33  answer
 


Je dis ce que je fais.
Je conçois ce que je dis.
Je comprends ce que je conçois.
Je prévois ce que je comprends.
Je deviens ce que je prévois.
Je fais ce que je deviens.

n°2282404
-the_unfor​given-
frakkinn home : 1123.6536.5321
Posté le 26-05-2016 à 20:26:53  profilanswer
 


<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/styles/Streams.xsl"?>
<MTConnectStreams xmlns:m="urn:mtconnect.org:MTConnectStreams:1.3" xmlns="urn:mtconnect.org:MTConnectStreams:1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mtconnect.org:MTConnectStreams:1.3 /schemas/MTConnectStreams_1.3.xsd">
  <Header creationTime="2016-05-26T18:36:06Z" sender="mtcagent" instanceId="1425445166" version="1.3.0.9" bufferSize="131072" nextSequence="8842856099" firstSequence="8842725027" lastSequence="8842856098"/>
  <Streams>
    <DeviceStream name="VMC-3Axis" uuid="000">
      <ComponentStream component="Rotary" name="C" componentId="c1">
        <Samples>
          <SpindleSpeed dataItemId="c2" timestamp="2016-05-26T18:35:15.737933" name="Sspeed" sequence="8842842239" subType="ACTUAL">3400.0000000000</SpindleSpeed>
          <SpindleSpeed dataItemId="c3" timestamp="2016-05-26T18:26:54.817374" name="Sovr" sequence="8842707062" subType="OVERRIDE">100.0000000000</SpindleSpeed>
          <Load dataItemId="cl3" timestamp="2015-03-04T04:59:26.531505Z" name="Cload" sequence="15">UNAVAILABLE</Load>
        </Samples>
        <Events>
          <RotaryMode dataItemId="cm" timestamp="2015-03-04T04:59:26.531505Z" name="Cmode" sequence="18">SPINDLE</RotaryMode>
        </Events>
        <Condition>
          <Normal dataItemId="Cloadc" timestamp="2016-05-26T18:26:54.818086" sequence="8842707069" type="LOAD"/>
          <Unavailable dataItemId="Csystem" timestamp="2015-03-04T04:59:26.531505Z" sequence="2" type="SYSTEM"/>
        </Condition>
      </ComponentStream>
      <ComponentStream component="Controller" name="controller" componentId="cn1">
        <Events>
          <EmergencyStop dataItemId="estop" timestamp="2016-05-26T18:26:54.817374" sequence="8842707063">ARMED</EmergencyStop>
          <Message dataItemId="msg" timestamp="2015-03-04T04:59:26.531505Z" sequence="35">UNAVAILABLE</Message>
        </Events>
        <Condition>
          <Normal dataItemId="clp" timestamp="2016-05-26T18:26:54.818577" sequence="8842707073" type="LOGIC_PROGRAM"/>
          <Unavailable dataItemId="motion" timestamp="2015-03-04T04:59:26.531505Z" sequence="34" type="MOTION_PROGRAM"/>
          <Unavailable dataItemId="system" timestamp="2015-03-04T04:59:26.531505Z" sequence="38" type="SYSTEM"/>
        </Condition>
      </ComponentStream>
      <ComponentStream component="Coolant" name="coolant" componentId="cool">
        <Condition>
          <Normal dataItemId="clow" timestamp="2016-05-26T18:26:54.817525" sequence="8842707065" type="LEVEL"/>
          <Unavailable dataItemId="coolantmotor" timestamp="2015-03-04T04:59:26.531505Z" sequence="25" type="ACTUATOR"/>
          <Unavailable dataItemId="coolpres" timestamp="2015-03-04T04:59:26.531505Z" sequence="26" type="PRESSURE"/>
          <Unavailable dataItemId="filter" timestamp="2015-03-04T04:59:26.531505Z" sequence="30" type="x:FILTER"/>
        </Condition>
      </ComponentStream>
      <ComponentStream component="Device" name="VMC-3Axis" componentId="dev">
        <Events>
          <Availability dataItemId="avail" timestamp="2016-05-26T18:26:54.817374" sequence="8842707064">AVAILABLE</Availability>
          <AssetChanged dataItemId="dev_asset_chg" timestamp="2015-03-04T04:59:26.531505Z" sequence="27" assetType="">UNAVAILABLE</AssetChanged>
          <AssetRemoved dataItemId="dev_asset_rem" timestamp="2015-03-04T04:59:26.531505Z" sequence="28" assetType="">UNAVAILABLE</AssetRemoved>
        </Events>
      </ComponentStream>
      <ComponentStream component="Electric" name="electric" componentId="el">
        <Events>
          <PowerState dataItemId="p2" timestamp="2016-05-26T18:26:54.817374" name="power" sequence="8842707047">ON</PowerState>
        </Events>
      </ComponentStream>
      <ComponentStream component="Hydraulic" name="hydrolic" componentId="hsys">
        <Condition>
          <Normal dataItemId="hlow" timestamp="2016-05-26T18:26:54.817668" sequence="8842707066" type="LEVEL"/>
          <Normal dataItemId="hpres" timestamp="2016-05-26T18:26:54.817826" sequence="8842707067" type="PRESSURE"/>
          <Normal dataItemId="htemp" timestamp="2016-05-26T18:31:50.903553" sequence="8842789860" type="TEMPERATURE"/>
        </Condition>
      </ComponentStream>
      <ComponentStream component="Path" name="path" componentId="pth">
        <Samples>
          <PathFeedrate dataItemId="Fovr" timestamp="2016-05-26T18:26:54.817374" sequence="8842707061">100.0000000000</PathFeedrate>
          <PathFeedrate dataItemId="Frt" timestamp="2016-05-26T18:36:06.556630" sequence="8842856070">0.4</PathFeedrate>
          <PathPosition dataItemId="Ppos" timestamp="2015-03-04T04:59:26.531505Z" sequence="5" subType="ACTUAL">UNAVAILABLE</PathPosition>
        </Samples>
        <Events>
          <Block dataItemId="cn2" timestamp="2016-05-26T18:36:06.544215" name="block" sequence="8842856065">X-1.487506 Y1.031226</Block>
          <ControllerMode dataItemId="cn3" timestamp="2016-05-26T18:26:54.817374" name="mode" sequence="8842707059">AUTOMATIC</ControllerMode>
          <Line dataItemId="cn4" timestamp="2016-05-26T18:36:06.544215" name="line" sequence="8842856060">102</Line>
          <Program dataItemId="cn5" timestamp="2016-05-26T18:26:54.817374" name="program" sequence="8842707058">FLANGE_CAM.NGC</Program>
          <Execution dataItemId="cn6" timestamp="2016-05-26T18:35:16.211305" name="execution" sequence="8842842402">ACTIVE</Execution>
          <ToolId dataItemId="cnt1" timestamp="2015-03-04T04:59:26.531505Z" name="tool_id" sequence="24">UNAVAILABLE</ToolId>
        </Events>
      </ComponentStream>
      <ComponentStream component="Linear" name="X" componentId="x1">
        <Samples>
          <Load dataItemId="n3" timestamp="2015-03-04T04:59:26.531505Z" name="Xload" sequence="36">UNAVAILABLE</Load>
          <Position dataItemId="x2" timestamp="2016-05-26T18:36:06.679312" name="Xact" sequence="8842856095" subType="ACTUAL">-1.5551706553</Position>
          <Position dataItemId="x3" timestamp="2016-05-26T18:36:06.679312" name="Xcom" sequence="8842856097" subType="COMMANDED">-1.5513021580</Position>
        </Samples>
        <Condition>
          <Normal dataItemId="Xloadc" timestamp="2016-05-26T18:26:54.818245" sequence="8842707070" type="LOAD"/>
          <Unavailable dataItemId="Xsystem" timestamp="2015-03-04T04:59:26.531505Z" sequence="7" type="SYSTEM"/>
        </Condition>
      </ComponentStream>
      <ComponentStream component="Linear" name="Y" componentId="y1">
        <Samples>
          <Position dataItemId="y2" timestamp="2016-05-26T18:36:06.679312" name="Yact" sequence="8842856096" subType="ACTUAL">0.9250104427</Position>
          <Position dataItemId="y3" timestamp="2016-05-26T18:36:06.679312" name="Ycom" sequence="8842856098" subType="COMMANDED">0.9310829275</Position>
          <Load dataItemId="y4" timestamp="2015-03-04T04:59:26.531505Z" name="Yload" sequence="43">UNAVAILABLE</Load>
        </Samples>
        <Condition>
          <Normal dataItemId="Yloadc" timestamp="2016-05-26T18:26:54.818367" sequence="8842707071" type="LOAD"/>
          <Unavailable dataItemId="Ysystem" timestamp="2015-03-04T04:59:26.531505Z" sequence="9" type="SYSTEM"/>
        </Condition>
      </ComponentStream>
      <ComponentStream component="Linear" name="Z" componentId="z1">
        <Samples>
          <Position dataItemId="z2" timestamp="2016-05-26T18:35:20.461443" name="Zact" sequence="8842843346" subType="ACTUAL">-0.1000000015</Position>
          <Position dataItemId="z3" timestamp="2016-05-26T18:35:20.436726" name="Zcom" sequence="8842843335" subType="COMMANDED">-0.1000000000</Position>
          <Load dataItemId="z4" timestamp="2015-03-04T04:59:26.531505Z" name="Zload" sequence="46">UNAVAILABLE</Load>
        </Samples>
        <Condition>
          <Normal dataItemId="Zloadc" timestamp="2016-05-26T18:26:54.818477" sequence="8842707072" type="LOAD"/>
          <Unavailable dataItemId="Zsystem" timestamp="2015-03-04T04:59:26.531505Z" sequence="11" type="SYSTEM"/>
        </Condition>
      </ComponentStream>
    </DeviceStream>
  </Streams>
</MTConnectStreams>


---------------
FACEBOUKE , bordel a photos :o
n°2282405
masklinn
í dag viðrar vel til loftárása
Posté le 26-05-2016 à 20:32:02  profilanswer
 

Innervate × 2   0
Wild Growth × 2   2
Wrath × 2   2
Klaxxi Amber-Weaver  × 2   4
Mire Keeper  × 2   4
Swipe × 2   4
Druid of the Claw × 2   5
Nourish × 1   5
Dark Arakkoa  × 2   6
Ancient of War × 1   7
Neutral Cards (12)
Name Cost
Beckoner of Evil  × 2   2
Disciple of C'Thun  × 2   3
Twilight Elder  × 2   3
C'Thun's Chosen  × 2   4
Ancient Harbinger  × 1   6
Sylvanas Windrunner × 1   6
Twin Emperor Vek'lor  × 1   7
C'Thun  × 1  


---------------
Stick a parrot in a Call of Duty lobby, and you're gonna get a racist parrot. — Cody
n°2282408
Dion
Acceuil
Posté le 26-05-2016 à 22:34:55  profilanswer
 

Genre du wow


---------------
When it comes to business/legal topics, just assume almost everyone commenting has no idea what they’re taking about and have no background in these subjects because that’s how it really is. Harkonnen 8-> Elmoricq 8====>
n°2283317
p@radox
Posté le 08-06-2016 à 15:53:25  profilanswer
 

name, capacity, disabledPersonGauge

n°2283609
-the_unfor​given-
frakkinn home : 1123.6536.5321
Posté le 13-06-2016 à 20:07:12  profilanswer
 

* 100 / total_CTIME


---------------
FACEBOUKE , bordel a photos :o
n°2283745
neriki
oenologue
Posté le 16-06-2016 à 12:26:15  profilanswer
 

PROCEDURE PRIVÉE ConstruitReq()
 
sReq est une chaîne
 
sPartReq est une chaîne
 
nRooms est un entier = stParamDevis.tabRoom..Occurrence
 
//bOnRequest est un booléen = stParamDevis.bEnableOnRequest
 
sReq = [
 /* REQUETE */
 
 SELECT
 idHotel,
 qry_Fin.idChannelManager,
 ROUND(globalschema.VerifSupplementTest(idHotel,@CodeClient,@DateDeb,@DateFin,TotalPrice,@Application),2) AS TotalPrice,
 -- GG MODIF BDD
 -- TotalPrice,
 TotalPrice-TotalPriceBase AS TotalPromo,
 isPromo,
 f.nom,
 f.latitude,
 f.longitude,
 f.CDService,
 CONCAT(f.rue,' ',f.suite,' ',f.CP,' ',f.ville) AS adresse,
 IF(INSTR(f.typologie,'l')=0, 0, 1) AS bCoeur,
 #p.Notes_Enfant,
 IF( (@nbChild1 != 0 AND mts1.bDouble = 1 )  
]
POUR i=2 _A_ nRooms
 sPartReq = [
  OR (@nbChild%1 != 0 AND mts%1.bDouble = 1 )  
 ]
 sReq += ChaîneConstruit(sPartReq,i)
FIN
sReq += [
 , p.Notes_Enfant, "" ) AS Notes_Enfant,
 i.Image,
 d.Description,
 f.COCAT as nEtoiles,
 f.Region,
 f.Ville,
 f.Nom_qu,
 f.AccesWeb,
 f.idActivite_Touristique,
 f.CP,
 cmc.idChannel_Manager,
 f.TYPOLOGIE,
 IF(cgmc.IDCLIENT_GESTION_MAJ_CONTRAT IS NULL, 0, 1) AS bPrefere,
 TotalPrice,
 
 idRoomCategory_1,
 IF(f.CDService = 'A', CONCAT(@NbPaxDem1+@nbChild1,' PAX ', IF(@bTwin1, 'TWIN', '')),  
 CASE  
 WHEN mts1.bDouble=1 THEN 'DOUBLE'
 WHEN mts1.bSingle=1 THEN 'SINGLE'
 WHEN mts1.bTwin=1 THEN 'TWIN'
 WHEN mts1.bTriple=1 THEN 'TRIPLE'
 WHEN mts1.bQuad=1 THEN 'QUAD'
 ELSE '_'
 END
 ) AS idRoomService_1,
 
 -- AJOUT CALCUL SUPPLEMENT --
 -- AdultPrice_1,
 -- AdultPrice_1-AdultPriceBase_1 AS PromoPrice_1,
 
 ROUND(globalschema.VerifSupplementTest(idHotel,@CodeClient,@DateDeb,@DateFin,AdultPrice_1,@Application),2) AS AdultPrice_1,
 AdultPrice_1-AdultPriceBase_1 AS PromoPrice_1,
 
 LibellePromo_1,
 Inv_1,
 Designation_1,
 Regime_1
 
 
]
POUR i=2 _A_ nRooms
 sPartReq = [
  ,
  idRoomCategory_%1,
  IF(f.CDService = 'A', CONCAT(@NbPaxDem%1+@nbChild%1,' PAX ', IF(@bTwin%1, 'TWIN', '')),  
  CASE  
  WHEN mts%1.bDouble=1 THEN 'DOUBLE'
  WHEN mts%1.bSingle=1 THEN 'SINGLE'
  WHEN mts%1.bTwin=1 THEN 'TWIN'
  WHEN mts%1.bTriple=1 THEN 'TRIPLE'
  WHEN mts%1.bQuad=1 THEN 'QUAD'
  ELSE '_'
  END
  ) AS idRoomService_%1,
   
  -- AJOUT CALCUL SUPPLEMENT --
  -- AdultPrice_%1,
  -- AdultPrice_%1-AdultPriceBase_%1 AS PromoPrice_%1,
   
  ROUND(globalschema.VerifSupplementTest(idHotel,@CodeClient,@DateDeb,@DateFin,AdultPrice_%1,@Application),2) AS AdultPrice_%1,
  AdultPrice_%1-AdultPriceBase_%1 AS PromoPrice_%1,
   
  LibellePromo_%1,
  Inv_%1,
  Designation_%1,
  Regime_%1
   
   
 ]
 sReq += ChaîneConstruit(sPartReq,i)
FIN
 
sReq += [
 
 FROM(
 
 
 SELECT
 idHotel_1 AS idHotel,
 idChannelManager_1 AS idChannelManager,
 ROUND(TotalPrice,2) AS TotalPrice,
 ROUND(TotalPriceBase,2) AS TotalPriceBase,
 isPromo,
 
 idRoomCategory_1,
 idRoomService_1,
 ROUND(AdultPrice_1,2) AS AdultPrice_1,
 ROUND(AdultPriceBase_1,2) AS AdultPriceBase_1,
 LibellePromo_1,
 Inv_1,
 Designation_1,
 Regime_1
]
 
POUR i=2 _A_ nRooms
 sPartReq = [
  ,
   
  idRoomCategory_%1,
  idRoomService_%1,
  ROUND(AdultPrice_%1,2) AS AdultPrice_%1,
  ROUND(AdultPriceBase_%1,2) AS AdultPriceBase_%1,
  LibellePromo_%1,
  Inv_%1,
  Designation_%1,
  Regime_%1
 ]
 sReq += ChaîneConstruit(sPartReq,i)
 
FIN
 
sReq += [
 
 FROM
 (
 SELECT
 qry1.*,
 AdultPrice_1
 
]
POUR i=2 _A_ nRooms
 sPartReq = [
  +AdultPrice_%1
   
 ]
 sReq += ChaîneConstruit(sPartReq,i)
 
FIN
 
sReq += [
 AS TotalPrice,
 AdultPriceBase_1
 
]
POUR i=2 _A_ nRooms
 sPartReq = [
  +AdultPriceBase_%1
   
 ]
 sReq += ChaîneConstruit(sPartReq,i)
 
FIN
 
sReq += [
 AS TotalPriceBase
 FROM
 (
 SELECT
 idRate_1,
 
 idHotel_1,
 idChannelManager_1,
 
 IF(COUNT(DISTINCT IdPromo_1)
]
 
POUR i=2 _A_ nRooms
 sPartReq = [
  +COUNT(DISTINCT IdPromo_%1)
 ]
 sReq += ChaîneConstruit(sPartReq,i)
 
FIN
 
sReq += [
 >0 ,1, 0) AS isPromo,
 
 idRoomCategory_1,
 idRoomGroup_1,
 idRoomService_1,
 IF(
 MAX(cnt_promo)>1 OR COUNT(DISTINCT IdPromo_1)>1,
 ROUND(globalschema.promoCumulMulti(idHotel_1,idChannelManager_1,idRoomCategory_1,idRoomGroup_1,idRoomService_1,idRate_1,duree,
 (MAX(cnt_promo)>1 OR COUNT(DISTINCT IdPromo_1)>1)),2),
 
 SUM(AdultPrice_1)) AS AdultPrice_1,
 SUM(AdultPriceBase_1) AS AdultPriceBase_1,
 
 --  SUPRESSION ARRONDI --
 --  ROUND(SUM(AdultPrice_1),0)) AS AdultPrice_1,
 --  ROUND(SUM(AdultPriceBase_1),0) AS AdultPriceBase_1,
 
 
 IF(
 MAX(cnt_promo)>1 OR COUNT(DISTINCT IdPromo_1)>1,
 @LibellePromo ,
 MAX(LibellePromo_1))
 AS LibellePromo_1,
 MIN(Inv_1) AS Inv_1,
 COUNT(DISTINCT IdPromo_1) AS nbPromo_1,
 Designation_1,
 Regime_1,
 
 
]
 
POUR i=2 _A_ nRooms
 sPartReq = [
  idHotel_%1,
  idChannelManager_%1,
  idRoomCategory_%1,
  idRoomGroup_%1,
  idRoomService_%1,
  IF(
  MAX(cnt_promo)>1 OR COUNT(DISTINCT IdPromo_%1)>1,
  ROUND(globalschema.promoCumulMulti(idHotel_1,idChannelManager_1,idRoomCategory_%1,idRoomGroup_%1,idRoomService_%1,idRate_1,duree,
  (MAX(cnt_promo)>1 OR COUNT(DISTINCT IdPromo_1)>1)),2),
   
  SUM(AdultPrice_%1)) AS AdultPrice_%1,
  SUM(AdultPriceBase_%1) AS AdultPriceBase_%1,
   
  -- SUPPRESSION ARRONDI --  
  -- ROUND(SUM(AdultPrice_%1),0)) AS AdultPrice_%1,
  -- ROUND(SUM(AdultPriceBase_%1),0) AS AdultPriceBase_%1,
   
   
  IF(
  MAX(cnt_promo)>1 OR COUNT(DISTINCT IdPromo_%1)>1,
  @LibellePromo ,
  MAX(LibellePromo_%1))
  AS LibellePromo_%1,
  MIN(Inv_%1) AS Inv_%1,
  COUNT(DISTINCT IdPromo_%1) AS nbPromo_%1,
  Designation_%1,
  Regime_%1,  
 ]
 sReq += ChaîneConstruit(sPartReq,i)
 
FIN
 
sReq += [
 
 MAX(cnt_promo) AS nbPromo_Jour,
 IF(duree=0, COUNT(*), duree) AS cnt
 
 
 FROM(
 /**/
 
 SELECT
 i1.Jour AS Jour_1,
 
 i1.idRate AS idRate_1,
 
 i1.duree,
 
 ro1.idHotel AS idHotel_1,
 ro1.idChannelManager AS idChannelManager_1,
 ro1.idRoomCategory AS idRoomCategory_1,
 ro1.idRoomGroup AS idRoomGroup_1,
 ro1.idRoomService AS idRoomService_1,
 CASE p1.TypePromo
 WHEN 1 THEN i1.AdultPrice*(1-i1.commission)*(1+i1.marge)*( 1-p1.ValeurReduc )
 WHEN 2 THEN i1.AdultPrice*(1-i1.commission)*(1+i1.marge)*( 1-p1.ValeurReduc )
 WHEN 3 THEN i1.AdultPrice*(1-i1.commission)*(1+i1.marge)-p1.ValeurReduc
 ELSE i1.AdultPrice*(1-i1.commission)*(1+i1.marge)
 END AS AdultPrice_1,
 i1.AdultPrice*(1-i1.commission)*(1+i1.marge) AS AdultPriceBase_1,
 i1.Inv AS Inv_1,
 p1.IdPromo AS IdPromo_1,
 p1.libelle AS LibellePromo_1,
 ro1.Designation as Designation_1,
 i1.Regime AS Regime_1,
 
 
]
 
POUR i=2 _A_ nRooms
 sPartReq = [
  ro%1.idHotel AS idHotel_%1,
  ro%1.idChannelManager AS idChannelManager_%1,
  ro%1.idRoomCategory AS idRoomCategory_%1,
  ro%1.idRoomGroup AS idRoomGroup_%1,
  ro%1.idRoomService AS idRoomService_%1,
  CASE p%1.TypePromo
  WHEN 1 THEN i%1.AdultPrice*(1-i%1.commission)*(1+i%1.marge)*( 1-p%1.ValeurReduc )
  WHEN 2 THEN i%1.AdultPrice*(1-i%1.commission)*(1+i%1.marge)*( 1-p%1.ValeurReduc )
  WHEN 3 THEN i%1.AdultPrice*(1-i%1.commission)*(1+i%1.marge)-p%1.ValeurReduc
  ELSE i%1.AdultPrice*(1-i%1.commission)*(1+i%1.marge)
  END AS AdultPrice_%1,
  i%1.AdultPrice*(1-i%1.commission)*(1+i%1.marge) AS AdultPriceBase_%1,
  i%1.Inv AS Inv_%1,
  p%1.IdPromo AS IdPromo_%1,
  p%1.libelle AS LibellePromo_%1,
  ro%1.Designation as Designation_%1,
  i%1.Regime AS Regime_%1,
   
   
 ]
 sReq += ChaîneConstruit(sPartReq,i)
 
FIN
 
sReq += [
 
 COUNT(*) AS cnt_promo
 
 
 FROM globalschema.rooms ro1
 JOIN globalschema.inventories i1
 ON(i1.idHotel = ro1.idHotel AND i1.idChannelManager = ro1.idChannelManager AND i1.idRoomCategory = ro1.idRoomCategory
 AND i1.idRoomGroup = ro1.idRoomGroup AND i1.idRoomService = ro1.idRoomService)
 JOIN globalschema.rates ra1
 ON(ra1.idRate = i1.idRate)
 LEFT JOIN globalschema.Promos p1
 ON(
 /* new */
 p1.Jour = i1.Jour  
 AND p1.CDFourniss = i1.idHotel
 AND p1.CDContrat = @CodeContrat
 AND (p1.NiveauTarifaire = i1.idRoomCategory OR p1.NiveauTarifaire = 0)
 AND (p1.Service = i1.idRoomService OR p1.Service = 0)
 AND (p1.Pays = 0 OR  p1.Pays = @CodePays)
 AND (p1.Client = 0 OR p1.Client = @CodeClient)
 AND i1.idChannelManager IN ('RT', 'GE')
 AND globalschema.verifPromo(p1.IdPromo,p1.Jour,p1.CDFourniss,p1.CDContrat,p1.DateLimite,p1.NtsMin,p1.NtsMax,p1.bCumul,p1.bTjsApplique,p1.ValeurReduc,p1.Pays,p1.Client,p1.NiveauTarifaire,p1.Service,
 p1.binJourArrivee,p1.binJourValidite,p1.nbJoursLimite,p1.bLastNight,p1.bCumul_In,p1.nStay,p1.nPaid,p1.libelle,p1.Ordre,p1.Applicabilite,p1.bPromoLibelle,p1.bForfait,p1.bAchat,p1.bVente,p1.TypePromo,p1.DateDebPromo,p1.DateFinPromo)
 )
 
 
]
 
POUR i=2 _A_ nRooms
 sPartReq = [
  JOIN globalschema.rooms ro%1
  ON(ro1.idHotel = ro%1.idHotel)
  JOIN globalschema.inventories i%1
  ON(i%1.idHotel = ro%1.idHotel AND i%1.idChannelManager = ro%1.idChannelManager AND i%1.idRoomCategory = ro%1.idRoomCategory
  AND i%1.idRoomGroup = ro%1.idRoomGroup AND i%1.idRoomService = ro%1.idRoomService)
  JOIN globalschema.rates ra%1
  ON(ra%1.idRate = i%1.idRate)
  LEFT JOIN globalschema.Promos p%1
  ON(p%1.Jour = i%1.Jour AND p%1.CDFourniss = i%1.idHotel
  AND p%1.CDContrat = @CodeContrat
  AND (p%1.NiveauTarifaire = i%1.idRoomCategory OR p%1.NiveauTarifaire = 0)
  AND (p%1.Service = i%1.idRoomService OR p%1.Service = 0)
  AND i%1.idChannelManager IN ('RT', 'GE')
  AND (p%1.Pays = 0 OR  p%1.Pays = @CodePays)
  AND (p%1.Client = 0 OR p%1.Client = @CodeClient)
  AND globalschema.verifPromo(p%1.IdPromo,p%1.Jour,p%1.CDFourniss,p%1.CDContrat,p%1.DateLimite,p%1.NtsMin,p%1.NtsMax,p%1.bCumul,p%1.bTjsApplique,p%1.ValeurReduc,p%1.Pays,p%1.Client,p%1.NiveauTarifaire,p%1.Service,
  p%1.binJourArrivee,p%1.binJourValidite,p%1.nbJoursLimite,p%1.bLastNight,p%1.bCumul_In,p%1.nStay,p%1.nPaid,p%1.libelle,p%1.Ordre,p%1.Applicabilite,p%1.bPromoLibelle,p%1.bForfait,p%1.bAchat,p%1.bVente,p%1.TypePromo,p%1.DateDebPromo,p%1.DateFinPromo)
  )
   
   
 ]
 sReq += ChaîneConstruit(sPartReq,i)
 
FIN
 
 
SI PAS EnModeWeb() ALORS
 sReq += [
  JOIN globalschema.fourniss f
  ON(ro1.idHotel = f.cdfourniss)
   
   
  WHERE 1
   
  -- AJOUT CONTROLE SA --
  AND CASE @iTypeAllot
  -- ALLOTEMENT PUBLIC --
  WHEN 1 THEN (ra1.CodeRate = 0)
  -- ALLOTEMENT PUBLIC + SA --
  WHEN 2 THEN (ra1.CodeRate IN (0,@CodeClient) AND IF(ra1.CodeRate <> 0,ra1.CodeRate = @CodeClient,1) )  
  -- SA UNIQUEMENT --
  WHEN 3 THEN (ra1.CodeRate = @CodeClient )
  WHEN 4 THEN (ra1.CodeRate IN (0,@CodeClient))
  ELSE 0
  END  
   
  AND ( IF(@bHotel, f.CDService = 'H', 0) OR IF(@bAppart, f.CDService = 'A', 0) )
   
 ]
SINON
 sReq += [
  JOIN globalschema.fourniss f
  ON(ro1.idHotel = f.cdfourniss)
   
   
  WHERE 1
   
  -- AJOUT CONTROLE SA --
  AND CASE @iTypeAllot
  -- ALLOTEMENT PUBLIC --
  WHEN 1 THEN (i1.Inv > 0 AND ra1.CodeRate = 0)
  -- ALLOTEMENT PUBLIC + SA --
  WHEN 2 THEN (ra1.CodeRate IN (0,@CodeClient) AND IF(ra1.CodeRate <> 0,ra1.CodeRate = @CodeClient,1) AND i1.Inv > 0)  
  -- SA UNIQUEMENT --
  WHEN 3 THEN (ra1.CodeRate = @CodeClient AND i1.Inv > 0)
  ELSE 0
  END  
   
  AND ( IF(@bHotel, f.CDService = 'H', 0) OR IF(@bAppart, f.CDService = 'A', 0) )
   
 ]
FIN
 
 
sReq += [
 
 AND f.region LIKE @region
 AND f.ville LIKE @ville
 AND f.nom_qu LIKE @quartier
 AND f.CP LIKE @CodePostal
 AND f.CDFourniss LIKE @idHotel
 AND f.nom LIKE @nomHotel
 AND f.COCAT LIKE @nbEtoile
 AND IF(@RateName = 'WEB',f.ACCESWEB = 1, 1)
 
 AND i1.Jour BETWEEN @DateDeb AND @DateFin
 AND IF(i1.duree=0, 1, i1.duree = @duree AND i1.jour = @DateDeb)
 
 AND ro1.PaxMax >= @NbPaxDem1+IF(@nbChild1>0, IF(@ageChild11 BETWEEN ro1.AgeMin AND ro1.AgeMax, 0, 1), 0)+IF(@nbChild1>1, IF(@ageChild12 BETWEEN ro1.AgeMin AND ro1.AgeMax, 0, 1), 0)
 AND ro1.NbChild+ro1.PaxMax >= @nbChild1+@NbPaxDem1
 
]
SI PAS stParamDevis.bRechercheVide ALORS
 sReq += [
  AND i1.Inv > 0
   
 ]
FIN
 
sReq += [
 AND IF(ro1.PaxMax = 2, ro1.bTwin = @bTwin1 OR f.CDService = 'A', 1)
 AND (ra1.RateName = @RateName OR ra1.idChannelmanager != 'RT')
 AND ra1.CodeContrat = @CodeContrat
 AND ra1.MinLos <= @duree AND ra1.MaxLos >= @duree
 AND i1.MinLos <= @duree AND i1.MaxLos >= @duree
 AND IF(i1.jour = @DateDeb, i1.CloseOnArrival = 0, 1)
 #AND i1.ReleaseDays <= @ReleaseDays
 AND IF(@niveauTarifaire = 0 OR @niveauTarifaire IS NULL, 1, ro1.idRoomCategory = @niveauTarifaire)
 AND CASE ra1.TypeRate
 WHEN 'CLIENT' THEN ra1.CodeRate = @CodeClient
 WHEN 'PAYS' THEN ra1.CodeRate = @CodePays
 WHEN 'PAYSGROUPE' THEN ra1.CodeRate IN (@CodePaysGroup1, @CodePaysGroup2, @CodePaysGroup3) /* On ne teste que 3 codePaysGroup parceque bon... */
 WHEN 'STD' THEN 1
 ELSE 1
 END
 AND i1.AdultPrice > 0  
]
 
 
POUR i=2 _A_ nRooms
 sPartReq = [
  AND ro%1.PaxMax >= @NbPaxDem%1+IF(@nbChild%1>0, IF(@ageChild%1%2 BETWEEN ro%1.AgeMin AND ro%1.AgeMax, 0, 1), 0)+IF(@nbChild%1>1, IF(@ageChild%1%3 BETWEEN ro%1.AgeMin AND ro%1.AgeMax, 0, 1), 0)
  AND ro%1.NbChild+ro%1.PaxMax >= @nbChild%1+@NbPaxDem%1
  AND i%1.duree = i1.duree
  AND i%1.Jour = i1.Jour
  AND i%1.idRate = i1.idRate
  AND i%1.Inv > 0
  AND IF(ro%1.PaxMax = %1, ro%1.bTwin = @bTwin%1 OR f.CDService = 'A', 1)
  AND IF(@nbChild1 = 0, ro1.PaxMax <= ro%1.PaxMax, 1)
  AND i%1.MinLos <= @duree AND i%1.MaxLos >= @duree
  AND IF(i%1.jour = @DateDeb, i%1.CloseOnArrival = 0, 1)
  #AND i%1.ReleaseDays <= @ReleaseDays
  AND IF(@niveauTarifaire = 0 OR @niveauTarifaire IS NULL, 1, ro%1.idRoomCategory = @niveauTarifaire)
  AND CASE ra%1.TypeRate
  WHEN 'CLIENT' THEN ra%1.CodeRate = @CodeClient
  WHEN 'PAYS' THEN ra%1.CodeRate = @CodePays
  WHEN 'PAYSGROUPE' THEN ra%1.CodeRate IN (@CodePaysGroup1, @CodePaysGroup2, @CodePaysGroup3) /* On ne teste que 3 codePaysGroup parceque bon... */
  WHEN 'STD' THEN 1
  ELSE 1
  END
  AND i%1.AdultPrice > 0
   
   
 ]
 
 
 sReq += ChaîneConstruit(sPartReq,i,1,2)
 
FIN
 
 
SI PAS stParamDevis.bRechercheVide ALORS
 POUR i=1 _A_ nRooms
  sPartReq = [
   AND IF(
   1
   
  ]
  SI i < nRooms ALORS  
   sPartReq += [
    +(i%1.idRoomGroup  =  i%2.idRoomGroup)
     
   ]
  FIN
  sPartReq += [
   > i%1.Inv-i%1.InvContrat
   , i%1.ReleaseDays <= @ReleaseDays
   , 1
   )
   
  ]
  sReq += ChaîneConstruit(sPartReq,i,i+1)
 FIN
FIN
 
 
 
SI PAS stParamDevis.bRechercheVide ALORS
 POUR i=1 _A_ nRooms-1
  sReq += [
   AND 1
  ]
  POUR j=i+1 _A_ nRooms
   sPartReq = [
     
    +(i%1.idRoomGroup  =  i%2.idRoomGroup)  
     
   ]
   sReq += ChaîneConstruit(sPartReq,i,j)
  FIN
  sPartReq = [
   <= i%1.Inv
   
   
  ]
  sReq += ChaîneConstruit(sPartReq,i)
   
 FIN
FIN
 
 
//Optimisation
POUR i=1 _A_ nRooms-1
 POUR j=i+1 _A_ nRooms
  sPartReq = [
   AND IF(i%1.idRoomGroup  =  i%2.idRoomGroup AND @NbPaxDem%1 = @NbPaxDem%2 AND @nbChild%1 = @nbChild%2 AND @bTwin%1 = @bTwin%2, i%1.idRoomService = i%2.idRoomService, 1)  
   
  ]
  sReq += ChaîneConstruit(sPartReq,i,j)
 FIN
FIN
 
 
SI nRooms >= 4  ALORS
 sReq += [
   
  /* Seulement pour les demandes de 4 chambres ou plus */
   
 ]  
 POUR i=1 _A_ nRooms-1
  sPartReq = [
   AND i%1.idRoomCategory = i%2.idRoomCategory
   
  ]
  sReq += ChaîneConstruit(sPartReq,i,i+1)
   
 FIN
FIN
SI nRooms = 3  ALORS
 sReq += [
   
  /* Seulement pour les demandes de 4 chambres ou plus */
   
 ]  
 POUR i=1 _A_ nRooms-1
  sPartReq = [
   AND i%1.idRoomCategory <= i%2.idRoomCategory
   
  ]
  sReq += ChaîneConstruit(sPartReq,i,i+1)
   
 FIN
FIN
 
 
//optimisation appart ***
sReq += [
 AND IF(f.CDSERVICE = 'A' AND i1.idChannelManager = 'RT',
 1
 AND
 CASE @NbPaxDem1+@nbChild1
 WHEN 1 THEN i1.idRoomService = 21040
 WHEN 2 THEN IF(@bTwin1 = 1, i1.idRoomService = 21044, i1.idRoomService = 21040)
 WHEN 3 THEN i1.idRoomService = 21042
 WHEN 4 THEN i1.idRoomService = 21043
 WHEN 5 THEN i1.idRoomService = 21045
 WHEN 6 THEN i1.idRoomService = 21046
 WHEN 7 THEN i1.idRoomService = 21047
 WHEN 8 THEN i1.idRoomService = 21048
 WHEN 9 THEN i1.idRoomService = 21049
 ELSE 1
 END
 
]
POUR i=2 _A_ nRooms
 sPartReq = [
  AND
  CASE @NbPaxDem%1+@nbChild%1
  WHEN 1 THEN i%1.idRoomService = 21040
  WHEN 2 THEN IF(@bTwin%1 = 1, i%1.idRoomService = 21044, i%1.idRoomService = 21040)
  WHEN 3 THEN i%1.idRoomService = 21042
  WHEN 4 THEN i%1.idRoomService = 21043
  WHEN 5 THEN i%1.idRoomService = 21045
  WHEN 6 THEN i%1.idRoomService = 21046
  WHEN 7 THEN i%1.idRoomService = 21047
  WHEN 8 THEN i%1.idRoomService = 21048
  WHEN 9 THEN i%1.idRoomService = 21049
  ELSE 1
  END
   
 ]
 sReq += ChaîneConstruit(sPartReq,i)
 
FIN
sReq += [
 , 1)
 
]
 
// INSERTION EXCLUSION CLIENT POUR CERTAINS HOTELS
sReq += [
 AND NOT EXISTS (SELECT * FROM globalschema.scncltexclu sx WHERE sx.CdCltExclu = @CodeClient AND CdFrsExclu = ro1.idHotel)  
] + RC
 
POUR i=2 _A_ nRooms
 sPartReq = [
  AND NOT EXISTS (SELECT * FROM globalschema.scncltexclu sx WHERE sx.CdCltExclu = @CodeClient AND CdFrsExclu = ro%1.idHotel)  
 ] + RC
 sReq += ChaîneConstruit(sPartReq,i)
FIN
 
sReq += [
 
 GROUP BY  
 ro1.idHotel,
 ro1.idChannelManager,
 ra1.idRate,
 i1.Jour,
 ro1.idRoomCategory,
 -- ATTENTION DESACTIVATION DU GROUP BY SUR LE IDTBLROOMTYPEFRS --
 -- ro1.idRoomGroup,
 ro1.idRoomService,
 IF(ro1.idChannelManager = 'IT',ro1.idRoomGroup,ro1.idRoomService)  
]  
 
POUR i=2 _A_ nRooms
 sPartReq = [
  ,
   
  ro%1.idRoomCategory,
  -- ATTENTION DESACTIVATION DU GROUP BY SUR LE IDTBLROOMTYPEFRS --
  -- ro%1.idRoomGroup,
  ro%1.idRoomService,
  IF(ro%1.idChannelManager = 'IT',ro%1.idRoomGroup,ro%1.idRoomService)  
 ]
 sReq += ChaîneConstruit(sPartReq,i)
 
FIN
 
sReq += [
 
 
 /**/
 ) AS qpromo
 
 GROUP BY  
 idHotel_1,
 idChannelManager_1,
 idRate_1,
 idRoomCategory_1,
 -- ATTENTION DESACTIVATION DU GROUP BY SUR LE IDTBLROOMTYPEFRS --
 -- idRoomGroup_1,
 idRoomService_1,
 IF(idChannelManager_1 = 'IT',idRoomGroup_1,idRoomService_1)  
]
 
 
POUR i=2 _A_ nRooms
 sPartReq = [
  ,
   
  idRoomCategory_%1,
  -- ATTENTION DESACTIVATION DU GROUP BY SUR LE IDTBLROOMTYPEFRS --
  -- idRoomGroup_%1,
  idRoomService_%1,
  IF(idChannelManager_%1 = 'IT',idRoomGroup_%1,idRoomService_%1)
 ]
 sReq += ChaîneConstruit(sPartReq,i)
 
FIN
 
 
sReq += [
 
 
 HAVING cnt = @duree
 
 ) AS qry1
 WHERE 1
 /* critere verif dispo */
 
]
 
 
 
sReq += [
 /* fin critere verif dispo */
 ORDER BY idHotel_1, idChannelManager_1, TotalPrice
 
 ) AS qry2
 
 GROUP BY idHotel_1, IF(@RateName = 'WEB', idHotel_1, idChannelManager_1)
 ORDER BY TotalPrice
 
 
 ) AS qry_Fin
 JOIN globalschema.fourniss f ON(qry_Fin.idHotel = f.CDFourniss)
 JOIN globalschema.cm_codes cmc ON(qry_Fin.idChannelManager = cmc.idChannelManager AND cmc.bActiveNew = 1)
 LEFT JOIN globalschema.prix p ON(qry_Fin.idHotel = p.CDFourniss AND p.Annee = YEAR(@DateDeb) AND p.CDContrat = @CodeContrat)
 LEFT JOIN (
 SELECT CDFourniss,CONCAT(NOM_IM,EXT_IM) AS Image FROM globalschema.images WHERE typdoc = 'I' GROUP BY Cdfourniss ORDER BY pos_im
 ) AS i ON(qry_Fin.idHotel = i.CDFourniss)
 LEFT JOIN globalschema.descript d ON(d.CDFourniss = f.CDFourniss AND IF(@Langue IS NULL, d.CDLangue = 'ANG', d.CDLangue = @Langue))
 LEFT JOIN bdd_channel_manager.mappage_type_service mts1 ON(mts1.idtype_service = qry_Fin.idRoomService_1)
 
]
POUR i=2 _A_ nRooms
 sPartReq = [
  LEFT JOIN bdd_channel_manager.mappage_type_service mts%1 ON(mts%1.idtype_service = qry_Fin.idRoomService_%1)
   
 ]
 sReq += ChaîneConstruit(sPartReq,i)
 
FIN
 
 
// NOUVEAUX CONTRATS on fait référence à ETAT dans fourniss_contrat_info
sReq += [
 LEFT JOIN bdd_channel_manager.Channel_manager cm ON(cm.idChannel_Manager = cmc.idChannel_Manager)
 LEFT JOIN bdd_channel_manager.affiliation_hotel ah ON(ah.cdfourniss = qry_Fin.idHotel AND ah.idAffiliation_channel_manager = cmc.idAffiliation_Channel_Manager)
 LEFT JOIN globalschema.client_gestion_maj_contrat cgmc ON(cgmc.cdclient = @CodeClient AND cgmc.CDCONTRAT = @CodeContrat AND cgmc.ANNEE = YEAR(@DateDeb) AND cgmc.CDFOURNISS = qry_Fin.idHotel)
 
 WHERE 1
 
 AND IF(qry_Fin.idChannelManager != 'RT',  cm.bActivity = 1, 1)
 AND IF(qry_Fin.idChannelManager != 'RT', ah.etat = 5, 1)
 AND IF(qry_Fin.idChannelManager = 'RT',
 
 EXISTS (SELECT fci.CDFOURNISS FROM globalschema.fourniss_contrat_info fci WHERE 1 AND fci.cdfourniss = qry_Fin.idHotel AND fci.CDCONTRAT = @CodeContrat  
 AND IF(MONTH(@DateDeb)>10, fci.ANNEE = YEAR(@DateDeb)+1, fci.ANNEE = YEAR(@DateDeb))
 AND fci.etat = 1
 )
 
 AND EXISTS (SELECT fci.CDFOURNISS FROM globalschema.fourniss_contrat_info fci WHERE 1 AND fci.cdfourniss = qry_Fin.idHotel AND fci.CDCONTRAT = @CodeContrat  
 AND IF(MONTH(@DateFin)>10, fci.ANNEE = YEAR(@DateFin)+1, fci.ANNEE = YEAR(@DateFin))
 AND fci.etat = 1
 )  
 ,1)
 
 
 AND NOT EXISTS(
 SELECT * FROM globalschema.fourniss_contraint fc
 WHERE 1
 AND fc.cdfourniss = qry_Fin.idHotel
 
 -- NON UTILISE
 -- and fc.VILLE = f.Ville
 
 -- AND DATE_SUB(fc.DATE_FIN, INTERVAL 1 DAY) >= DATE(NOW())+0  
 AND fc.DATE_FIN >= DATE(NOW())+0  
 AND fc.CDContrat = @CodeContrat  
 
 AND (
 fc.DATE_DEBUT BETWEEN DATE(@DateDeb)+0 AND DATE_ADD(DATE(@DateFin)+0,INTERVAL 1 DAY)  
 OR DATE_SUB(fc.DATE_FIN, INTERVAL 1 DAY) BETWEEN DATE(@DateDeb)+0 AND DATE_ADD(DATE(@DateFin)+0,INTERVAL 1 DAY)  
 OR DATE(@DateDeb)+0 BETWEEN fc.DATE_DEBUT AND fc.DATE_FIN)
 
 
 -- NON UTILISE
 -- and if(fc.VILLE is not null, fc.VILLE = f.Ville, 1)
 -- AND IF(fc.idType_service != 0, fc.idType_service IN(qry_Fin.idRoomService_1
 
 AND CASE fc.contraint_type
 WHEN 1 THEN fc.NB_JR_MIN > @duree
 WHEN 2 THEN 1
 ELSE 0
 END)
 ;
 
]
 
 
 
RENVOYER sReq


---------------
C'est pas bon, Neriki, tu recommences à glander, là. :o
n°2283885
masklinn
í dag viðrar vel til loftárása
Posté le 20-06-2016 à 14:02:12  profilanswer
 

sanitize-coverage=edge


---------------
Stick a parrot in a Call of Duty lobby, and you're gonna get a racist parrot. — Cody
n°2283906
flo850
moi je
Posté le 20-06-2016 à 14:47:12  profilanswer
 
n°2284226
sligor
Posté le 26-06-2016 à 11:53:31  profilanswer
 

http://i.imgur.com/Z7z77UX.jpg


---------------
qwerty-fr
n°2285279
Tristou
This is where the fun begins
Posté le 17-07-2016 à 22:15:06  profilanswer
 

https://twitter.com/Gregoire_BZH/st [...] 02?lang=fr


---------------
"About your cat Mr. Schrödinger : I have good news and bad news"
n°2285768
flo850
moi je
Posté le 29-07-2016 à 13:35:03  profilanswer
 
n°2286307
Tristou
This is where the fun begins
Posté le 09-08-2016 à 18:27:06  profilanswer
 

#TestDeRadicalisation


---------------
"About your cat Mr. Schrödinger : I have good news and bad news"
n°2286498
Tristou
This is where the fun begins
Posté le 14-08-2016 à 00:19:09  profilanswer
 

https://fr.wikipedia.org/wiki/Knockout


---------------
"About your cat Mr. Schrödinger : I have good news and bad news"
n°2286499
Lone Morge​n
Posté le 14-08-2016 à 15:29:31  profilanswer
 
n°2286500
masklinn
í dag viðrar vel til loftárása
Posté le 14-08-2016 à 15:50:20  profilanswer
 

wàn


---------------
Stick a parrot in a Call of Duty lobby, and you're gonna get a racist parrot. — Cody
n°2286506
Tristou
This is where the fun begins
Posté le 14-08-2016 à 22:01:43  profilanswer
 

ça fait partie du packaging de la bonne soirée


---------------
"About your cat Mr. Schrödinger : I have good news and bad news"
n°2288476
mareek
Et de 3 \o/
Posté le 23-09-2016 à 00:22:30  profilanswer
 

http://forum.hardware.fr/hfr/Progr [...] m#t2113128


---------------
"I wonder if the internal negative pressure in self pumping toothpaste tubes is adjusted for different market altitudes." John Carmack
mood
Publicité
Posté le   profilanswer
 

 Page :   1  2  3  4  5  ..  188  189  190  191  192  193

Aller à :
Ajouter une réponse
 

Sujets relatifs
Récupérer le contenu d'une frame[ASP] Récupérer le contenu du buffer
afficher le contenu d'un requette SQL dans 1 DataGrid ou autre ?Recherche un outil de help-desk
effacer le contenu d'une text areaRécupérer le contenu d'un fichier distant. readfile(), include().
Lire une page web (php) à partir de vb pour afficher le contenuoutil de test de charge
(HTML/JS aussi)Recuperation de valeur contenu entre les TAGtype contenu ds un vector
Plus de sujets relatifs à : [Topic Outil] sauvegardez le contenu de votre presse papier


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR