+
    i                          ^ RI Ht R tR# )    )get_connectionbdproductivoc                    Rp  \        4       pV'       g   \        R4      hVP                  4       pVP                  V 4       VP	                  4       pV Uu. uEF  p/ RV^ ,          bRV^,          bRV^,          bRV^,          bRV^,          bRV^,          bR	V^,          bR
V^,          bRV^,          bRV^	,          bRV^
,          bRV^,          bRV^,          bRV^,          bRV^,          bRV^,          bRV^,          b/ RV^,          bRV^,          bRV^,          bRV^,          bRV^,          bRV^,          bRV^,          bRV^,          bRV^,          bRV^,          bRV^,          bRV^,          bR V^,          bR!V^,          bR"V^,          bR#V^ ,          bR$V^!,          bC/ R%V^",          bR&V^#,          bR'V^$,          bR(V^%,          bR)V^&,          bR*V^',          bR+V^(,          bR,V^),          bR-V^*,          bR.V^+,          bR/V^,,          bR0V^-,          bR1V^.,          bR2V^/,          bR3V^0,          bR4V^1,          bR5V^2,          bCR6V^3,          R7V^4,          R8V^5,          R9V^6,          R:V^7,          R;V^8,          R<V^9,          R=V^:,          R>V^;,          R?V^<,          R@V^=,          RAV^>,          RBV^?,          /CNEK  	  upV'       d   VP                  4        # # u upi   \         d4   p\        RCT 24       . u RDp?X'       d   TP                  4        # # RDp?ii ; i  X'       d   TP                  4        i i ; i)Ez,Obtiene los Breakers desde la base de datos.u  
    SELECT 
        isnull (DES_Reporte_financiero_OV.Company, '')as Company,
        isnull (DES_Reporte_financiero_OV.OV, '')as OV,
        isnull (DES_Reporte_financiero_OV.FechaOV, '')as FechaOV,
        isnull (DES_Reporte_financiero_OV.OrderCode, '')as OrderCode,
        isnull (DES_Reporte_financiero_OV.División, '')as División,
        isnull (DES_Reporte_financiero_OV.Clasificación, '')as Clasificación,
        isnull (DES_Reporte_financiero_OV.Departamento, '')as Departamento,
        isnull (DES_Reporte_financiero_OV.DepartamentClass, '')as DepartamentClass,
        isnull (DES_Reporte_financiero_OV.Vendedor, '')as Vendedor,
        isnull (DES_Reporte_financiero_OV.CustNum, '')as CustNum,
        isnull (DES_Reporte_financiero_OV.CustID, '')as CustID,
        isnull (DES_Reporte_financiero_OV.Cliente, '')as Cliente,
        isnull (DES_Reporte_financiero_OV.TotalLines, '')as TotalLines,
        isnull (DES_Reporte_financiero_OV.EstatusOV, '')as EstatusOV,
        isnull (DES_Reporte_financiero_OV. Importe , '')as  Importe ,
        isnull (DES_Reporte_financiero_OV. Descuento , '')as  Descuento ,
        isnull (DES_Reporte_financiero_OV. [Misc.] , '')as  [Misc.] ,
        isnull (DES_Reporte_financiero_OV. Subtotal , '')as  Subtotal ,
        isnull (DES_Reporte_financiero_OV. Impuesto , '')as  Impuesto ,
        isnull (DES_Reporte_financiero_OV. Redondeo , '')as  Redondeo ,
        isnull (DES_Reporte_financiero_OV. [Total de la Orden] , '')as  [Total de la Orden] ,
        isnull (DES_Reporte_financiero_OV.Moneda, '')as Moneda,
        isnull (DES_Reporte_financiero_OV. Cambio , '')as  Cambio ,
        isnull (DES_Reporte_financiero_OV. ImporteMXN , '')as  ImporteMXN ,
        isnull (DES_Reporte_financiero_OV. DescuentoMXN , '')as  DescuentoMXN ,
        isnull (DES_Reporte_financiero_OV. [Misc.MXN] , '')as  [Misc.MXN] ,
        isnull (DES_Reporte_financiero_OV. SubtotalMXN , '')as  SubtotalMXN ,
        isnull (DES_Reporte_financiero_OV. ImpuestoMXN , '')as  ImpuestoMXN ,
        isnull (DES_Reporte_financiero_OV. RedondeoMXN , '')as  RedondeoMXN ,
        isnull (DES_Reporte_financiero_OV. [Total de la Orden MXN] , '')as  [Total de la Orden MXN] ,
        isnull (DES_Reporte_financiero_OV.[Terminos OV], '')as [Terminos OV],
        isnull (DES_Reporte_financiero_OV.[Dias de pago OV], '')as [Dias de pago OV],
        isnull (DES_Reporte_financiero_OV.[Comentario de OV], '')as [Comentario de OV],
        isnull (DES_Reporte_financiero_OV.TipoDeVenta, '')as TipoDeVenta,
        isnull (DES_Reporte_financiero_OV. Facturado , '')as  Facturado ,
        isnull (DES_Reporte_financiero_OV. FacturadoIVA , '')as  FacturadoIVA ,
        isnull (DES_Reporte_financiero_OV. FacturadoMXN , '')as  FacturadoMXN ,
        isnull (DES_Reporte_financiero_OV. FacturadoIVAMXN , '')as  FacturadoIVAMXN ,
        isnull (DES_Reporte_financiero_OV.ListaDeFacturas, '')as ListaDeFacturas,
        isnull (DES_Reporte_financiero_OV.FechaUltimaFactura, '')as FechaUltimaFactura,
        isnull (DES_Reporte_financiero_OV. [Facturacion Manual] , '')as  [Facturacion Manual] ,
        isnull (DES_Reporte_financiero_OV.[Comentario de correccion], '')as [Comentario de correccion],
        isnull (DES_Reporte_financiero_OV. [Por Facturar] , '')as  [Por Facturar] ,
        isnull (DES_Reporte_financiero_OV.[%], '')as [%],
        isnull (DES_Reporte_financiero_OV. Revisión , '')as  Revisión ,
        isnull (DES_Reporte_financiero_OV.AllProjectID, '')as AllProjectID,
        isnull (DES_Reporte_financiero_OV.Columna1, '')as Columna1,
        isnull (DES_Reporte_financiero_OV.JobNumsInProject, '')as JobNumsInProject,
        isnull (DES_Reporte_financiero_OV. Material , '')as  Material ,
        isnull (DES_Reporte_financiero_OV. Labor , '')as  Labor ,
        isnull (DES_Reporte_financiero_OV. Burden , '')as  Burden ,
        isnull (DES_Reporte_financiero_OV. Subcontract , '')as  Subcontract ,
        isnull (DES_Reporte_financiero_OV. MtlBur , '')as  MtlBur ,
        isnull (DES_Reporte_financiero_OV. TotalCostPrj , '')as  TotalCostPrj ,
        isnull (DES_Reporte_financiero_OV.JobNumsDirectOV, '')as JobNumsDirectOV,
        isnull (DES_Reporte_financiero_OV. MaterialDir , '')as  MaterialDir ,
        isnull (DES_Reporte_financiero_OV. LaborDir , '')as  LaborDir ,
        isnull (DES_Reporte_financiero_OV. BurdenDir , '')as  BurdenDir ,
        isnull (DES_Reporte_financiero_OV. SubcontractDir , '')as  SubcontractDir ,
        isnull (DES_Reporte_financiero_OV. MtlBurDir , '')as  MtlBurDir ,
        isnull (DES_Reporte_financiero_OV. TotalCostDir , '')as  TotalCostDir ,
        isnull (DES_Reporte_financiero_OV.TotalCost, '')as TotalCost,
        isnull (DES_Reporte_financiero_OV.Utilidad, '')as Utilidad,
        isnull (DES_Reporte_financiero_OV.[%2], '')as [%2]

    FROM
        DES_Reporte_financiero_OV
    u4   No se pudo establecer conexión con la base de datosCompanyOVFechaOV	OrderCodeu	   Divisiónu   ClasificaciónDepartamentoDepartamentClassVendedorCustNumCustIDCliente
TotalLines	EstatusOVImporte	DescuentoMiscSubtotalImpuestoRedondeoTotal_de_la_OrdenMonedaCambio
ImporteMXNDescuentoMXNMiscMXNSubtotalMXNImpuestoMXNRedondeoMXNTotal_de_la_Orden_MXNTerminos_OVDias_de_pago_OVComentario_de_OVTipoDeVenta	FacturadoFacturadoIVAFacturadoMXNFacturadoIVAMXNListaDeFacturasFechaUltimaFacturaFacturacion_ManualComentario_de_correccionPor_Facturar
porcentageu	   RevisiónAllProjectIDColumna1JobNumsInProjectMaterialLaborBurdenSubcontractMtlBurTotalCostPrjJobNumsDirectOVMaterialDirLaborDir	BurdenDirSubcontractDir	MtlBurDirTotalCostDir	TotalCostUtilidadporcentage2z.[Error inesperado] Error obteniendo breakers: N)r   ConnectionErrorcursorexecutefetchallclose	Exceptionprint)queryconnrC   resultsrowes         ڂC:\Users\victor.barrera\Documents\proyectos\elepV3\Elep\src\Consultas_SQL\SupYCtrol\GerenteSyC\GSYCDES_Reporte_financiero_OVSQL.pyget_ConsultarO      s   EELQ)+!"XYYu//#H !EB"D !#CA3q6Ac!fA 3q6A SV	A
 SVA !#a&A AA #CFA CFA 3q6A #b'A 3r7A c"gA SWA 3r7A  SW!A" B#A$ CG%A& CG'A( CG)A* $SW+A, #b'-A. #b'/A0 c"g1A2 B3A4 3r75A6 s2w7A8 s2w9A: s2w;A< (R=A> s2w?A@ "3r7AAB #CGCAD s2wEAF SWGAH BIAJ BKAL "3r7MAN "3r7OAP %c"gQAR %c"gSAT +CGUAV BWAX c"gYAZ SW[A\ B]A^ CG_A` #CGaAb CGcAd ReAf #b'gAh s2w#b'B!3r7s2wCGSW #b'SWBSWCGs2wAAB !EB"N JJL OB"F  >qcBC	JJL 	 JJL sC   AK= JK8K= 8K= =L;L6L;L> 6L;;L> >MN)Consultas_SQL.conexionr   rO        rN   <module>rS      s   
 >YrR   