Subversion Repositories SmartDukaan

Rev

Rev 7205 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7205 Rev 7890
Line 194... Line 194...
194
			 when datediff(t.session_start_time, u.source_start_time) > 7 then 2 when datediff(t.session_start_time, u.source_start_time) > 2 then 3
194
			 when datediff(t.session_start_time, u.source_start_time) > 7 then 2 when datediff(t.session_start_time, u.source_start_time) > 2 then 3
195
			 when datediff(t.session_start_time, u.source_start_time) > 1 then 4 else 5 end as days_to_purchase, aff.name aff_name, 
195
			 when datediff(t.session_start_time, u.source_start_time) > 1 then 4 else 5 end as days_to_purchase, aff.name aff_name, 
196
		case when o.originalOrderId is null then datediff(o.created_timestamp, '20101231')
196
		case when o.originalOrderId is null then datediff(o.created_timestamp, '20101231')
197
			 else datediff((select created_timestamp from `order` where id = o.originalOrderId), '20101231') end as booking_date_id ,
197
			 else datediff((select created_timestamp from `order` where id = o.originalOrderId), '20101231') end as booking_date_id ,
198
		case when o.otg = 1 then 1 else 0 end as otg,
198
		case when o.otg = 1 then 1 else 0 end as otg,
199
		o.insurer, o.insuranceAmount 
199
		o.insurer, o.insuranceAmount, o.source 
200
FROM `order` o  
200
FROM `order` o  
201
left join lineitem l on(o.id = l.order_id )  
201
left join lineitem l on(o.id = l.order_id )  
202
left join payment.payment p on (o.transaction_id = p.merchantTxnId and p.id=(select max(id) from payment.payment where merchantTxnId = o.transaction_id))  
202
left join payment.payment p on (o.transaction_id = p.merchantTxnId and p.id=(select max(id) from payment.payment where merchantTxnId = o.transaction_id))  
203
left join payment.paymentattribute pa on (p.id = pa.payment_id and pa.name = 'payMethod') 
203
left join payment.paymentattribute pa on (p.id = pa.payment_id and pa.name = 'payMethod') 
204
left join transaction t on (o.transaction_id = t.id) 
204
left join transaction t on (o.transaction_id = t.id) 
Line 326... Line 326...
326
        <precision>-2</precision>
326
        <precision>-2</precision>
327
      </field>      <field>        <name>insuranceAmount</name>
327
      </field>      <field>        <name>insuranceAmount</name>
328
        <rename/>
328
        <rename/>
329
        <length>-2</length>
329
        <length>-2</length>
330
        <precision>-2</precision>
330
        <precision>-2</precision>
-
 
331
      </field>      <field>        <name>source</name>
-
 
332
        <rename/>
-
 
333
        <length>-2</length>
-
 
334
        <precision>-2</precision>
331
      </field>        <select_unspecified>N</select_unspecified>
335
      </field>        <select_unspecified>N</select_unspecified>
332
    </fields>     <cluster_schema/>
336
    </fields>     <cluster_schema/>
333
 <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
337
 <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
334
      <xloc>369</xloc>
338
      <xloc>369</xloc>
335
      <yloc>162</yloc>
339
      <yloc>162</yloc>
Line 463... Line 467...
463
        </field>
467
        </field>
464
        <field>
468
        <field>
465
          <column_name>insuranceAmount</column_name>
469
          <column_name>insuranceAmount</column_name>
466
          <stream_name>insuranceAmount</stream_name>
470
          <stream_name>insuranceAmount</stream_name>
467
        </field>
471
        </field>
-
 
472
        <field>
-
 
473
          <column_name>source</column_name>
-
 
474
          <stream_name>source</stream_name>
-
 
475
        </field>
468
    </fields>
476
    </fields>
469
     <cluster_schema/>
477
     <cluster_schema/>
470
 <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
478
 <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
471
      <xloc>631</xloc>
479
      <xloc>631</xloc>
472
      <yloc>162</yloc>
480
      <yloc>162</yloc>