diff --git a/Build/Build.fbl6 b/Build/Build.fbl6 index 4baa6d6..648988e 100644 Binary files a/Build/Build.fbl6 and b/Build/Build.fbl6 differ diff --git a/Build/Build.fbpInf b/Build/Build.fbpInf index e832e0e..e33f5ec 100644 --- a/Build/Build.fbpInf +++ b/Build/Build.fbpInf @@ -14,8 +14,8 @@ - 00:01:15 - 19/01/2021 17:01:29 + 00:00:07 + 04/04/2022 10:55:43 True diff --git a/Build/Build.fbz6 b/Build/Build.fbz6 index 58036e7..6fb1c19 100644 Binary files a/Build/Build.fbz6 and b/Build/Build.fbz6 differ diff --git a/Resources/Iconos/SELLOS.jpg b/Resources/Iconos/SELLOS.jpg new file mode 100644 index 0000000..7bf3274 Binary files /dev/null and b/Resources/Iconos/SELLOS.jpg differ diff --git a/Resources/Iconos/UECKO-ARMARIO-DEL-ANO.jpg b/Resources/Iconos/UECKO-ARMARIO-DEL-ANO.jpg new file mode 100644 index 0000000..ab9275e Binary files /dev/null and b/Resources/Iconos/UECKO-ARMARIO-DEL-ANO.jpg differ diff --git a/Resources/Iconos/UECKO-LAS-ROZAS-PREMIO.jpg b/Resources/Iconos/UECKO-LAS-ROZAS-PREMIO.jpg new file mode 100644 index 0000000..79065cf Binary files /dev/null and b/Resources/Iconos/UECKO-LAS-ROZAS-PREMIO.jpg differ diff --git a/Resources/UECKO-LAS-ROZAS-tratado.jpg b/Resources/UECKO-LAS-ROZAS-tratado.jpg new file mode 100644 index 0000000..ffc2fce Binary files /dev/null and b/Resources/UECKO-LAS-ROZAS-tratado.jpg differ diff --git a/Resources/armario-del-ano-definitivo.jpg b/Resources/armario-del-ano-definitivo.jpg new file mode 100644 index 0000000..e16b442 Binary files /dev/null and b/Resources/armario-del-ano-definitivo.jpg differ diff --git a/Resources/sellos-nuevos.jpg b/Resources/sellos-nuevos.jpg new file mode 100644 index 0000000..7333a6f Binary files /dev/null and b/Resources/sellos-nuevos.jpg differ diff --git a/Resources/sellos-nuevos.png b/Resources/sellos-nuevos.png new file mode 100644 index 0000000..6ba7f43 Binary files /dev/null and b/Resources/sellos-nuevos.png differ diff --git a/Source/ApplicationBase/uFactuGES_App.pas b/Source/ApplicationBase/uFactuGES_App.pas index e163a62..67c47b1 100644 --- a/Source/ApplicationBase/uFactuGES_App.pas +++ b/Source/ApplicationBase/uFactuGES_App.pas @@ -281,9 +281,9 @@ begin //Nos devuelve el id de la tienda a la que pertenece el vendedor que tiene asignado //el usuario con el que ha accedido a la aplicación. //Esto funciona mientras la relación sea 1 a 1, cuando sea 1 a n (un usuario pertenece a varios vendedores deja de funcionar) -// FTiendaActiva := EmpresasController.DarTiendaUsuario(EmpresaActiva, UsuarioActivo.ID); + FTiendaActiva := EmpresasController.DarTiendaUsuario(EmpresaActiva, UsuarioActivo.ID); - FTiendaActiva := EmpresasController.DarTiendaEmpresa(EmpresaActiva, 0); +// FTiendaActiva := EmpresasController.DarTiendaEmpresa(EmpresaActiva, 0); Assert(Assigned(FTiendaActiva)); diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj index 30cceca..e7a23a9 100644 --- a/Source/Base/Base.dproj +++ b/Source/Base/Base.dproj @@ -44,13 +44,6 @@ Package FalseTrueFalseLibreria base de FactuGESFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0 - - - - - - - VCL for the Web Design Package for CodeGear RAD Studio CodeGear WebSnap Components CodeGear SOAP Components @@ -65,55 +58,55 @@ MainSource + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
fConfigurarConexion
TForm diff --git a/Source/Base/Utiles/uCalculosUtils.pas b/Source/Base/Utiles/uCalculosUtils.pas index 7a62af8..c58396f 100644 --- a/Source/Base/Utiles/uCalculosUtils.pas +++ b/Source/Base/Utiles/uCalculosUtils.pas @@ -16,25 +16,25 @@ const CAMPO_IMPORTE_TOTAL = 'IMPORTE_TOTAL'; CAMPO_DESCUENTO = 'DESCUENTO'; CAMPO_INCREMENTO = 'INCREMENTO'; - CAMPO_DECREMENTO = 'DECREMENTO'; + CAMPO_DECREMENTO = 'DECREMENTO'; CAMPO_IMPORTE_PORTE = 'IMPORTE_PORTE'; - CAMPO_VISIBLE = 'VISIBLE'; - CAMPO_VALORADO = 'VALORADO'; + CAMPO_VISIBLE = 'VISIBLE'; + CAMPO_VALORADO = 'VALORADO'; - function CalcularLineaConcepto (const ADataTable : TDADataTable): Double; + function CalcularLineaConcepto (const ADataTable : TDADataTable; const NumDecimales: Smallint = 2): Double; procedure ValidarCamposLineaConcepto(DataTable: TDADataTable); procedure DesglosarPorte(ImportePorte: Currency; ADetalles: IDAStronglyTypedDataTable); function DarTotalPorte(ADetalles: IDAStronglyTypedDataTable): Double; - function CalcularImporteNeto (const ImporteUnidad: Double = 0; const Incremento: Double = 0; const Decremento: Double = 0): Double; + function CalcularImporteNeto (const ImporteUnidad: Double = 0; const Incremento: Double = 0; const Decremento: Double = 0; const NumDecimales: Smallint = 2): Double; implementation uses SysUtils, DB, Variants, cxControls, uNumUtils; -function CalcularImporteNeto (const ImporteUnidad: Double = 0; const Incremento: Double = 0; const Decremento: Double = 0): Double; +function CalcularImporteNeto (const ImporteUnidad: Double = 0; const Incremento: Double = 0; const Decremento: Double = 0; const NumDecimales: Smallint = 2): Double; var ValorAIncrementar: Double; ImporteNeto1: Double; @@ -48,10 +48,11 @@ begin ValorAIncrementar := ImporteUnidad * (Incremento/100); ImporteNeto1 := ImporteUnidad + ValorAIncrementar; ValorADecrementar := ImporteNeto1 * (Decremento/100); - Result := RoundCurrency((ImporteNeto1 - ValorADecrementar)); + + Result := RoundCurrency((ImporteNeto1 - ValorADecrementar), NumDecimales) end; -function CalcularLineaConcepto (const ADataTable : TDADataTable): Double; +function CalcularLineaConcepto (const ADataTable : TDADataTable; const NumDecimales: Smallint = 2): Double; var AField: TDAField; ImporteTotal, ImporteNeto, Incremento, Decremento, Descuento, ImportePorte : Double; @@ -77,7 +78,7 @@ begin if (not VarIsNull(AField.AsVariant)) then Decremento := AField.AsFloat; - ImporteNeto := CalcularImporteNeto(ImporteNeto, Incremento, Decremento); + ImporteNeto := CalcularImporteNeto(ImporteNeto, Incremento, Decremento, NumDecimales); if (not VarIsNull(FieldByName(CAMPO_DESCUENTO).AsVariant)) then Descuento := ImporteNeto * (FieldByName(CAMPO_DESCUENTO).AsFloat/100); @@ -85,7 +86,7 @@ begin if (not VarIsNull(FieldByName(CAMPO_IMPORTE_PORTE).AsVariant)) then ImportePorte := FieldByName(CAMPO_CANTIDAD).asFloat * FieldByName(CAMPO_IMPORTE_PORTE).AsFloat; - ImporteTotal := (RoundCurrency(ImporteNeto - Descuento) * FieldByName(CAMPO_CANTIDAD).asFloat) + ImportePorte; + ImporteTotal := (RoundCurrency((ImporteNeto - Descuento), NumDecimales) * FieldByName(CAMPO_CANTIDAD).asFloat) + ImportePorte; end; Result := ImporteTotal; diff --git a/Source/Base/Utiles/uNumUtils.pas b/Source/Base/Utiles/uNumUtils.pas index ff91cc7..3cd6617 100644 --- a/Source/Base/Utiles/uNumUtils.pas +++ b/Source/Base/Utiles/uNumUtils.pas @@ -28,28 +28,68 @@ interface Function IntToLetras(Numero:LongInt):String; Function xxIntToLetras(Valor:LongInt):String; Function CifraToLetras(Cifra: Double): String; -function RoundCurrency(const Value: Currency): Currency; - +function RoundCurrency(const Value: Currency; const NumDecimales: Smallint = 2): Currency; implementation uses SysUtils, Dialogs; // SysUtils, Windows, Dialogs, Messages, Classes, Graphics, Controls, Forms, StdCtrls; -function RoundCurrency(const Value: Currency): Currency; +//Funcion importantisima, nos redondea por defecto el valor double-hasta 14 decimales- pasado por parametro a currency-solo 4 decimales- +//tiene un parametro de redondeo a numero de decimales menor, por defecto a 2 decimales, si no +function RoundCurrency(const Value: Currency; const NumDecimales: Smallint = 2): Currency; var V64: Int64 absolute Result; Decimals: Integer; begin - Result := Value; - Decimals := V64 mod 100; - Dec(V64, Decimals); - case Decimals of - -99 .. -50 : Dec(V64, 100); - 50 .. 99 : Inc(V64, 100); - end; + if (NumDecimales = 2) then + begin + Result := Value; + Decimals := V64 mod 100; + Dec(V64, Decimals); + case Decimals of + -99 .. -50 : Dec(V64, 100); + 50 .. 99 : Inc(V64, 100); + end; + end + else if (NumDecimales = 3) then + begin + Result := Value; + Decimals := V64 mod 10; + Dec(V64, Decimals); + case Decimals of + -9 .. -5 : Dec(V64, 10); + 5 .. 9 : Inc(V64, 10); + end; + end + else + Result := Value; end; + +{function RoundCurrency(const Value: Currency; const NumDecimales: Smallint = 2): Currency; +const + factors: array [-4..-1] of Int64 = (10000, 1000, 100, 10); +var + factor: Integer; + ValueAsInt64: Int64 absolute Value; + Scale: Integer; +begin + Scale := -1*NumDecimales; + if Scale = -4 then + Result := ValueAsInt64 + else if Scale < -4 then + Result := ValueAsInt64 * factors[4 + Scale] + else begin + factor := factors[-(4 + Scale)]; + Result := ValueAsInt64 div factor; + if (ValueAsInt64 mod factor) >= (factor div 2) then + Result := Inc(Result); + end; +end;} + + + Function xxIntToLetras(Valor:LongInt):String; const aUnitat : array[1..15] of String = ('UNO','DOS','TRES','CUATRO','CINCO','SEIS', diff --git a/Source/Cliente/FactuGES.dproj b/Source/Cliente/FactuGES.dproj index db0aa4c..e94c1e4 100644 --- a/Source/Cliente/FactuGES.dproj +++ b/Source/Cliente/FactuGES.dproj @@ -51,7 +51,7 @@ Delphi.Personality VCLApplication -FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse3800FalseFalseFalseFalseFalse30821252Rodax Software S.L.3.8.0.0FactuGESFactuGES3.8.0.0 +FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse3900FalseFalseFalseFalseFalse30821252Rodax Software S.L.3.9.0.0FactuGESFactuGES3.9.0.0 File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found FactuGES.dprFalse diff --git a/Source/Cliente/FactuGES.res b/Source/Cliente/FactuGES.res index 4bab0c1..862b3c2 100644 Binary files a/Source/Cliente/FactuGES.res and b/Source/Cliente/FactuGES.res differ diff --git a/Source/GUIBase/GUIBase.dproj b/Source/GUIBase/GUIBase.dproj index f44e3be..eba705d 100644 --- a/Source/GUIBase/GUIBase.dproj +++ b/Source/GUIBase/GUIBase.dproj @@ -58,34 +58,34 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fDialogBase
diff --git a/Source/GUIBase/uEditorDBBase.dfm b/Source/GUIBase/uEditorDBBase.dfm index ac98e86..f8a8aba 100644 --- a/Source/GUIBase/uEditorDBBase.dfm +++ b/Source/GUIBase/uEditorDBBase.dfm @@ -5,7 +5,7 @@ inherited fEditorDBBase: TfEditorDBBase ClientHeight = 454 ClientWidth = 646 ExplicitWidth = 654 - ExplicitHeight = 488 + ExplicitHeight = 492 PixelsPerInch = 96 TextHeight = 13 inherited JvNavPanelHeader: TJvNavPanelHeader diff --git a/Source/GUIBase/uEditorGridBase.dfm b/Source/GUIBase/uEditorGridBase.dfm index efb1165..4f9a5da 100644 --- a/Source/GUIBase/uEditorGridBase.dfm +++ b/Source/GUIBase/uEditorGridBase.dfm @@ -6,7 +6,7 @@ inherited fEditorGridBase: TfEditorGridBase ClientWidth = 543 OnDestroy = CustomEditorDestroy ExplicitWidth = 551 - ExplicitHeight = 478 + ExplicitHeight = 482 PixelsPerInch = 96 TextHeight = 13 inherited JvNavPanelHeader: TJvNavPanelHeader @@ -22,15 +22,15 @@ inherited fEditorGridBase: TfEditorGridBase inherited TBXDock: TTBXDock Top = 27 Width = 543 - Height = 75 + Height = 79 ExplicitTop = 27 ExplicitWidth = 543 - ExplicitHeight = 75 + ExplicitHeight = 79 inherited tbxMain: TTBXToolbar DockPos = 0 DragHandleStyle = dhDouble TabOrder = 1 - ExplicitWidth = 457 + ExplicitWidth = 513 inherited TBXItem29: TTBXItem Visible = False end @@ -76,7 +76,7 @@ inherited fEditorGridBase: TfEditorGridBase end object tbxFiltro: TTBXToolbar [1] Left = 0 - Top = 49 + Top = 52 Align = alRight CloseButton = False DefaultDock = TBXDock @@ -104,7 +104,7 @@ inherited fEditorGridBase: TfEditorGridBase Caption = 'Filtrar:' end object tbxEditFiltro: TTBXEditItem - EditWidth = 200 + EditWidth = 125 ImageIndex = 10 EditorFontSettings.Italic = tsTrue ExtendedAccept = True @@ -112,6 +112,17 @@ inherited fEditorGridBase: TfEditorGridBase ShowImage = True OnChange = tbxEditFiltroChange end + object tbxEditFiltro2: TTBXEditItem + EditWidth = 125 + Enabled = False + ImageIndex = 10 + Visible = False + EditorFontSettings.Italic = tsTrue + ExtendedAccept = True + Images = SmallImages + ShowImage = True + OnChange = tbxEditFiltro2Change + end object TBXItem34: TTBXItem Action = actQuitarFiltro end @@ -168,8 +179,8 @@ inherited fEditorGridBase: TfEditorGridBase end end object TBXTMain2: TTBXToolbar - Left = 337 - Top = 49 + Left = 334 + Top = 52 Caption = 'tbxMain' ChevronHint = 'M'#225's botones|' DockMode = dmCannotFloatOrChangeDocks diff --git a/Source/GUIBase/uEditorGridBase.pas b/Source/GUIBase/uEditorGridBase.pas index 058e4af..2f3de3f 100644 --- a/Source/GUIBase/uEditorGridBase.pas +++ b/Source/GUIBase/uEditorGridBase.pas @@ -67,8 +67,10 @@ type lblAno: TTBXLabelItem; cbxListaAnos: TTBXComboBoxItem; sepAno: TTBXSeparatorItem; + tbxEditFiltro2: TTBXEditItem; procedure tbxEditFiltroChange(Sender: TObject; const Text: String); - procedure FormShow(Sender: TObject); + procedure tbxEditFiltro2Change(Sender: TObject; const Text: string); + procedure FormShow(Sender: TObject); procedure actQuitarFiltroExecute(Sender: TObject); procedure actDuplicarUpdate(Sender: TObject); procedure actModificarUpdate(Sender: TObject); @@ -81,6 +83,7 @@ type procedure CustomEditorDestroy(Sender: TObject); procedure actExportarExcelExecute(Sender: TObject); procedure actExportarExcelUpdate(Sender: TObject); + protected FListaAnos: TStringList; FViewGrid : IViewGridBase; @@ -224,6 +227,18 @@ begin end; end; +procedure TfEditorGridBase.tbxEditFiltro2Change(Sender: TObject; + const Text: string); +begin + if Assigned(ViewGrid) then + begin + if Length(Text) > 0 then + ViewGrid.Filter2 := Text + else + actQuitarFiltro.Execute; + end; +end; + procedure TfEditorGridBase.tbxEditFiltroChange(Sender: TObject; const Text: String); begin if Assigned(ViewGrid) then @@ -281,6 +296,7 @@ begin if ViewGrid.ViewFiltros.VerFiltros then begin tbxEditFiltro.Visible := False; + tbxEditFiltro2.Visible := False; TBXItem7.Visible := False; end else @@ -288,6 +304,12 @@ begin tbxEditFiltro.Text := ''; tbxEditFiltro.Visible := True; TBXItem7.Visible := True; + + if (tbxEditFiltro2.Enabled) then + begin + tbxEditFiltro2.Text := ''; + tbxEditFiltro2.Visible := True; + end; end; end; @@ -326,6 +348,8 @@ begin begin tbxEditFiltro.Text := ''; ViewGrid.Filter := ''; + tbxEditFiltro2.Text := ''; + ViewGrid.Filter2 := ''; end; end; diff --git a/Source/GUIBase/uViewDetallesDTO.pas b/Source/GUIBase/uViewDetallesDTO.pas index a18a936..a943e72 100644 --- a/Source/GUIBase/uViewDetallesDTO.pas +++ b/Source/GUIBase/uViewDetallesDTO.pas @@ -46,6 +46,7 @@ procedure TfrViewDetallesDTO.cxGridViewIMPORTENETOGetDisplayText(Sender: TcxCust var AText: string); var ImporteNeto, Incremento, Decremento : Double; + NumDecimales : Smallint; begin //Se encarga de mostrar el campo calculado de importe neto @@ -53,6 +54,8 @@ begin Incremento := 0; Decremento := 0; + NumDecimales := TcxCurrencyEditProperties(Sender.Properties).DecimalPlaces; + if not VarIsNull(ARecord.Values[cxGridViewIMPORTEUNIDAD.Index]) then begin ImporteNeto := ARecord.Values[cxGridViewIMPORTEUNIDAD.Index]; @@ -63,12 +66,15 @@ begin if not VarIsNull(ARecord.Values[cxGridViewDECREMENTO.Index]) then Decremento := ARecord.Values[cxGridViewDECREMENTO.Index]; - ImporteNeto := CalcularImporteNeto(ARecord.Values[cxGridViewIMPORTEUNIDAD.Index], Incremento, Decremento); + ImporteNeto := CalcularImporteNeto(ARecord.Values[cxGridViewIMPORTEUNIDAD.Index], Incremento, Decremento, NumDecimales); end; if (ImporteNeto <> -1) then begin - AText := FormatCurr(',0.00 €;-,0.00 €', FloatToCurr(ImporteNeto)) + if (NumDecimales = 2) then + AText := FormatCurr(',0.00 €;-,0.00 €', FloatToCurr(ImporteNeto)) + else + AText := FormatCurr(',0.0000 €;-,0.0000 €', FloatToCurr(ImporteNeto)) end; end; @@ -88,6 +94,7 @@ procedure TfrViewDetallesDTO.cxGridViewIMP_UNIDAD_DTOGetDisplayText( Sender: Tcx var AText: string); var ImporteUnidadDTO, ImporteNeto, Incremento, Decremento, Descuento : Double; + NumDecimales : Smallint; begin //Se encarga de mostrar el campo calculado de importe neto @@ -96,6 +103,9 @@ begin Decremento := 0; Descuento := 0; + NumDecimales := TcxCurrencyEditProperties(Sender.Properties).DecimalPlaces; + + if not VarIsNull(ARecord.Values[cxGridViewIMPORTEUNIDAD.Index]) then begin if not VarIsNull(ARecord.Values[cxGridViewINCREMENTO.Index]) then @@ -104,18 +114,21 @@ begin if not VarIsNull(ARecord.Values[cxGridViewDECREMENTO.Index]) then Decremento := ARecord.Values[cxGridViewDECREMENTO.Index]; - ImporteNeto := CalcularImporteNeto(ARecord.Values[cxGridViewIMPORTEUNIDAD.Index], Incremento, Decremento); + ImporteNeto := CalcularImporteNeto(ARecord.Values[cxGridViewIMPORTEUNIDAD.Index], Incremento, Decremento, NumDecimales); if not VarIsNull(ARecord.Values[cxGridViewDESCUENTO.Index]) then Descuento := ImporteNeto * (ARecord.Values[cxGridViewDESCUENTO.Index]/100); - ImporteUnidadDTO := RoundCurrency(ImporteNeto - Descuento); + ImporteUnidadDTO := RoundCurrency((ImporteNeto - Descuento), NumDecimales) end; if (Descuento <> 0) then begin - AText := FormatCurr(',0.00 €;-,0.00 €', FloatToCurr(ImporteUnidadDTO)) + if (NumDecimales = 2) then + AText := FormatCurr(',0.00 €;-,0.00 €', FloatToCurr(ImporteUnidadDTO)) + else + AText := FormatCurr(',0.0000 €;-,0.0000 €', FloatToCurr(ImporteUnidadDTO)) end; end; diff --git a/Source/GUIBase/uViewFiltroBase.dfm b/Source/GUIBase/uViewFiltroBase.dfm index 5995374..ac8b713 100644 --- a/Source/GUIBase/uViewFiltroBase.dfm +++ b/Source/GUIBase/uViewFiltroBase.dfm @@ -1,9 +1,9 @@ inherited frViewFiltroBase: TfrViewFiltroBase - Width = 612 - Height = 123 + Width = 671 + Height = 105 Visible = False - ExplicitWidth = 612 - ExplicitHeight = 123 + ExplicitWidth = 671 + ExplicitHeight = 105 object TBXDockablePanel1: TTBXDockablePanel Left = 0 Top = 0 @@ -22,8 +22,8 @@ inherited frViewFiltroBase: TfrViewFiltroBase object dxLayoutControl1: TdxLayoutControl Left = 0 Top = 0 - Width = 612 - Height = 68 + Width = 671 + Height = 70 Align = alTop ParentBackground = True TabOrder = 0 @@ -49,7 +49,7 @@ inherited frViewFiltroBase: TfrViewFiltroBase StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.SkinName = '' TabOrder = 0 - Width = 273 + Width = 250 end object edtFechaIniFiltro: TcxDateEdit Left = 87 @@ -73,10 +73,10 @@ inherited frViewFiltroBase: TfrViewFiltroBase StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.SkinName = '' TabOrder = 2 - Width = 121 + Width = 250 end object edtFechaFinFiltro: TcxDateEdit - Left = 379 + Left = 386 Top = 37 Properties.OnChange = OnCamposFiltroChange Style.BorderColor = clWindowFrame @@ -97,10 +97,10 @@ inherited frViewFiltroBase: TfrViewFiltroBase StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.SkinName = '' TabOrder = 3 - Width = 121 + Width = 250 end object txtFiltroTodo2: TcxTextEdit - Left = 267 + Left = 386 Top = 10 Properties.OnChange = OnCamposFiltroChange Style.BorderColor = clWindowFrame @@ -119,7 +119,7 @@ inherited frViewFiltroBase: TfrViewFiltroBase StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.SkinName = '' TabOrder = 1 - Width = 468 + Width = 250 end object dxLayoutControl1Group_Root: TdxLayoutGroup ShowCaption = False @@ -140,6 +140,7 @@ inherited frViewFiltroBase: TfrViewFiltroBase object dxLayoutControl1Item4: TdxLayoutItem AutoAligns = [aaVertical] AlignHorz = ahClient + Caption = 'y' Control = txtFiltroTodo2 ControlOptions.ShowBorder = False end @@ -168,8 +169,8 @@ inherited frViewFiltroBase: TfrViewFiltroBase end object TBXAlignmentPanel1: TTBXAlignmentPanel Left = 0 - Top = 68 - Width = 612 + Top = 70 + Width = 671 Height = 30 Margins.Left = 10 Align = alTop @@ -177,7 +178,7 @@ inherited frViewFiltroBase: TfrViewFiltroBase object tbxBotones: TTBXToolbar Left = 10 Top = 0 - Width = 602 + Width = 661 Height = 30 Align = alTop AutoResize = False diff --git a/Source/GUIBase/uViewFiltroBase.pas b/Source/GUIBase/uViewFiltroBase.pas index 1ac572c..d3883d1 100644 --- a/Source/GUIBase/uViewFiltroBase.pas +++ b/Source/GUIBase/uViewFiltroBase.pas @@ -116,7 +116,7 @@ end; procedure TfrViewFiltroBase.LimpiarCampos; begin txtFiltroTodo.Clear; -// txtFiltroTodo2.Clear; + txtFiltroTodo2.Clear; edtFechaIniFiltro.Clear; edtFechaFinFiltro.Clear; end; @@ -157,7 +157,7 @@ end; function TfrViewFiltroBase.GetTexto2: String; begin -// Result := txtFiltroTodo2.Text; + Result := txtFiltroTodo2.Text; end; procedure TfrViewFiltroBase.SetTexto(const Value: String); @@ -167,7 +167,7 @@ end; procedure TfrViewFiltroBase.SetTexto2(const Value: String); begin - txtFiltroTodo.Text := Value; + txtFiltroTodo2.Text := Value; end; end. diff --git a/Source/GUIBase/uViewGrid.dfm b/Source/GUIBase/uViewGrid.dfm index 0fcddf7..2a1414c 100644 --- a/Source/GUIBase/uViewGrid.dfm +++ b/Source/GUIBase/uViewGrid.dfm @@ -80,6 +80,7 @@ inherited frViewGrid: TfrViewGrid Visible = False ReadOnly = False ExplicitWidth = 554 + ExplicitHeight = 102 inherited TBXDockablePanel1: TTBXDockablePanel ExplicitWidth = 554 ExplicitHeight = 102 @@ -91,26 +92,43 @@ inherited frViewGrid: TfrViewGrid StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitWidth = 457 - Width = 457 + ExplicitWidth = 250 + Width = 250 end inherited edtFechaIniFiltro: TcxDateEdit Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitWidth = 240 - Width = 240 + ExplicitWidth = 250 + Width = 250 end inherited edtFechaFinFiltro: TcxDateEdit - Left = 344 + Left = 321 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 344 - ExplicitWidth = 200 - Width = 200 + ExplicitLeft = 321 + ExplicitWidth = 250 + Width = 250 + end + inherited txtFiltroTodo2: TcxTextEdit + Left = 321 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 321 + ExplicitWidth = 250 + Width = 250 + end + inherited dxLayoutControl1Group_Root: TdxLayoutGroup + inherited dxLayoutControl1Group2: TdxLayoutGroup + inherited dxLayoutControl1Item4: TdxLayoutItem + Visible = False + end + end end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel @@ -135,7 +153,6 @@ inherited frViewGrid: TfrViewGrid SupportedDocks = [dkStandardDock, dkMultiDock] TabOrder = 2 Visible = False - ExplicitWidth = 128 object TBXAlignmentPanel1: TTBXAlignmentPanel Left = 0 Top = 0 @@ -183,7 +200,7 @@ inherited frViewGrid: TfrViewGrid PrinterPage.ScaleMode = smFit PrinterPage._dxMeasurementUnits_ = 0 PrinterPage._dxLastMU_ = 2 - ReportDocument.CreationDate = 40113.806179872680000000 + ReportDocument.CreationDate = 44649.770773101850000000 StyleManager = dmBase.dxPrintStyleManager1 OptionsCards.Shadow.Depth = 0 OptionsExpanding.ExpandGroupRows = True diff --git a/Source/GUIBase/uViewGridBase.pas b/Source/GUIBase/uViewGridBase.pas index d038cfc..5d871ee 100644 --- a/Source/GUIBase/uViewGridBase.pas +++ b/Source/GUIBase/uViewGridBase.pas @@ -65,6 +65,10 @@ type function GetFilter: string; property Filter: string read GetFilter write SetFilter; + procedure SetFilter2(const Value: string); + function GetFilter2: string; + property Filter2: string read GetFilter2 write SetFilter2; + function GetFiltered: Boolean; property Filtered : Boolean read GetFiltered; @@ -115,8 +119,8 @@ type function GetViewFiltros: IViewFiltroBase; procedure SetViewFiltros(const Value: IViewFiltroBase); virtual; procedure FilterChanged(Sender : TObject); virtual; - procedure FiltrarGrid(TextoFiltro: String); virtual; - procedure FiltrarGrid2(TextoFiltro : String); + procedure FiltrarGrid(TextoFiltro1, TextoFiltro2: String); overload; virtual; + procedure FiltrarGrid(TextoFiltro : String); overload; virtual; public constructor Create(AOwner: TComponent); override; @@ -147,6 +151,7 @@ type procedure RestoreFromRegistry (const Path : String); virtual; procedure RestoreFromIniFile; + procedure ConfigView; virtual; procedure StoreToIniFile; {function Locate(const AItemIndex: Integer; const AValue: String; @@ -220,6 +225,11 @@ begin // end; +procedure TfrViewGridBase.ConfigView; +begin +// +end; + procedure TfrViewGridBase.ContraerTodo; begin if Assigned(_FocusedView) then @@ -346,7 +356,7 @@ begin if Assigned(ViewFiltros) then begin Filter := ViewFiltros.Texto; -// Filter2 := ViewFiltros.Texto2; + Filter2 := ViewFiltros.Texto2; end; end; @@ -366,6 +376,8 @@ begin _FocusedView.RestoreFromIniFile(AIniFile + 'grid.xml', True, False, []); end; + + ConfigView; end; procedure TfrViewGridBase.RestoreFromRegistry(const Path: String); @@ -402,8 +414,7 @@ begin if Assigned(ViewFiltros) then ViewFiltros.Texto := FFilter; - FiltrarGrid(FFilter); -// FiltrarGrid('add'); + FiltrarGrid(FFilter, FFilter2); //Obliga a generar todos los filtros de las vista hija AnadirOtrosFiltros; @@ -417,16 +428,16 @@ begin FFilter2 := Value; //Así tendremos el mismo valor en el filtro simple que en el filtro en detalle -// if Assigned(ViewFiltros) then -// ViewFiltros.Texto := FFilter; + if Assigned(ViewFiltros) then + ViewFiltros.Texto2 := FFilter2; -// FiltrarGrid2(FFilter2); + FiltrarGrid(FFilter, FFilter2); //Obliga a generar todos los filtros de las vista hija -// AnadirOtrosFiltros; + AnadirOtrosFiltros; -// if Assigned(FOnFilterChanged) then -// FOnFilterChanged(Self); + if Assigned(FOnFilterChanged) then + FOnFilterChanged(Self); end; procedure TfrViewGridBase.SetMultiSelect(const Value: Boolean); @@ -492,7 +503,7 @@ begin _FocusedView.StoreToRegistry(Path + '\\GridSettings\\' + Self.Name, False, [], Self.Name); end; -procedure TfrViewGridBase.FiltrarGrid(TextoFiltro : String); +procedure TfrViewGridBase.FiltrarGrid(TextoFiltro1, TextoFiltro2 : String); var Columna: TcxGridDBColumn; i: Integer; @@ -504,7 +515,7 @@ begin try Options := [fcoCaseInsensitive, fcoSoftCompare]; Root.Clear; - if Length(TextoFiltro) > 0 then + if Length(TextoFiltro1) > 0 then begin AItemList := Root.AddItemList(fboAnd); AItemList.BoolOperatorKind := fboOr; @@ -512,10 +523,24 @@ begin begin Columna := (_FocusedView as TcxGridDBTableView).Columns[i]; if (Length(Columna.Caption) > 0) and (Columna.Caption <> 'RecID') then - AItemList.AddItem(Columna, foLike, '%'+TextoFiltro+'%', IntToStr(i)); + AItemList.AddItem(Columna, foLike, '%'+TextoFiltro1+'%', IntToStr(i)); end; - Active := True; - end + end; + + if Length(TextoFiltro2) > 0 then + begin + AItemList := Root.AddItemList(fboAnd); + AItemList.BoolOperatorKind := fboOr; + for i:=0 to (_FocusedView as TcxGridDBTableView).ColumnCount - 1 do + begin + Columna := (_FocusedView as TcxGridDBTableView).Columns[i]; + if (Length(Columna.Caption) > 0) and (Columna.Caption <> 'RecID') then + AItemList.AddItem(Columna, foLike, '%'+TextoFiltro2+'%', IntToStr(i)); + end; + end; + + if ((Length(TextoFiltro1) > 0) or (Length(TextoFiltro2) > 0)) then + Active := True else Active := False; finally @@ -525,7 +550,7 @@ begin end; -procedure TfrViewGridBase.FiltrarGrid2(TextoFiltro: String); +procedure TfrViewGridBase.FiltrarGrid(TextoFiltro: String); var Columna: TcxGridDBColumn; i: Integer; @@ -536,7 +561,7 @@ begin BeginUpdate; try Options := [fcoCaseInsensitive, fcoSoftCompare]; -// Root.Clear; + Root.Clear; if Length(TextoFiltro) > 0 then begin AItemList := Root.AddItemList(fboAnd); diff --git a/Source/Informes/1/InfAlbaranCliente.fr3 b/Source/Informes/1/InfAlbaranCliente.fr3 index e7ef86c..4f91be2 100644 --- a/Source/Informes/1/InfAlbaranCliente.fr3 +++ b/Source/Informes/1/InfAlbaranCliente.fr3 @@ -1,20 +1,19 @@ - + - - - - - - - - - - - + + + + + + + + + + - + @@ -22,7 +21,7 @@ - + @@ -33,14 +32,15 @@ - - - - - - + + + + + + + - + diff --git a/Source/Informes/1/InfAlbaranProveedor.fr3 b/Source/Informes/1/InfAlbaranProveedor.fr3 index 18c9b39..d5f134f 100644 --- a/Source/Informes/1/InfAlbaranProveedor.fr3 +++ b/Source/Informes/1/InfAlbaranProveedor.fr3 @@ -1,28 +1,27 @@ - + - - - - - - - - - - - + + + + + + + + + + - - + + - + - + @@ -30,14 +29,15 @@ - - - - - - + + + + + + + - + diff --git a/Source/Informes/1/InfContratoCliente.fr3 b/Source/Informes/1/InfContratoCliente.fr3 index e37538b..fe5289e 100644 --- a/Source/Informes/1/InfContratoCliente.fr3 +++ b/Source/Informes/1/InfContratoCliente.fr3 @@ -1,23 +1,22 @@ - + - - - - - - - - - - - + + + + + + + + + + - + - + @@ -25,7 +24,7 @@ - + @@ -33,7 +32,7 @@ - + @@ -43,7 +42,7 @@ - + @@ -65,17 +64,18 @@ - - + + - - - - - + + + + + + diff --git a/Source/Informes/1/InfFacturaCliente.fr3 b/Source/Informes/1/InfFacturaCliente.fr3 index b3f7bb6..4db76d9 100644 --- a/Source/Informes/1/InfFacturaCliente.fr3 +++ b/Source/Informes/1/InfFacturaCliente.fr3 @@ -1,24 +1,23 @@ - + - - - - - + + + + + - - + - - + + @@ -41,21 +40,22 @@ - + - - - - - - + + + + + + + - + diff --git a/Source/Informes/1/InfPedidoProveedor.fr3 b/Source/Informes/1/InfPedidoProveedor.fr3 index 9cfa68e..16be370 100644 --- a/Source/Informes/1/InfPedidoProveedor.fr3 +++ b/Source/Informes/1/InfPedidoProveedor.fr3 @@ -1,12 +1,12 @@ - + - + @@ -14,10 +14,10 @@ - + - + @@ -31,11 +31,12 @@ - - - - - + + + + + + diff --git a/Source/Informes/1/InfPresupuestoCliente.fr3 b/Source/Informes/1/InfPresupuestoCliente.fr3 index fa572cf..5e347f6 100644 --- a/Source/Informes/1/InfPresupuestoCliente.fr3 +++ b/Source/Informes/1/InfPresupuestoCliente.fr3 @@ -1,19 +1,18 @@ - + - - - - - - - + + + + + + - + - + @@ -21,7 +20,7 @@ - + @@ -29,7 +28,7 @@ - + @@ -39,7 +38,7 @@ - + @@ -61,17 +60,18 @@ - + - - - - - + + + + + + - + diff --git a/Source/Informes/2/4/InfContratoCliente.fr3 b/Source/Informes/2/4/InfContratoCliente.fr3 index feb4c34..20d767e 100644 --- a/Source/Informes/2/4/InfContratoCliente.fr3 +++ b/Source/Informes/2/4/InfContratoCliente.fr3 @@ -1,17 +1,16 @@ - + - - - - + + + + - + - - + @@ -69,25 +68,28 @@ - - - - - + + + + + + - - - - - + + + + - - + - + + + + + diff --git a/Source/Informes/2/4/InfFacturaCliente.fr3 b/Source/Informes/2/4/InfFacturaCliente.fr3 index 84f245b..78b73c9 100644 --- a/Source/Informes/2/4/InfFacturaCliente.fr3 +++ b/Source/Informes/2/4/InfFacturaCliente.fr3 @@ -1,25 +1,24 @@ - + - - - - - - + + + + + + - - + - - + + @@ -42,21 +41,22 @@ - + - + + + - - - - + + + - + diff --git a/Source/Informes/2/4/InfPresupuestoCliente.fr3 b/Source/Informes/2/4/InfPresupuestoCliente.fr3 index cc82dec..db192ef 100644 --- a/Source/Informes/2/4/InfPresupuestoCliente.fr3 +++ b/Source/Informes/2/4/InfPresupuestoCliente.fr3 @@ -1,20 +1,19 @@ - + - - - - - + + + + + - - + - + - + @@ -22,7 +21,7 @@ - + @@ -30,7 +29,7 @@ - + @@ -40,7 +39,7 @@ - + @@ -61,19 +60,19 @@ - + - - - + + + - - + + - + @@ -85,10 +84,9 @@ - - - - + + + diff --git a/Source/Informes/2/4/InfReciboCliente.fr3 b/Source/Informes/2/4/InfReciboCliente.fr3 index 997d6e8..028ba09 100644 --- a/Source/Informes/2/4/InfReciboCliente.fr3 +++ b/Source/Informes/2/4/InfReciboCliente.fr3 @@ -1,12 +1,12 @@ - + - + @@ -52,9 +52,9 @@ - - - + + + diff --git a/Source/Modulos/Albaranes de proveedor/Controller/uDetallesAlbaranProveedorController.pas b/Source/Modulos/Albaranes de proveedor/Controller/uDetallesAlbaranProveedorController.pas index 9105a09..01635cd 100644 --- a/Source/Modulos/Albaranes de proveedor/Controller/uDetallesAlbaranProveedorController.pas +++ b/Source/Modulos/Albaranes de proveedor/Controller/uDetallesAlbaranProveedorController.pas @@ -26,6 +26,7 @@ type procedure AsignarController; override; //Si sobreescribimos este método podremos tener en cuenta otras columnas para el calculo del importe total de un concepto function CalcularImporteTotalConcepto(DataTable: TDADataTable): Double; override; + procedure CalculoDetalleConcepto(DataTable: TDADataTable; var ImporteAcumulado : Double; var ImporteTotal : Double; const Opcional: Boolean); override; procedure ValidarCampos(DataTable: TDADataTable); override; procedure DesglosarPorteDetalles(ImportePorte: Currency; ADetalles: IDAStronglyTypedDataTable); function DarTotalPorteTotal(ADetalles: IDAStronglyTypedDataTable): Double; @@ -40,7 +41,7 @@ type implementation uses Variants, uDialogUtils, uControllerDetallesBase, uDataModuleAlbaranesProveedor, uArticulosAlbaranProveedorController, - uDataTableUtils, uCalculosUtils; + uDataTableUtils, uCalculosUtils, uNumUtils; { TDetallesAlbaranProveedorController } @@ -94,7 +95,22 @@ end; function TDetallesAlbaranProveedorController.CalcularImporteTotalConcepto(DataTable: TDADataTable): Double; begin - Result := CalcularLineaConcepto(DataTable); +//Calcular con 4 decimales + Result := CalcularLineaConcepto(DataTable, 4); +end; + +procedure TDetallesAlbaranProveedorController.CalculoDetalleConcepto( + DataTable: TDADataTable; var ImporteAcumulado, ImporteTotal: Double; + const Opcional: Boolean); +begin + with DataTable do + begin + ImporteAcumulado := ImporteAcumulado + RoundCurrency(FieldByName(CAMPO_IMPORTE_TOTAL).AsCurrency, 4); +// ImporteAcumulado := ImporteAcumulado + FieldByName(CAMPO_IMPORTE_TOTAL).AsFloat; + if not Opcional then + ImporteTotal := ImporteTotal + RoundCurrency(FieldByName(CAMPO_IMPORTE_TOTAL).AsCurrency, 4); +// ImporteTotal := ImporteTotal + FieldByName(CAMPO_IMPORTE_TOTAL).AsFloat; + end; end; constructor TDetallesAlbaranProveedorController.Create; diff --git a/Source/Modulos/Albaranes de proveedor/Views/uViewDetallesAlbaranProveedor.dfm b/Source/Modulos/Albaranes de proveedor/Views/uViewDetallesAlbaranProveedor.dfm index 2c1e05a..765056f 100644 --- a/Source/Modulos/Albaranes de proveedor/Views/uViewDetallesAlbaranProveedor.dfm +++ b/Source/Modulos/Albaranes de proveedor/Views/uViewDetallesAlbaranProveedor.dfm @@ -1,9 +1,31 @@ inherited frViewDetallesAlbaranProveedor: TfrViewDetallesAlbaranProveedor inherited cxGrid: TcxGrid inherited cxGridView: TcxGridDBTableView + inherited cxGridViewDESCRIPCION: TcxGridDBColumn + PropertiesClassName = 'TcxTextEditProperties' + Properties.AutoSelect = True + end + inherited cxGridViewIMPORTEUNIDAD: TcxGridDBColumn + Properties.DecimalPlaces = 4 + Properties.DisplayFormat = ',0.0000 '#8364';-,0.0000 '#8364 + Properties.EditFormat = ',0.0000;-,0.0000' + end inherited cxGridViewIMPORTENETO: TcxGridDBColumn + Properties.DecimalPlaces = 4 + Properties.DisplayFormat = ',0.0000 '#8364';-,0.0000 '#8364 + Properties.EditFormat = ',0.0000;-,0.0000' Properties.ReadOnly = False end + inherited cxGridViewIMP_UNIDAD_DTO: TcxGridDBColumn + Properties.DecimalPlaces = 4 + Properties.DisplayFormat = ',0.0000 '#8364';-,0.0000 '#8364 + Properties.EditFormat = ',0.0000;-,0.0000' + end + inherited cxGridViewIMPORTETOTAL: TcxGridDBColumn + Properties.DecimalPlaces = 4 + Properties.DisplayFormat = ',0.0000 '#8364';-,0.0000 '#8364 + Properties.EditFormat = ',0.0000;-,0.0000' + end end end end diff --git a/Source/Modulos/Albaranes de proveedor/Views/uViewDireccionEntregaAlbaranProv.dfm b/Source/Modulos/Albaranes de proveedor/Views/uViewDireccionEntregaAlbaranProv.dfm index cf9a225..e666d5f 100644 --- a/Source/Modulos/Albaranes de proveedor/Views/uViewDireccionEntregaAlbaranProv.dfm +++ b/Source/Modulos/Albaranes de proveedor/Views/uViewDireccionEntregaAlbaranProv.dfm @@ -43,7 +43,6 @@ inherited frViewDireccionEntregaAlbaranProv: TfrViewDireccionEntregaAlbaranProv DataBinding.DataField = 'ID_ALMACEN' DataBinding.DataSource = dsAlbaran Properties.DropDownListStyle = lsFixedList - Properties.GridMode = True Properties.ImmediatePost = True Properties.KeyFieldNames = 'ID' Properties.ListColumns = < @@ -53,6 +52,7 @@ inherited frViewDireccionEntregaAlbaranProv: TfrViewDireccionEntregaAlbaranProv Properties.ListOptions.AnsiSort = True Properties.ListOptions.GridLines = glNone Properties.ListOptions.ShowHeader = False + Properties.ListOptions.SyncMode = True Properties.ListSource = dsAlmacenes Properties.PostPopupValueOnTab = True Style.BorderColor = clWindowFrame diff --git a/Source/Modulos/Albaranes de proveedor/Views/uViewElegirArticulosAlbaranesProveedor.dfm b/Source/Modulos/Albaranes de proveedor/Views/uViewElegirArticulosAlbaranesProveedor.dfm index 409d0b5..681eae6 100644 --- a/Source/Modulos/Albaranes de proveedor/Views/uViewElegirArticulosAlbaranesProveedor.dfm +++ b/Source/Modulos/Albaranes de proveedor/Views/uViewElegirArticulosAlbaranesProveedor.dfm @@ -6,6 +6,32 @@ inherited frViewElegirArticulosAlbaranesProveedor: TfrViewElegirArticulosAlbaran Height = 286 ExplicitHeight = 286 inherited cxGridView: TcxGridDBTableView + inherited cxGridViewPRECIO_COSTE: TcxGridDBColumn + Caption = 'Precio material' + Properties.DecimalPlaces = 4 + Properties.DisplayFormat = ',0.0000 '#8364';-,0.0000 '#8364 + Properties.EditFormat = ',0.0000 '#8364';-,0.0000 '#8364 + end + inherited cxGridViewDESCUENTO: TcxGridDBColumn + Visible = True + end + inherited cxGridViewPRECIO_NETO: TcxGridDBColumn + Caption = 'Precio coste' + Properties.DecimalPlaces = 4 + Properties.DisplayFormat = ',0.0000 '#8364';-,0.0000 '#8364 + Properties.EditFormat = ',0.0000 '#8364';-,0.0000 '#8364 + Visible = True + end + inherited cxGridViewPRECIO_PVP: TcxGridDBColumn + Properties.DecimalPlaces = 4 + Properties.DisplayFormat = ',0.0000 '#8364';-,0.0000 '#8364 + end + inherited cxGridViewPRECIOPVP2: TcxGridDBColumn + Properties.DecimalPlaces = 4 + Properties.DisplayFormat = ',0.0000 '#8364';-,0.0000 '#8364 + Visible = False + VisibleForCustomization = False + end object cxGridViewID_PROVEEDOR: TcxGridDBColumn DataBinding.FieldName = 'ID_PROVEEDOR' Visible = False @@ -17,6 +43,9 @@ inherited frViewElegirArticulosAlbaranesProveedor: TfrViewElegirArticulosAlbaran inherited cxGridLevel2: TcxGridLevel Visible = False end + inherited cxGridLevel3: TcxGridLevel + Caption = 'COMPRAS' + end end inherited frViewFiltroBase1: TfrViewFiltroBase inherited TBXDockablePanel1: TTBXDockablePanel @@ -38,13 +67,25 @@ inherited frViewElegirArticulosAlbaranesProveedor: TfrViewElegirArticulosAlbaran Width = 121 end inherited edtFechaFinFiltro: TcxDateEdit + Left = 549 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 549 ExplicitWidth = 121 Width = 121 end + inherited txtFiltroTodo2: TcxTextEdit + Left = 548 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 548 + ExplicitWidth = 223 + Width = 223 + end end end end diff --git a/Source/Modulos/Articulos/Model/schArticulosClient_Intf.pas b/Source/Modulos/Articulos/Model/schArticulosClient_Intf.pas index 77610c5..cec1997 100644 --- a/Source/Modulos/Articulos/Model/schArticulosClient_Intf.pas +++ b/Source/Modulos/Articulos/Model/schArticulosClient_Intf.pas @@ -9,10 +9,10 @@ const { Data table rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_Articulos_Proveedores = '{5D678D12-69CE-4F8D-B0A7-935BC46AB396}'; - RID_Articulos = '{7C64A385-817F-4F17-8431-34FCCA700469}'; - RID_ArticulosParaCompra = '{2CB03BC7-A75E-45C1-B0F4-A0041572AEFF}'; - RID_ArticulosParaCliente = '{790C555B-1C87-4A88-8A26-D950849B291C}'; + RID_Articulos_Proveedores = '{35843459-699A-4277-B2A0-79EAA4797337}'; + RID_Articulos = '{104266C2-105C-4BBC-8B7A-C7B2025F4904}'; + RID_ArticulosParaCompra = '{C0A12E36-ACA2-4A22-B567-DCD20CA71CC8}'; + RID_ArticulosParaCliente = '{671736FB-3604-456E-A90C-A2740C9ADCB8}'; { Data table names } nme_Articulos_Proveedores = 'Articulos_Proveedores'; @@ -201,7 +201,7 @@ const type { IArticulos_Proveedores } IArticulos_Proveedores = interface(IDAStronglyTypedDataTable) - ['{6375AC3C-024A-4EE1-8F95-103234615EE6}'] + ['{4A8C9D9E-C6FC-4EA4-8585-36688DFA9180}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -356,7 +356,7 @@ type { IArticulos } IArticulos = interface(IDAStronglyTypedDataTable) - ['{D41402F4-E414-498B-9D9C-9911FDA7CB91}'] + ['{642CA1F3-2076-4C49-BAAA-13B28C63236D}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -679,7 +679,7 @@ type { IArticulosParaCompra } IArticulosParaCompra = interface(IDAStronglyTypedDataTable) - ['{181773CE-BBDC-4BC0-B64A-D0ACA39DF9B2}'] + ['{55011903-66C8-4B18-80EE-45701EDE1A4E}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1002,7 +1002,7 @@ type { IArticulosParaCliente } IArticulosParaCliente = interface(IDAStronglyTypedDataTable) - ['{A6F2D4A2-8C62-4F02-8EEE-B132F5DD263E}'] + ['{276845CB-1DD2-4A12-B708-594EA6615D55}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); diff --git a/Source/Modulos/Articulos/Model/schArticulosServer_Intf.pas b/Source/Modulos/Articulos/Model/schArticulosServer_Intf.pas index 5256cf0..1cd109e 100644 --- a/Source/Modulos/Articulos/Model/schArticulosServer_Intf.pas +++ b/Source/Modulos/Articulos/Model/schArticulosServer_Intf.pas @@ -9,15 +9,15 @@ const { Delta rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_Articulos_ProveedoresDelta = '{677EF24F-54AB-443D-8530-B8B18B38C132}'; - RID_ArticulosDelta = '{7D88B4CD-D716-4173-85EF-69526AA81C4D}'; - RID_ArticulosParaCompraDelta = '{20C0E521-A90A-4CEB-8070-C96D1C33F103}'; - RID_ArticulosParaClienteDelta = '{B8F9252C-D13A-4190-ADA5-4CE30B7E4BFB}'; + RID_Articulos_ProveedoresDelta = '{508E14D6-DD8E-46A3-86B4-C4052CE37515}'; + RID_ArticulosDelta = '{D4A65D75-7A38-4EC0-94EE-9FBF9C9E1075}'; + RID_ArticulosParaCompraDelta = '{C6706F97-CAC5-4DC0-9A73-E43F0F127EE6}'; + RID_ArticulosParaClienteDelta = '{8C543A96-1303-4102-8B9F-B59196B961DE}'; type { IArticulos_ProveedoresDelta } IArticulos_ProveedoresDelta = interface(IArticulos_Proveedores) - ['{677EF24F-54AB-443D-8530-B8B18B38C132}'] + ['{508E14D6-DD8E-46A3-86B4-C4052CE37515}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_ARTICULOValue : Integer; @@ -171,7 +171,7 @@ type { IArticulosDelta } IArticulosDelta = interface(IArticulos) - ['{7D88B4CD-D716-4173-85EF-69526AA81C4D}'] + ['{D4A65D75-7A38-4EC0-94EE-9FBF9C9E1075}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -494,7 +494,7 @@ type { IArticulosParaCompraDelta } IArticulosParaCompraDelta = interface(IArticulosParaCompra) - ['{20C0E521-A90A-4CEB-8070-C96D1C33F103}'] + ['{C6706F97-CAC5-4DC0-9A73-E43F0F127EE6}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -817,7 +817,7 @@ type { IArticulosParaClienteDelta } IArticulosParaClienteDelta = interface(IArticulosParaCliente) - ['{B8F9252C-D13A-4190-ADA5-4CE30B7E4BFB}'] + ['{8C543A96-1303-4102-8B9F-B59196B961DE}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; diff --git a/Source/Modulos/Articulos/Views/uEditorArticulo.dfm b/Source/Modulos/Articulos/Views/uEditorArticulo.dfm index 4ad5672..83efe82 100644 --- a/Source/Modulos/Articulos/Views/uEditorArticulo.dfm +++ b/Source/Modulos/Articulos/Views/uEditorArticulo.dfm @@ -16,7 +16,7 @@ inherited fEditorArticulo: TfEditorArticulo Width = 957 Caption = 'Art'#237'culo' ExplicitTop = 52 - ExplicitWidth = 624 + ExplicitWidth = 957 inherited Image1: TImage Left = 930 Picture.Data = { @@ -38,7 +38,7 @@ inherited fEditorArticulo: TfEditorArticulo end inherited TBXDock: TTBXDock Width = 957 - ExplicitWidth = 624 + ExplicitWidth = 957 inherited tbxMain: TTBXToolbar ExplicitWidth = 543 inherited TBXItem2: TTBXItem @@ -107,26 +107,25 @@ inherited fEditorArticulo: TfEditorArticulo item Width = 200 end> - ExplicitTop = 461 - ExplicitWidth = 624 + ExplicitTop = 650 + ExplicitWidth = 957 end inherited pgPaginas: TPageControl Width = 951 Height = 535 + ActivePage = pagPrecios ExplicitTop = 112 - ExplicitWidth = 618 - ExplicitHeight = 346 + ExplicitWidth = 951 + ExplicitHeight = 535 inherited pagGeneral: TTabSheet - ExplicitLeft = 3 - ExplicitTop = 25 + ExplicitLeft = 4 + ExplicitTop = 24 ExplicitWidth = 943 ExplicitHeight = 507 end object pagPrecios: TTabSheet Caption = 'Precios' ImageIndex = 1 - ExplicitWidth = 610 - ExplicitHeight = 318 inline frViewProveedoresArticulo1: TfrViewProveedoresArticulo Left = 0 Top = 0 @@ -141,7 +140,6 @@ inherited fEditorArticulo: TfEditorArticulo ParentFont = False TabOrder = 0 ReadOnly = False - ExplicitTop = -3 ExplicitWidth = 943 ExplicitHeight = 507 inherited cxGrid: TcxGrid @@ -160,7 +158,7 @@ inherited fEditorArticulo: TfEditorArticulo inherited PnlComentario: TPanel Width = 957 ExplicitTop = 79 - ExplicitWidth = 624 + ExplicitWidth = 957 inherited lbComentario: TLabel Width = 947 Height = 25 diff --git a/Source/Modulos/Articulos/Views/uEditorArticulos.dfm b/Source/Modulos/Articulos/Views/uEditorArticulos.dfm index cdf3986..bab4347 100644 --- a/Source/Modulos/Articulos/Views/uEditorArticulos.dfm +++ b/Source/Modulos/Articulos/Views/uEditorArticulos.dfm @@ -29,13 +29,20 @@ inherited fEditorArticulos: TfEditorArticulos ExplicitWidth = 543 end inherited tbxFiltro: TTBXToolbar + ExplicitWidth = 406 inherited tbxEditFiltro: TTBXEditItem EditOptions = [tboUseEditWhenVertical] end + inherited tbxEditFiltro2: TTBXEditItem + Enabled = True + Visible = True + end end inherited TBXTMain2: TTBXToolbar + Left = 406 DockPos = 275 Visible = True + ExplicitLeft = 406 ExplicitWidth = 117 object TBXItem38: TTBXItem Action = actAsignarTarifa diff --git a/Source/Modulos/Articulos/Views/uViewArticulos.dfm b/Source/Modulos/Articulos/Views/uViewArticulos.dfm index e128b9a..90e8b3a 100644 --- a/Source/Modulos/Articulos/Views/uViewArticulos.dfm +++ b/Source/Modulos/Articulos/Views/uViewArticulos.dfm @@ -226,26 +226,26 @@ inherited frViewArticulos: TfrViewArticulos StyleHot.LookAndFeel.SkinName = '' end inherited edtFechaFinFiltro: TcxDateEdit - Left = 549 + Left = 511 Enabled = False Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 549 + ExplicitLeft = 511 end inherited txtFiltroTodo2: TcxTextEdit - Left = 550 + Left = 511 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 550 + ExplicitLeft = 511 end inherited dxLayoutControl1Group_Root: TdxLayoutGroup inherited dxLayoutControl1Group2: TdxLayoutGroup inherited dxLayoutControl1Item4: TdxLayoutItem - Visible = False + Visible = True end end inherited dxLayoutControl1Group1: TdxLayoutGroup diff --git a/Source/Modulos/Articulos/Views/uViewDetallesArticulos.dfm b/Source/Modulos/Articulos/Views/uViewDetallesArticulos.dfm index d240d17..ce1f386 100644 --- a/Source/Modulos/Articulos/Views/uViewDetallesArticulos.dfm +++ b/Source/Modulos/Articulos/Views/uViewDetallesArticulos.dfm @@ -95,6 +95,7 @@ inherited frViewDetallesArticulos: TfrViewDetallesArticulos Width = 48 end inherited cxGridViewIMPORTEUNIDAD: TcxGridDBColumn + Properties.EditFormat = ',0.00 '#8364';-,0.00 '#8364 Width = 68 end inherited cxGridViewIMPORTENETO: TcxGridDBColumn @@ -104,11 +105,6 @@ inherited frViewDetallesArticulos: TfrViewDetallesArticulos HeaderAlignmentHorz = taRightJustify Width = 29 end - inherited cxGridViewIMP_UNIDAD_DTO: TcxGridDBColumn - Properties.DecimalPlaces = 2 - Properties.DisplayFormat = ',0.00 '#8364';-,0.00 '#8364 - Properties.EditFormat = ',0.00 '#8364';-,0.00 '#8364 - end inherited cxGridViewIMPORTEPORTE: TcxGridDBColumn Caption = 'Porte unidad' Visible = False @@ -116,9 +112,6 @@ inherited frViewDetallesArticulos: TfrViewDetallesArticulos Width = 78 end inherited cxGridViewIMPORTETOTAL: TcxGridDBColumn - Properties.DecimalPlaces = 2 - Properties.DisplayFormat = ',0.00 '#8364';-,0.00 '#8364 - Properties.EditFormat = ',0.00 '#8364';-,0.00 '#8364 Width = 58 end end diff --git a/Source/Modulos/Articulos/Views/uViewProveedoresArticulo.dfm b/Source/Modulos/Articulos/Views/uViewProveedoresArticulo.dfm index 38e855b..8b9f974 100644 --- a/Source/Modulos/Articulos/Views/uViewProveedoresArticulo.dfm +++ b/Source/Modulos/Articulos/Views/uViewProveedoresArticulo.dfm @@ -47,8 +47,9 @@ inherited frViewProveedoresArticulo: TfrViewProveedoresArticulo DataBinding.FieldName = 'PRECIO_COSTE' PropertiesClassName = 'TcxCurrencyEditProperties' Properties.Alignment.Horz = taRightJustify - Properties.DecimalPlaces = 2 - Properties.DisplayFormat = ',0.00 '#8364';-,0.00 '#8364 + Properties.AssignedValues.EditFormat = True + Properties.DecimalPlaces = 4 + Properties.DisplayFormat = ',0.0000 '#8364';-,0.0000 '#8364 HeaderAlignmentHorz = taRightJustify end object cxGridViewDESCUENTO: TcxGridDBColumn @@ -69,8 +70,9 @@ inherited frViewProveedoresArticulo: TfrViewProveedoresArticulo DataBinding.FieldName = 'PRECIO_NETO' PropertiesClassName = 'TcxCurrencyEditProperties' Properties.Alignment.Horz = taRightJustify - Properties.DecimalPlaces = 2 - Properties.DisplayFormat = ',0.00 '#8364';-,0.00 '#8364 + Properties.DecimalPlaces = 4 + Properties.DisplayFormat = ',0.0000 '#8364';-,0.0000 '#8364 + Properties.EditFormat = ',0.0000 '#8364';-,0.0000 '#8364 HeaderAlignmentHorz = taRightJustify Options.Editing = False end @@ -84,8 +86,9 @@ inherited frViewProveedoresArticulo: TfrViewProveedoresArticulo Caption = 'Precio P.V.P (Suministro)' DataBinding.FieldName = 'PRECIO_PVP_VENTA' PropertiesClassName = 'TcxCurrencyEditProperties' - Properties.DecimalPlaces = 2 - Properties.DisplayFormat = ',0.00 '#8364';-,0.00 '#8364 + Properties.DecimalPlaces = 4 + Properties.DisplayFormat = ',0.0000 '#8364';-,0.0000 '#8364 + Properties.EditFormat = ',0.0000 '#8364';-,0.0000 '#8364 Visible = False Options.Editing = False VisibleForCustomization = False @@ -94,8 +97,9 @@ inherited frViewProveedoresArticulo: TfrViewProveedoresArticulo Caption = 'Precio P.V.P (Total)' DataBinding.FieldName = 'PRECIO_PVP_TOTAL' PropertiesClassName = 'TcxCurrencyEditProperties' - Properties.DecimalPlaces = 2 - Properties.DisplayFormat = ',0.00 '#8364';-,0.00 '#8364 + Properties.DecimalPlaces = 4 + Properties.DisplayFormat = ',0.0000 '#8364';-,0.0000 '#8364 + Properties.EditFormat = ',0.0000 '#8364';-,0.0000 '#8364 Visible = False Options.Editing = False VisibleForCustomization = False @@ -110,18 +114,6 @@ inherited frViewProveedoresArticulo: TfrViewProveedoresArticulo inherited ToolBar1: TToolBar Width = 774 ExplicitWidth = 774 - inherited ToolButton1: TToolButton - ExplicitWidth = 62 - end - inherited ToolButton4: TToolButton - ExplicitWidth = 74 - end - inherited ToolButton2: TToolButton - ExplicitWidth = 67 - end - inherited ToolButton7: TToolButton - ExplicitWidth = 117 - end end inherited ActionListContenido: TActionList inherited actModificar: TAction diff --git a/Source/Modulos/Contactos/Contactos_Group.groupproj b/Source/Modulos/Contactos/Contactos_Group.groupproj index 51f0fa9..6876573 100644 --- a/Source/Modulos/Contactos/Contactos_Group.groupproj +++ b/Source/Modulos/Contactos/Contactos_Group.groupproj @@ -14,6 +14,7 @@ + @@ -161,14 +162,23 @@ + + + + + + + + + - + - + - + \ No newline at end of file diff --git a/Source/Modulos/Contactos/Model/uBizContactosServer.pas b/Source/Modulos/Contactos/Model/uBizContactosServer.pas index 5a02880..a7616f7 100644 --- a/Source/Modulos/Contactos/Model/uBizContactosServer.pas +++ b/Source/Modulos/Contactos/Model/uBizContactosServer.pas @@ -151,6 +151,7 @@ begin //En el caso de querer tener los contactos separados por empresas en lugar de tenerlos en común ACommand := ASchema.NewCommand(ACurrentConn, 'Insert_ContactoEmpresa'); + //En el caso de querer tener los contactos en común para todas las empresas // ACommand := ASchema.NewCommand(ACurrentConn, 'Insert_ContactoEmpresas'); try diff --git a/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.dfm b/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.dfm index e24ef81..8ede5eb 100644 --- a/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.dfm +++ b/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.dfm @@ -367,8 +367,9 @@ object RptContratosCliente: TRptContratosCliente ' V_CONTRATOS_CLIENTE.POBLACION_ENVIO,'#10' V_CONTRATOS_CLIENTE.' + 'PROVINCIA_ENVIO,'#10' V_CONTRATOS_CLIENTE.CODIGO_POSTAL_ENVIO,'#10' ' + ' V_CONTRATOS_CLIENTE.PERS_CONTACTO_ENVIO,'#10' V_CONTRATOS_CLIEN' + - 'TE.TLFS_ENVIO,'#10' V_CONTRATOS_CLIENTE.NOTAS_ENVIO'#10'FROM'#10' V_CO' + - 'NTRATOS_CLIENTE'#10'WHERE'#10' V_CONTRATOS_CLIENTE.ID = :ID'#10 + 'TE.TLFS_ENVIO,'#10' V_CONTRATOS_CLIENTE.NOTAS_ENVIO,'#10' V_CONTRA' + + 'TOS_CLIENTE.ID_TIENDA,'#10' V_CONTRATOS_CLIENTE.TIENDA'#10'FROM'#10' V' + + '_CONTRATOS_CLIENTE'#10'WHERE'#10' V_CONTRATOS_CLIENTE.ID = :ID'#10 StatementType = stSQL ColumnMappings = < item @@ -522,6 +523,14 @@ object RptContratosCliente: TRptContratosCliente item DatasetField = 'NOTAS_ENVIO' TableField = 'NOTAS_ENVIO' + end + item + DatasetField = 'ID_TIENDA' + TableField = 'ID_TIENDA' + end + item + DatasetField = 'TIENDA' + TableField = 'TIENDA' end> end> Name = 'Informe_Cabecera' @@ -697,6 +706,15 @@ object RptContratosCliente: TRptContratosCliente Name = 'NOTAS_ENVIO' DataType = datString Size = 255 + end + item + Name = 'ID_TIENDA' + DataType = datInteger + end + item + Name = 'TIENDA' + DataType = datString + Size = 255 end> ReadOnly = True end @@ -1295,6 +1313,15 @@ object RptContratosCliente: TRptContratosCliente Name = 'NOTAS_ENVIO' DataType = datString Size = 255 + end + item + Name = 'ID_TIENDA' + DataType = datInteger + end + item + Name = 'TIENDA' + DataType = datString + Size = 255 end> Params = < item diff --git a/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.pas b/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.pas index 5375cb4..1bf745d 100644 --- a/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.pas +++ b/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.pas @@ -593,7 +593,7 @@ begin tbl_Detalles.Active := True; tbl_Condiciones.Active := True; - AInforme := DarRutaFichero(DarRutaInformes, rptInforme, tbl_Cabecera.FieldByName('ID_EMPRESA').AsString); + AInforme := DarRutaFichero(DarRutaInformes, rptInforme, tbl_Cabecera.FieldByName('ID_EMPRESA').AsString, tbl_Cabecera.FieldByName('ID_TIENDA').AsString); if VarIsNull(AInforme) then raise Exception.Create (('Error Servidor: _GenerarContrato, no encuentra informe ' + rptInforme)); diff --git a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm index 5997a9e..97a7293 100644 --- a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm @@ -2,7 +2,6 @@ inherited fEditorContratosCliente: TfEditorContratosCliente Caption = 'Lista de contratos de cliente' ClientWidth = 805 ExplicitWidth = 813 - ExplicitHeight = 482 PixelsPerInch = 96 TextHeight = 13 inherited JvNavPanelHeader: TJvNavPanelHeader @@ -163,7 +162,7 @@ inherited fEditorContratosCliente: TfEditorContratosCliente end end inherited tbxFiltro: TTBXToolbar - ExplicitWidth = 454 + ExplicitWidth = 504 inherited lblAno: TTBXLabelItem Visible = True end @@ -173,6 +172,10 @@ inherited fEditorContratosCliente: TfEditorContratosCliente inherited sepAno: TTBXSeparatorItem Visible = True end + inherited tbxEditFiltro2: TTBXEditItem + Enabled = True + Visible = True + end end inherited tbxMenu: TTBXToolbar ExplicitWidth = 805 @@ -196,11 +199,11 @@ inherited fEditorContratosCliente: TfEditorContratosCliente end end inherited TBXTMain2: TTBXToolbar - Left = 454 + Left = 504 DockPos = 343 Visible = True - ExplicitLeft = 454 - ExplicitWidth = 351 + ExplicitLeft = 504 + ExplicitWidth = 301 object TBXSeparatorItem18: TTBXSeparatorItem end object TBXItem40: TTBXItem diff --git a/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.dfm b/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.dfm index a0e4f1f..9450c36 100644 --- a/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.dfm @@ -61,6 +61,12 @@ inherited frViewContratosCliente: TfrViewContratosCliente VisibleForCustomization = False Width = 20 end + object cxGridViewTIENDA: TcxGridDBColumn + Caption = 'Tienda' + DataBinding.FieldName = 'TIENDA' + Visible = False + VisibleForCustomization = False + end object cxGridViewREFERENCIA: TcxGridDBColumn DataBinding.FieldName = 'REFERENCIA' BestFitMaxWidth = 25 @@ -173,26 +179,43 @@ inherited frViewContratosCliente: TfrViewContratosCliente StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitWidth = 806 - Width = 806 + ExplicitWidth = 250 + Width = 250 end inherited edtFechaIniFiltro: TcxDateEdit Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitWidth = 285 - Width = 285 + ExplicitWidth = 250 + Width = 250 end inherited edtFechaFinFiltro: TcxDateEdit - Left = 389 + Left = 515 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 389 - ExplicitWidth = 504 - Width = 504 + ExplicitLeft = 515 + ExplicitWidth = 250 + Width = 250 + end + inherited txtFiltroTodo2: TcxTextEdit + Left = 515 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 515 + ExplicitWidth = 250 + Width = 250 + end + inherited dxLayoutControl1Group_Root: TdxLayoutGroup + inherited dxLayoutControl1Group2: TdxLayoutGroup + inherited dxLayoutControl1Item4: TdxLayoutItem + Visible = True + end + end end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel @@ -204,14 +227,6 @@ inherited frViewContratosCliente: TfrViewContratosCliente end end end - inherited dxLayoutLookAndFeelList1: TdxLayoutLookAndFeelList - Left = 56 - end - inherited ActionList1: TActionList - inherited actQuitarFiltro: TAction - OnExecute = frViewFiltroBase1actQuitarFiltroExecute - end - end end inherited pnlAgrupaciones: TTBXDockablePanel Top = 499 diff --git a/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.pas b/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.pas index fd80325..31178ad 100644 --- a/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.pas +++ b/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.pas @@ -53,6 +53,7 @@ type cxGridViewVENDEDOR: TcxGridDBColumn; cxGridViewBASE_IMPONIBLE_FACTURAS: TcxGridDBColumn; cxStylePENDIENTESYFACTURADASOK: TcxStyle; + cxGridViewTIENDA: TcxGridDBColumn; procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel); procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView; @@ -71,7 +72,6 @@ type procedure cxGridViewDataControllerCompare( ADataController: TcxCustomDataController; ARecordIndex1, ARecordIndex2, AItemIndex: Integer; const V1, V2: Variant; var Compare: Integer); - procedure frViewFiltroBase1actQuitarFiltroExecute(Sender: TObject); procedure actProcedenciaExecute(Sender: TObject); procedure actProcedenciaUpdate(Sender: TObject); @@ -86,6 +86,7 @@ type procedure SetContratos(const Value: IBizContratoCliente); public procedure AnadirOtrosFiltros; override; + procedure ConfigView; override; property Contratos: IBizContratoCliente read GetContratos write SetContratos; end; @@ -93,7 +94,7 @@ implementation uses SysUtils, variants, uDataModuleContratosCliente, schContratosClienteClient_Intf, - uViewGridBase, + uViewGridBase, uFactuGES_App, //uReferenciasUtils, cxVariants; @@ -186,6 +187,16 @@ begin cxGrid.ActiveLevel.GridView := cxGridView; end; +procedure TfrViewContratosCliente.ConfigView; +begin + inherited; + + if ((AppFactuGES.EmpresaActiva.ID = 2) or (AppFactuGES.EmpresaActiva.ID = 3)) then + cxGridViewTIENDA.Visible := True + else + cxGridViewTIENDA.Visible := False; +end; + procedure TfrViewContratosCliente.cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel); begin inherited; @@ -275,11 +286,6 @@ begin end; end; -procedure TfrViewContratosCliente.frViewFiltroBase1actQuitarFiltroExecute(Sender: TObject); -begin - frViewFiltroBase1.txtFiltroTodo.Clear; -end; - function TfrViewContratosCliente.GetContratos: IBizContratoCliente; begin Result := FContratos; diff --git a/Source/Modulos/Facturas de cliente/Controller/FacturasCliente_controller.dpk b/Source/Modulos/Facturas de cliente/Controller/FacturasCliente_controller.dpk index 95e5acb..72ff4c9 100644 Binary files a/Source/Modulos/Facturas de cliente/Controller/FacturasCliente_controller.dpk and b/Source/Modulos/Facturas de cliente/Controller/FacturasCliente_controller.dpk differ diff --git a/Source/Modulos/Facturas de cliente/Controller/FacturasCliente_controller.dproj b/Source/Modulos/Facturas de cliente/Controller/FacturasCliente_controller.dproj index d366605..2c0a25c 100644 --- a/Source/Modulos/Facturas de cliente/Controller/FacturasCliente_controller.dproj +++ b/Source/Modulos/Facturas de cliente/Controller/FacturasCliente_controller.dproj @@ -49,15 +49,16 @@ MainSource - - - - - - - - - + + + + + + + + + + diff --git a/Source/Modulos/Facturas de cliente/Controller/uDetallesFacturaClienteController.pas b/Source/Modulos/Facturas de cliente/Controller/uDetallesFacturaClienteController.pas index b7bc168..4195e29 100644 --- a/Source/Modulos/Facturas de cliente/Controller/uDetallesFacturaClienteController.pas +++ b/Source/Modulos/Facturas de cliente/Controller/uDetallesFacturaClienteController.pas @@ -127,7 +127,8 @@ end;} function TDetallesFacturaClienteController.CalcularImporteTotalConcepto(DataTable: TDADataTable): Double; begin - Result := CalcularLineaConcepto(DataTable); +//Calcular con 4 decimales + Result := CalcularLineaConcepto(DataTable, 4); end; constructor TDetallesFacturaClienteController.Create; diff --git a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas index d51a4d7..ed14a12 100644 --- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas +++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas @@ -53,6 +53,9 @@ type function DarListaAnosFacturas: TStringList; procedure FiltrarAno(AFactura: IBizFacturaCliente; ADynWhereDataTable: WideString; const Ano: String); + + function darTiposFacturaCliente: IBizTiposFacturaCliente; + function AsignarTipoOperacion(AFacturas: IBizFacturaCliente): Boolean; end; TFacturasClienteController = class(TControllerBase, IFacturasClienteController) @@ -120,6 +123,9 @@ type function DarListaAnosFacturas: TStringList; procedure FiltrarAno(AFactura: IBizFacturaCliente; ADynWhereDataTable: WideString; const Ano: String); + + function darTiposFacturaCliente: IBizTiposFacturaCliente; + function AsignarTipoOperacion(AFacturas: IBizFacturaCliente): Boolean; end; implementation @@ -132,9 +138,9 @@ uses uDataModuleUsuarios, uDAInterfaces, uDataTableUtils, uAlbaranesClienteController, schAlbaranesClienteClient_Intf, uROTypes, uDetallesAlbaranClienteController, uBizDetallesAlbaranCliente, uFacturasClienteReportController, DateUtils, Forms, - Dialogs, uIntegerListUtils, uIEditorElegirFacturasCliente, + Dialogs, uIntegerListUtils, uIEditorElegirFacturasCliente, uStringsUtils, uFormasPagoController, uBizFormasPago, uTiposIVAController, uBizTiposIVA, - uBizEjercicios, uRecibosClienteController, uBizRecibosCliente; + uBizEjercicios, uRecibosClienteController, uBizRecibosCliente, uTiposOperacionVentaController; procedure CopiarArticulosAlbaran(AOrigen: IBizDetallesAlbaranCliente; @@ -218,6 +224,51 @@ begin Result := True; end; +function TFacturasClienteController.AsignarTipoOperacion(AFacturas: IBizFacturaCliente): Boolean; +var + ATipoOperacionController : ITiposOperacionVentaController; + ATipoOperacion: Variant; + +begin + Result := False; + + if Assigned(AFacturas) then + begin + with TTiposOperacionVentaController.Create do + begin + try + ATipoOperacion := elegirTipoOperacionVenta; + finally + Free + end; + end; + end; + + ShowHourglassCursor; + if not EsCadenaVacia(ATipoOperacion) then + begin + //Asignamos en factura + with AFacturas.DataTable do + begin + First; + while not EOF do + begin + if (AFacturas.ID_TIPO_FACTURA <> ATipoOperacion) then + begin + Edit; + AFacturas.ID_TIPO_FACTURA := ATipoOperacion; + Post; + end; + Next; + end; + ApplyUpdates; + Result := True; + end; + end; + HideHourglassCursor; + +end; + procedure TFacturasClienteController.ActualizarFormaDePago( AFactura: IBizFacturaCliente; ID_FORMA_PAGO: Integer); var @@ -631,6 +682,11 @@ begin Result := FDataModule.GetAnosItems; end; +function TFacturasClienteController.darTiposFacturaCliente: IBizTiposFacturaCliente; +begin + Result := FDataModule.darTiposFacturaCliente; +end; + procedure TFacturasClienteController.DescartarCambios(AFactura: IBizFacturaCliente); begin if not Assigned(AFactura) then diff --git a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm index 7cc42b3..3e69f05 100644 --- a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm @@ -363,6 +363,16 @@ inherited DataModuleFacturasCliente: TDataModuleFacturasCliente item Name = 'FECHA_RETENCION' DataType = datDateTime + end + item + Name = 'ID_TIPO_FACTURA' + DataType = datInteger + end + item + Name = 'TIPO_OPERACION' + DataType = datString + Size = 2000 + ServerAutoRefresh = True end> Params = <> StreamingOptions = [soDisableEventsWhileStreaming] @@ -515,4 +525,30 @@ inherited DataModuleFacturasCliente: TDataModuleFacturasCliente Left = 232 Top = 184 end + object tbl_TiposFacturaCliente: TDAMemDataTable + RemoteUpdatesOptions = [] + Fields = < + item + Name = 'ID' + DataType = datInteger + end + item + Name = 'DESCRIPCION' + DataType = datString + Size = 2000 + end> + Params = <> + StreamingOptions = [soDisableEventsWhileStreaming] + RemoteDataAdapter = rda_FacturasCliente + LogicalName = 'TiposFacturaCliente' + IndexDefs = <> + Left = 48 + Top = 264 + end + object ds_TiposFacturaCliente: TDADataSource + DataSet = tbl_TiposFacturaCliente.Dataset + DataTable = tbl_TiposFacturaCliente + Left = 48 + Top = 208 + end end diff --git a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas index 4439078..9dcb7bb 100644 --- a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas @@ -23,6 +23,8 @@ type ds_FacturasCliente_Detalles: TDADataSource; tbl_ListaAnosFacturas: TDAMemDataTable; ds_ListaAnosFacturas: TDADataSource; + tbl_TiposFacturaCliente: TDAMemDataTable; + ds_TiposFacturaCliente: TDADataSource; procedure DAClientDataModuleCreate(Sender: TObject); private function _GetDetalles : IBizDetallesFacturaCliente; @@ -31,6 +33,7 @@ type function GetItems : IBizFacturaCliente; function GetItem(const ID : Integer) : IBizFacturaCliente; function NewItem : IBizFacturaCliente; + function darTiposFacturaCliente : IBizTiposFacturaCliente; // Report function GetReport(const AListaID: TIntegerList; const VerLogotipo: Boolean): Binary; @@ -87,6 +90,20 @@ begin end; end; +function TDataModuleFacturasCliente.darTiposFacturaCliente: IBizTiposFacturaCliente; +var + ATipos : TDAMemDataTable; +begin + ShowHourglassCursor; + try + ATipos := CloneDataTable(tbl_TiposFacturaCliente); + ATipos.BusinessRulesID := BIZ_CLIENT_TIPOS_FACTURA_CLIENTE; + Result := (ATipos as IBizTiposFacturaCliente); + finally + HideHourglassCursor; + end; +end; + function TDataModuleFacturasCliente.GetAnosItems: TStringList; var AListaAnos: TStringList; diff --git a/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj b/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj index 67616a6..fa6217a 100644 --- a/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj +++ b/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj @@ -18,6 +18,9 @@ + + + @@ -28,6 +31,7 @@ + @@ -301,14 +305,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + \ No newline at end of file diff --git a/Source/Modulos/Facturas de cliente/Model/Data/uIDataModuleFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Model/Data/uIDataModuleFacturasCliente.pas index 25cf5dd..25ba497 100644 --- a/Source/Modulos/Facturas de cliente/Model/Data/uIDataModuleFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Model/Data/uIDataModuleFacturasCliente.pas @@ -13,6 +13,7 @@ type function GetItems: IBizFacturaCliente; function GetItem(const ID : Integer) : IBizFacturaCliente; function NewItem : IBizFacturaCliente; + function darTiposFacturaCliente : IBizTiposFacturaCliente; end; implementation diff --git a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas index 2451ef9..f8b9635 100644 --- a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas +++ b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas @@ -9,12 +9,14 @@ const { Data table rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_ListaAnosFacturas = '{B9CBCAB7-D06E-41B6-A2AF-5DE26CB818F4}'; - RID_FacturasCliente = '{C3E309EB-4021-4446-81DD-452C015CA0FA}'; - RID_FacturasCliente_Detalles = '{AF710A72-947F-483D-8DAD-66A9E58E0541}'; + RID_ListaAnosFacturas = '{700A8C26-CB78-4B2A-9180-1C8EBE14F1F5}'; + RID_TiposFacturaCliente = '{16878B47-BBFA-49B8-A8B6-0BEC17027198}'; + RID_FacturasCliente = '{F4246ABE-0846-4389-BD4C-6FE2438F1AEF}'; + RID_FacturasCliente_Detalles = '{8E519944-EB60-4DA6-86B3-6F834F0AD6F5}'; { Data table names } nme_ListaAnosFacturas = 'ListaAnosFacturas'; + nme_TiposFacturaCliente = 'TiposFacturaCliente'; nme_FacturasCliente = 'FacturasCliente'; nme_FacturasCliente_Detalles = 'FacturasCliente_Detalles'; @@ -24,6 +26,14 @@ const { ListaAnosFacturas field indexes } idx_ListaAnosFacturasANO = 0; + { TiposFacturaCliente fields } + fld_TiposFacturaClienteID = 'ID'; + fld_TiposFacturaClienteDESCRIPCION = 'DESCRIPCION'; + + { TiposFacturaCliente field indexes } + idx_TiposFacturaClienteID = 0; + idx_TiposFacturaClienteDESCRIPCION = 1; + { FacturasCliente fields } fld_FacturasClienteID = 'ID'; fld_FacturasClienteID_EMPRESA = 'ID_EMPRESA'; @@ -79,6 +89,8 @@ const fld_FacturasClienteRETENCION = 'RETENCION'; fld_FacturasClienteIMPORTE_RETENCION = 'IMPORTE_RETENCION'; fld_FacturasClienteFECHA_RETENCION = 'FECHA_RETENCION'; + fld_FacturasClienteID_TIPO_FACTURA = 'ID_TIPO_FACTURA'; + fld_FacturasClienteTIPO_OPERACION = 'TIPO_OPERACION'; { FacturasCliente field indexes } idx_FacturasClienteID = 0; @@ -135,6 +147,8 @@ const idx_FacturasClienteRETENCION = 51; idx_FacturasClienteIMPORTE_RETENCION = 52; idx_FacturasClienteFECHA_RETENCION = 53; + idx_FacturasClienteID_TIPO_FACTURA = 54; + idx_FacturasClienteTIPO_OPERACION = 55; { FacturasCliente_Detalles fields } fld_FacturasCliente_DetallesID = 'ID'; @@ -173,7 +187,7 @@ const type { IListaAnosFacturas } IListaAnosFacturas = interface(IDAStronglyTypedDataTable) - ['{BFABF626-A281-4D4E-B44B-7B40EADA006D}'] + ['{97C76BDF-F243-45CF-83A8-3389872A1C88}'] { Property getters and setters } function GetANOValue: String; procedure SetANOValue(const aValue: String); @@ -206,9 +220,56 @@ type end; + { ITiposFacturaCliente } + ITiposFacturaCliente = interface(IDAStronglyTypedDataTable) + ['{9B6B81C1-044C-4B79-8686-B938DB928895}'] + { Property getters and setters } + function GetIDValue: Integer; + procedure SetIDValue(const aValue: Integer); + function GetIDIsNull: Boolean; + procedure SetIDIsNull(const aValue: Boolean); + function GetDESCRIPCIONValue: String; + procedure SetDESCRIPCIONValue(const aValue: String); + function GetDESCRIPCIONIsNull: Boolean; + procedure SetDESCRIPCIONIsNull(const aValue: Boolean); + + + { Properties } + property ID: Integer read GetIDValue write SetIDValue; + property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull; + property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue; + property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull; + end; + + { TTiposFacturaClienteDataTableRules } + TTiposFacturaClienteDataTableRules = class(TIntfObjectDADataTableRules, ITiposFacturaCliente) + private + protected + { Property getters and setters } + function GetIDValue: Integer; virtual; + procedure SetIDValue(const aValue: Integer); virtual; + function GetIDIsNull: Boolean; virtual; + procedure SetIDIsNull(const aValue: Boolean); virtual; + function GetDESCRIPCIONValue: String; virtual; + procedure SetDESCRIPCIONValue(const aValue: String); virtual; + function GetDESCRIPCIONIsNull: Boolean; virtual; + procedure SetDESCRIPCIONIsNull(const aValue: Boolean); virtual; + + { Properties } + property ID: Integer read GetIDValue write SetIDValue; + property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull; + property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue; + property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull; + + public + constructor Create(aDataTable: TDADataTable); override; + destructor Destroy; override; + + end; + { IFacturasCliente } IFacturasCliente = interface(IDAStronglyTypedDataTable) - ['{9539259F-170A-4008-BB16-3F91D42113EB}'] + ['{53DF775E-B4D1-4621-836B-EE16A1A631FC}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -425,6 +486,14 @@ type procedure SetFECHA_RETENCIONValue(const aValue: DateTime); function GetFECHA_RETENCIONIsNull: Boolean; procedure SetFECHA_RETENCIONIsNull(const aValue: Boolean); + function GetID_TIPO_FACTURAValue: Integer; + procedure SetID_TIPO_FACTURAValue(const aValue: Integer); + function GetID_TIPO_FACTURAIsNull: Boolean; + procedure SetID_TIPO_FACTURAIsNull(const aValue: Boolean); + function GetTIPO_OPERACIONValue: String; + procedure SetTIPO_OPERACIONValue(const aValue: String); + function GetTIPO_OPERACIONIsNull: Boolean; + procedure SetTIPO_OPERACIONIsNull(const aValue: Boolean); { Properties } @@ -536,6 +605,10 @@ type property IMPORTE_RETENCIONIsNull: Boolean read GetIMPORTE_RETENCIONIsNull write SetIMPORTE_RETENCIONIsNull; property FECHA_RETENCION: DateTime read GetFECHA_RETENCIONValue write SetFECHA_RETENCIONValue; property FECHA_RETENCIONIsNull: Boolean read GetFECHA_RETENCIONIsNull write SetFECHA_RETENCIONIsNull; + property ID_TIPO_FACTURA: Integer read GetID_TIPO_FACTURAValue write SetID_TIPO_FACTURAValue; + property ID_TIPO_FACTURAIsNull: Boolean read GetID_TIPO_FACTURAIsNull write SetID_TIPO_FACTURAIsNull; + property TIPO_OPERACION: String read GetTIPO_OPERACIONValue write SetTIPO_OPERACIONValue; + property TIPO_OPERACIONIsNull: Boolean read GetTIPO_OPERACIONIsNull write SetTIPO_OPERACIONIsNull; end; { TFacturasClienteDataTableRules } @@ -760,6 +833,14 @@ type procedure SetFECHA_RETENCIONValue(const aValue: DateTime); virtual; function GetFECHA_RETENCIONIsNull: Boolean; virtual; procedure SetFECHA_RETENCIONIsNull(const aValue: Boolean); virtual; + function GetID_TIPO_FACTURAValue: Integer; virtual; + procedure SetID_TIPO_FACTURAValue(const aValue: Integer); virtual; + function GetID_TIPO_FACTURAIsNull: Boolean; virtual; + procedure SetID_TIPO_FACTURAIsNull(const aValue: Boolean); virtual; + function GetTIPO_OPERACIONValue: String; virtual; + procedure SetTIPO_OPERACIONValue(const aValue: String); virtual; + function GetTIPO_OPERACIONIsNull: Boolean; virtual; + procedure SetTIPO_OPERACIONIsNull(const aValue: Boolean); virtual; { Properties } property ID: Integer read GetIDValue write SetIDValue; @@ -870,6 +951,10 @@ type property IMPORTE_RETENCIONIsNull: Boolean read GetIMPORTE_RETENCIONIsNull write SetIMPORTE_RETENCIONIsNull; property FECHA_RETENCION: DateTime read GetFECHA_RETENCIONValue write SetFECHA_RETENCIONValue; property FECHA_RETENCIONIsNull: Boolean read GetFECHA_RETENCIONIsNull write SetFECHA_RETENCIONIsNull; + property ID_TIPO_FACTURA: Integer read GetID_TIPO_FACTURAValue write SetID_TIPO_FACTURAValue; + property ID_TIPO_FACTURAIsNull: Boolean read GetID_TIPO_FACTURAIsNull write SetID_TIPO_FACTURAIsNull; + property TIPO_OPERACION: String read GetTIPO_OPERACIONValue write SetTIPO_OPERACIONValue; + property TIPO_OPERACIONIsNull: Boolean read GetTIPO_OPERACIONIsNull write SetTIPO_OPERACIONIsNull; public constructor Create(aDataTable: TDADataTable); override; @@ -879,7 +964,7 @@ type { IFacturasCliente_Detalles } IFacturasCliente_Detalles = interface(IDAStronglyTypedDataTable) - ['{FE6D0998-F3A0-4271-9C1D-1840F9E1F578}'] + ['{57377F2A-FB8A-490D-8CC7-F484CC677EC3}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1117,6 +1202,60 @@ begin end; +{ TTiposFacturaClienteDataTableRules } +constructor TTiposFacturaClienteDataTableRules.Create(aDataTable: TDADataTable); +begin + inherited; +end; + +destructor TTiposFacturaClienteDataTableRules.Destroy; +begin + inherited; +end; + +function TTiposFacturaClienteDataTableRules.GetIDValue: Integer; +begin + result := DataTable.Fields[idx_TiposFacturaClienteID].AsInteger; +end; + +procedure TTiposFacturaClienteDataTableRules.SetIDValue(const aValue: Integer); +begin + DataTable.Fields[idx_TiposFacturaClienteID].AsInteger := aValue; +end; + +function TTiposFacturaClienteDataTableRules.GetIDIsNull: boolean; +begin + result := DataTable.Fields[idx_TiposFacturaClienteID].IsNull; +end; + +procedure TTiposFacturaClienteDataTableRules.SetIDIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_TiposFacturaClienteID].AsVariant := Null; +end; + +function TTiposFacturaClienteDataTableRules.GetDESCRIPCIONValue: String; +begin + result := DataTable.Fields[idx_TiposFacturaClienteDESCRIPCION].AsString; +end; + +procedure TTiposFacturaClienteDataTableRules.SetDESCRIPCIONValue(const aValue: String); +begin + DataTable.Fields[idx_TiposFacturaClienteDESCRIPCION].AsString := aValue; +end; + +function TTiposFacturaClienteDataTableRules.GetDESCRIPCIONIsNull: boolean; +begin + result := DataTable.Fields[idx_TiposFacturaClienteDESCRIPCION].IsNull; +end; + +procedure TTiposFacturaClienteDataTableRules.SetDESCRIPCIONIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_TiposFacturaClienteDESCRIPCION].AsVariant := Null; +end; + + { TFacturasClienteDataTableRules } constructor TFacturasClienteDataTableRules.Create(aDataTable: TDADataTable); var @@ -2269,6 +2408,48 @@ begin DataTable.Fields[idx_FacturasClienteFECHA_RETENCION].AsVariant := Null; end; +function TFacturasClienteDataTableRules.GetID_TIPO_FACTURAValue: Integer; +begin + result := DataTable.Fields[idx_FacturasClienteID_TIPO_FACTURA].AsInteger; +end; + +procedure TFacturasClienteDataTableRules.SetID_TIPO_FACTURAValue(const aValue: Integer); +begin + DataTable.Fields[idx_FacturasClienteID_TIPO_FACTURA].AsInteger := aValue; +end; + +function TFacturasClienteDataTableRules.GetID_TIPO_FACTURAIsNull: boolean; +begin + result := DataTable.Fields[idx_FacturasClienteID_TIPO_FACTURA].IsNull; +end; + +procedure TFacturasClienteDataTableRules.SetID_TIPO_FACTURAIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_FacturasClienteID_TIPO_FACTURA].AsVariant := Null; +end; + +function TFacturasClienteDataTableRules.GetTIPO_OPERACIONValue: String; +begin + result := DataTable.Fields[idx_FacturasClienteTIPO_OPERACION].AsString; +end; + +procedure TFacturasClienteDataTableRules.SetTIPO_OPERACIONValue(const aValue: String); +begin + DataTable.Fields[idx_FacturasClienteTIPO_OPERACION].AsString := aValue; +end; + +function TFacturasClienteDataTableRules.GetTIPO_OPERACIONIsNull: boolean; +begin + result := DataTable.Fields[idx_FacturasClienteTIPO_OPERACION].IsNull; +end; + +procedure TFacturasClienteDataTableRules.SetTIPO_OPERACIONIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_FacturasClienteTIPO_OPERACION].AsVariant := Null; +end; + { TFacturasCliente_DetallesDataTableRules } constructor TFacturasCliente_DetallesDataTableRules.Create(aDataTable: TDADataTable); @@ -2599,6 +2780,7 @@ end; initialization RegisterDataTableRules(RID_ListaAnosFacturas, TListaAnosFacturasDataTableRules); + RegisterDataTableRules(RID_TiposFacturaCliente, TTiposFacturaClienteDataTableRules); RegisterDataTableRules(RID_FacturasCliente, TFacturasClienteDataTableRules); RegisterDataTableRules(RID_FacturasCliente_Detalles, TFacturasCliente_DetallesDataTableRules); diff --git a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas index 7efa8fa..49ea9d0 100644 --- a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas +++ b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas @@ -9,14 +9,15 @@ const { Delta rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_ListaAnosFacturasDelta = '{488EEBD9-F334-4412-B42F-CD53EDADEFF2}'; - RID_FacturasClienteDelta = '{75964CD6-B60B-485C-BEA0-AF384F111E00}'; - RID_FacturasCliente_DetallesDelta = '{D8C6075B-EF61-4846-9BC6-F4CD5D416FBD}'; + RID_ListaAnosFacturasDelta = '{27262DAF-04C2-41BD-BE56-F1E3932C3958}'; + RID_TiposFacturaClienteDelta = '{23C627D7-E517-4F77-831E-FF7350A5F4B9}'; + RID_FacturasClienteDelta = '{6290AB0B-0540-4FC1-9614-D4AFFFA4D9F2}'; + RID_FacturasCliente_DetallesDelta = '{48B82498-4D2D-4D30-9B4E-7193BC6B0308}'; type { IListaAnosFacturasDelta } IListaAnosFacturasDelta = interface(IListaAnosFacturas) - ['{488EEBD9-F334-4412-B42F-CD53EDADEFF2}'] + ['{27262DAF-04C2-41BD-BE56-F1E3932C3958}'] { Property getters and setters } function GetOldANOValue : String; @@ -48,9 +49,55 @@ type end; + { ITiposFacturaClienteDelta } + ITiposFacturaClienteDelta = interface(ITiposFacturaCliente) + ['{23C627D7-E517-4F77-831E-FF7350A5F4B9}'] + { Property getters and setters } + function GetOldIDValue : Integer; + function GetOldDESCRIPCIONValue : String; + + { Properties } + property OldID : Integer read GetOldIDValue; + property OldDESCRIPCION : String read GetOldDESCRIPCIONValue; + end; + + { TTiposFacturaClienteBusinessProcessorRules } + TTiposFacturaClienteBusinessProcessorRules = class(TDABusinessProcessorRules, ITiposFacturaCliente, ITiposFacturaClienteDelta) + private + protected + { Property getters and setters } + function GetIDValue: Integer; virtual; + function GetIDIsNull: Boolean; virtual; + function GetOldIDValue: Integer; virtual; + function GetOldIDIsNull: Boolean; virtual; + procedure SetIDValue(const aValue: Integer); virtual; + procedure SetIDIsNull(const aValue: Boolean); virtual; + function GetDESCRIPCIONValue: String; virtual; + function GetDESCRIPCIONIsNull: Boolean; virtual; + function GetOldDESCRIPCIONValue: String; virtual; + function GetOldDESCRIPCIONIsNull: Boolean; virtual; + procedure SetDESCRIPCIONValue(const aValue: String); virtual; + procedure SetDESCRIPCIONIsNull(const aValue: Boolean); virtual; + + { Properties } + property ID : Integer read GetIDValue write SetIDValue; + property IDIsNull : Boolean read GetIDIsNull write SetIDIsNull; + property OldID : Integer read GetOldIDValue; + property OldIDIsNull : Boolean read GetOldIDIsNull; + property DESCRIPCION : String read GetDESCRIPCIONValue write SetDESCRIPCIONValue; + property DESCRIPCIONIsNull : Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull; + property OldDESCRIPCION : String read GetOldDESCRIPCIONValue; + property OldDESCRIPCIONIsNull : Boolean read GetOldDESCRIPCIONIsNull; + + public + constructor Create(aBusinessProcessor: TDABusinessProcessor); override; + destructor Destroy; override; + + end; + { IFacturasClienteDelta } IFacturasClienteDelta = interface(IFacturasCliente) - ['{75964CD6-B60B-485C-BEA0-AF384F111E00}'] + ['{6290AB0B-0540-4FC1-9614-D4AFFFA4D9F2}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -106,6 +153,8 @@ type function GetOldRETENCIONValue : Float; function GetOldIMPORTE_RETENCIONValue : Currency; function GetOldFECHA_RETENCIONValue : DateTime; + function GetOldID_TIPO_FACTURAValue : Integer; + function GetOldTIPO_OPERACIONValue : String; { Properties } property OldID : Integer read GetOldIDValue; @@ -162,6 +211,8 @@ type property OldRETENCION : Float read GetOldRETENCIONValue; property OldIMPORTE_RETENCION : Currency read GetOldIMPORTE_RETENCIONValue; property OldFECHA_RETENCION : DateTime read GetOldFECHA_RETENCIONValue; + property OldID_TIPO_FACTURA : Integer read GetOldID_TIPO_FACTURAValue; + property OldTIPO_OPERACION : String read GetOldTIPO_OPERACIONValue; end; { TFacturasClienteBusinessProcessorRules } @@ -494,6 +545,18 @@ type function GetOldFECHA_RETENCIONIsNull: Boolean; virtual; procedure SetFECHA_RETENCIONValue(const aValue: DateTime); virtual; procedure SetFECHA_RETENCIONIsNull(const aValue: Boolean); virtual; + function GetID_TIPO_FACTURAValue: Integer; virtual; + function GetID_TIPO_FACTURAIsNull: Boolean; virtual; + function GetOldID_TIPO_FACTURAValue: Integer; virtual; + function GetOldID_TIPO_FACTURAIsNull: Boolean; virtual; + procedure SetID_TIPO_FACTURAValue(const aValue: Integer); virtual; + procedure SetID_TIPO_FACTURAIsNull(const aValue: Boolean); virtual; + function GetTIPO_OPERACIONValue: String; virtual; + function GetTIPO_OPERACIONIsNull: Boolean; virtual; + function GetOldTIPO_OPERACIONValue: String; virtual; + function GetOldTIPO_OPERACIONIsNull: Boolean; virtual; + procedure SetTIPO_OPERACIONValue(const aValue: String); virtual; + procedure SetTIPO_OPERACIONIsNull(const aValue: Boolean); virtual; { Properties } property ID : Integer read GetIDValue write SetIDValue; @@ -712,6 +775,14 @@ type property FECHA_RETENCIONIsNull : Boolean read GetFECHA_RETENCIONIsNull write SetFECHA_RETENCIONIsNull; property OldFECHA_RETENCION : DateTime read GetOldFECHA_RETENCIONValue; property OldFECHA_RETENCIONIsNull : Boolean read GetOldFECHA_RETENCIONIsNull; + property ID_TIPO_FACTURA : Integer read GetID_TIPO_FACTURAValue write SetID_TIPO_FACTURAValue; + property ID_TIPO_FACTURAIsNull : Boolean read GetID_TIPO_FACTURAIsNull write SetID_TIPO_FACTURAIsNull; + property OldID_TIPO_FACTURA : Integer read GetOldID_TIPO_FACTURAValue; + property OldID_TIPO_FACTURAIsNull : Boolean read GetOldID_TIPO_FACTURAIsNull; + property TIPO_OPERACION : String read GetTIPO_OPERACIONValue write SetTIPO_OPERACIONValue; + property TIPO_OPERACIONIsNull : Boolean read GetTIPO_OPERACIONIsNull write SetTIPO_OPERACIONIsNull; + property OldTIPO_OPERACION : String read GetOldTIPO_OPERACIONValue; + property OldTIPO_OPERACIONIsNull : Boolean read GetOldTIPO_OPERACIONIsNull; public constructor Create(aBusinessProcessor: TDABusinessProcessor); override; @@ -721,7 +792,7 @@ type { IFacturasCliente_DetallesDelta } IFacturasCliente_DetallesDelta = interface(IFacturasCliente_Detalles) - ['{D8C6075B-EF61-4846-9BC6-F4CD5D416FBD}'] + ['{48B82498-4D2D-4D30-9B4E-7193BC6B0308}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_FACTURAValue : Integer; @@ -969,6 +1040,80 @@ begin end; +{ TTiposFacturaClienteBusinessProcessorRules } +constructor TTiposFacturaClienteBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); +begin + inherited; +end; + +destructor TTiposFacturaClienteBusinessProcessorRules.Destroy; +begin + inherited; +end; + +function TTiposFacturaClienteBusinessProcessorRules.GetIDValue: Integer; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_TiposFacturaClienteID]; +end; + +function TTiposFacturaClienteBusinessProcessorRules.GetIDIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_TiposFacturaClienteID]); +end; + +function TTiposFacturaClienteBusinessProcessorRules.GetOldIDValue: Integer; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_TiposFacturaClienteID]; +end; + +function TTiposFacturaClienteBusinessProcessorRules.GetOldIDIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_TiposFacturaClienteID]); +end; + +procedure TTiposFacturaClienteBusinessProcessorRules.SetIDValue(const aValue: Integer); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_TiposFacturaClienteID] := aValue; +end; + +procedure TTiposFacturaClienteBusinessProcessorRules.SetIDIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_TiposFacturaClienteID] := Null; +end; + +function TTiposFacturaClienteBusinessProcessorRules.GetDESCRIPCIONValue: String; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_TiposFacturaClienteDESCRIPCION]; +end; + +function TTiposFacturaClienteBusinessProcessorRules.GetDESCRIPCIONIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_TiposFacturaClienteDESCRIPCION]); +end; + +function TTiposFacturaClienteBusinessProcessorRules.GetOldDESCRIPCIONValue: String; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_TiposFacturaClienteDESCRIPCION]; +end; + +function TTiposFacturaClienteBusinessProcessorRules.GetOldDESCRIPCIONIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_TiposFacturaClienteDESCRIPCION]); +end; + +procedure TTiposFacturaClienteBusinessProcessorRules.SetDESCRIPCIONValue(const aValue: String); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_TiposFacturaClienteDESCRIPCION] := aValue; +end; + +procedure TTiposFacturaClienteBusinessProcessorRules.SetDESCRIPCIONIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_TiposFacturaClienteDESCRIPCION] := Null; +end; + + { TFacturasClienteBusinessProcessorRules } constructor TFacturasClienteBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); var @@ -2662,6 +2807,68 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteFECHA_RETENCION] := Null; end; +function TFacturasClienteBusinessProcessorRules.GetID_TIPO_FACTURAValue: Integer; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteID_TIPO_FACTURA]; +end; + +function TFacturasClienteBusinessProcessorRules.GetID_TIPO_FACTURAIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteID_TIPO_FACTURA]); +end; + +function TFacturasClienteBusinessProcessorRules.GetOldID_TIPO_FACTURAValue: Integer; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteID_TIPO_FACTURA]; +end; + +function TFacturasClienteBusinessProcessorRules.GetOldID_TIPO_FACTURAIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteID_TIPO_FACTURA]); +end; + +procedure TFacturasClienteBusinessProcessorRules.SetID_TIPO_FACTURAValue(const aValue: Integer); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteID_TIPO_FACTURA] := aValue; +end; + +procedure TFacturasClienteBusinessProcessorRules.SetID_TIPO_FACTURAIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteID_TIPO_FACTURA] := Null; +end; + +function TFacturasClienteBusinessProcessorRules.GetTIPO_OPERACIONValue: String; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteTIPO_OPERACION]; +end; + +function TFacturasClienteBusinessProcessorRules.GetTIPO_OPERACIONIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteTIPO_OPERACION]); +end; + +function TFacturasClienteBusinessProcessorRules.GetOldTIPO_OPERACIONValue: String; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteTIPO_OPERACION]; +end; + +function TFacturasClienteBusinessProcessorRules.GetOldTIPO_OPERACIONIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteTIPO_OPERACION]); +end; + +procedure TFacturasClienteBusinessProcessorRules.SetTIPO_OPERACIONValue(const aValue: String); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteTIPO_OPERACION] := aValue; +end; + +procedure TFacturasClienteBusinessProcessorRules.SetTIPO_OPERACIONIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteTIPO_OPERACION] := Null; +end; + { TFacturasCliente_DetallesBusinessProcessorRules } constructor TFacturasCliente_DetallesBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); @@ -3142,6 +3349,7 @@ end; initialization RegisterBusinessProcessorRules(RID_ListaAnosFacturasDelta, TListaAnosFacturasBusinessProcessorRules); + RegisterBusinessProcessorRules(RID_TiposFacturaClienteDelta, TTiposFacturaClienteBusinessProcessorRules); RegisterBusinessProcessorRules(RID_FacturasClienteDelta, TFacturasClienteBusinessProcessorRules); RegisterBusinessProcessorRules(RID_FacturasCliente_DetallesDelta, TFacturasCliente_DetallesBusinessProcessorRules); diff --git a/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas index 3009a6c..e4257c5 100644 --- a/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas @@ -8,6 +8,7 @@ uses const BIZ_CLIENT_FACTURA_CLIENTE = 'Client.FacturaCliente'; + BIZ_CLIENT_TIPOS_FACTURA_CLIENTE = 'Client.TiposFacturaCliente'; CTE_TIPO_ABONO = 'A'; CTE_TIPO_FACTURA = 'F'; @@ -17,6 +18,10 @@ const CTE_PAGADA = 'PAGADA'; type + IBizTiposFacturaCliente = interface(ITiposFacturaCliente) + ['{2D4AD6DB-8B9C-4268-AFD6-3B309C1B90BC}'] + end; + IBizFacturaCliente = interface(IFacturasCliente) ['{8C6F2523-41FB-4240-A242-C14390FBD2B7}'] @@ -38,6 +43,9 @@ type procedure CalcularImporteTotal; end; + TBizTiposFacturaCliente = class(TTiposFacturaClienteDataTableRules, IBizTiposFacturaCliente) + end; + TBizFacturaCliente = class(TFacturasClienteDataTableRules, IBizFacturaCliente, ISeleccionable) private FSeleccionableInterface : ISeleccionable; @@ -414,6 +422,7 @@ end; initialization RegisterDataTableRules(BIZ_CLIENT_FACTURA_CLIENTE, TBizFacturaCliente); + RegisterDataTableRules(BIZ_CLIENT_TIPOS_FACTURA_CLIENTE, TBizTiposFacturaCliente); finalization diff --git a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm index 6db6d20..c0f205d 100644 --- a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm +++ b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm @@ -517,12 +517,12 @@ object RptFacturasCliente: TRptFacturasCliente #10'when extract (month from fecha_factura) = 11 then '#39'NOVIEMBRE - ' + #39' || extract (year from fecha_factura)'#10'when extract (month from ' + 'fecha_factura) = 12 then '#39'DICIEMBRE - '#39' || extract (year from fe' + - 'cha_factura)'#10'end as TITULO,'#10'REFERENCIA, ID_CLIENTE, NOMBRE, SIT' + - 'UACION, NIF_CIF, REFERENCIA_CLIENTE, FECHA_FACTURA, FECHA_VENCIM' + - 'IENTO, BASE_IMPONIBLE, IVA, IMPORTE_IVA,'#10'RE, IMPORTE_RE, RETENCI' + - 'ON, IMPORTE_RETENCION, IMPORTE_TOTAL'#10#10'from V_facturas_cliente'#10'wh' + - 'ere {where}'#10'order by ANO, MES, FECHA_FACTURA, REFERENCIA, NOMBRE' + - #10#10 + 'cha_factura)'#10'end as TITULO,'#10'REFERENCIA, ID_CLIENTE, NOMBRE, TIP' + + 'O_OPERACION, SITUACION, NIF_CIF, REFERENCIA_CLIENTE, FECHA_FACTU' + + 'RA,'#10'FECHA_VENCIMIENTO, BASE_IMPONIBLE, IVA, IMPORTE_IVA, RE, IMP' + + 'ORTE_RE, RETENCION, IMPORTE_RETENCION, IMPORTE_TOTAL'#10#10'from V_fac' + + 'turas_cliente'#10'where {where}'#10'order by ANO, MES, FECHA_FACTURA, RE' + + 'FERENCIA, NOMBRE'#10#10 StatementType = stSQL ColumnMappings = < item @@ -604,6 +604,10 @@ object RptFacturasCliente: TRptFacturasCliente item DatasetField = 'IMPORTE_RE' TableField = 'IMPORTE_RE' + end + item + DatasetField = 'TIPO_OPERACION' + TableField = 'TIPO_OPERACION' end> end> Name = 'ListadoFacturas' @@ -639,6 +643,11 @@ object RptFacturasCliente: TRptFacturasCliente DataType = datString Size = 255 end + item + Name = 'TIPO_OPERACION' + DataType = datString + Size = 2000 + end item Name = 'SITUACION' DataType = datString @@ -695,6 +704,71 @@ object RptFacturasCliente: TRptFacturasCliente DataType = datCurrency end> end + item + Params = <> + Statements = < + item + Connection = 'IBX' + ConnectionType = 'Interbase' + Default = True + TargetTable = 'V_FACTURAS_CLIENTE' + Name = 'IBX' + SQL = + 'select V_facturas_cliente.ID_EMPRESA,'#10'coalesce(T.DESCRIPCION, '#39'S' + + 'in asignar'#39') as DESCRIPCION,'#10'sum(V_facturas_cliente.BASE_IMPONIB' + + 'LE) as BASE_IMPONIBLE,'#10'sum(V_facturas_cliente.IMPORTE_IVA) as IM' + + 'PORTE_IVA,'#10'sum(V_facturas_cliente.IMPORTE_TOTAL) AS IMPORTE_TOTA' + + 'L'#10'from V_facturas_cliente'#10'left join tipos_factura_cliente T on (' + + 'T.ID = V_facturas_cliente.ID_TIPO_FACTURA)'#10'group by 1,2'#10'order by' + + ' 1,2'#10 + StatementType = stSQL + ColumnMappings = < + item + DatasetField = 'ID_EMPRESA' + TableField = 'ID_EMPRESA' + end + item + DatasetField = 'DESCRIPCION' + TableField = '' + SQLOrigin = 'DESCRIPCION' + end + item + DatasetField = 'BASE_IMPONIBLE' + TableField = 'BASE_IMPONIBLE' + end + item + DatasetField = 'IMPORTE_IVA' + TableField = 'IMPORTE_IVA' + end + item + DatasetField = 'IMPORTE_TOTAL' + TableField = 'IMPORTE_TOTAL' + end> + end> + Name = 'ListadoFacturasClienteTipoResumen' + Fields = < + item + Name = 'ID_EMPRESA' + DataType = datInteger + end + item + Name = 'DESCRIPCION' + DataType = datString + Size = 2000 + end + item + Name = 'BASE_IMPONIBLE' + DataType = datCurrency + end + item + Name = 'IMPORTE_IVA' + DataType = datCurrency + end + item + Name = 'IMPORTE_TOTAL' + DataType = datCurrency + end> + end item Params = < item @@ -1662,7 +1736,7 @@ object RptFacturasCliente: TRptFacturasCliente PrintOptions.Printer = 'Por defecto' PrintOptions.PrintOnSheet = 0 ReportOptions.CreateDate = 37800.807714351900000000 - ReportOptions.LastChange = 44592.627949988430000000 + ReportOptions.LastChange = 44655.523157546300000000 ScriptLanguage = 'PascalScript' ShowProgress = False StoreInDFM = False @@ -1766,6 +1840,11 @@ object RptFacturasCliente: TRptFacturasCliente DataType = datString Size = 255 end + item + Name = 'TIPO_OPERACION' + DataType = datString + Size = 2000 + end item Name = 'SITUACION' DataType = datString @@ -1878,7 +1957,7 @@ object RptFacturasCliente: TRptFacturasCliente DataSource = DADSInformeListadoRecibos BCDToCurrency = False Left = 736 - Top = 16 + Top = 24 end object DADSInformeListadoRecibos: TDADataSource DataSet = tbl_InformeListadoRecibos.Dataset @@ -1944,4 +2023,30 @@ object RptFacturasCliente: TRptFacturasCliente Left = 736 Top = 128 end + object frxDBInformeListadoFacturasTipoResumen: TfrxDBDataset + UserName = 'frxDBInformeListadoFacturasTipoResumen' + CloseDataSource = True + DataSource = DADSInformeListadoFacturasTipoResumen + BCDToCurrency = False + Left = 736 + Top = 224 + end + object DADSInformeListadoFacturasTipoResumen: TDADataSource + DataSet = tbl_InformeListadoFacturasTipoResumen.Dataset + DataTable = tbl_InformeListadoFacturasTipoResumen + Left = 736 + Top = 280 + end + object tbl_InformeListadoFacturasTipoResumen: TDAMemDataTable + RemoteUpdatesOptions = [] + Fields = <> + Params = <> + MasterMappingMode = mmDataRequest + LogChanges = False + StreamingOptions = [soDisableEventsWhileStreaming] + RemoteFetchEnabled = False + IndexDefs = <> + Left = 736 + Top = 336 + end end diff --git a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas index b12bce1..fe511b4 100644 --- a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas +++ b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas @@ -40,6 +40,9 @@ type DADSInformeListadoRecibos: TDADataSource; tbl_InformeListadoRecibos: TDAMemDataTable; schReport: TDASchema; + frxDBInformeListadoFacturasTipoResumen: TfrxDBDataset; + DADSInformeListadoFacturasTipoResumen: TDADataSource; + tbl_InformeListadoFacturasTipoResumen: TDAMemDataTable; procedure DataModuleCreate(Sender: TObject); procedure DataModuleDestroy(Sender: TObject); private @@ -93,7 +96,7 @@ const rptInformeListadoFacturasRecibosClienteDesglosado = 'InformeListadoFacturasRecibosClienteDesglosado.fr3'; ds_InformeListadoFacturasResumen = 'ListadoFacturasResumen'; - + ds_InformeListadoFacturasTipoResumen = 'ListadoFacturasClienteTipoResumen'; { TRptFacturasCliente } @@ -157,6 +160,7 @@ begin //Se van a prepara las tablas del informe if tbl_InformeListadoFacturas.Active then tbl_InformeListadoFacturas.Active := False; + PrepararTablaInforme(tbl_InformeListadoFacturas); //Se prepara la tabla del listado resumen del informe @@ -170,6 +174,16 @@ begin Bin2DataStreamer.WriteDataset(AStream, dsMaster, [woRows, woSchema], -1); Bin2DataStreamer.ReadDataset(AStream, tbl_InformeListadoFacturasResumen, TRUE, '', TRUE, TRUE); + if tbl_InformeListadoFacturasTipoResumen.Active then + tbl_InformeListadoFacturasTipoResumen.Active := False; + dsMaster := schReport.NewDataset(FConnection, ds_InformeListadoFacturasTipoResumen, [], [], False); + PrepararTablaResumenInforme(dsMaster); + //Esto se hace para rellenar la tabla del datamodule que usa el informe. + dsMaster.Open; + AStream.Clear; + Bin2DataStreamer.WriteDataset(AStream, dsMaster, [woRows, woSchema], -1); + Bin2DataStreamer.ReadDataset(AStream, tbl_InformeListadoFacturasTipoResumen, TRUE, '', TRUE, TRUE); + //DESGLOSADO POR CLIENTE EN ESTE INFORME NO SE DESGLOSARÁ POR CLIENTE if Desglosado then ATipoInforme := rptInformeIVADesglosado @@ -179,6 +193,7 @@ begin //Finalmente se abren las tablas del informe tbl_InformeListadoFacturas.Active := True; tbl_InformeListadoFacturasResumen.Active := True; + tbl_InformeListadoFacturasTipoResumen.Active := True; Result := _GenerarInforme(ATipoInforme); finally diff --git a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm index 2e86588..4b433be 100644 --- a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm +++ b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm @@ -40,6 +40,41 @@ object srvFacturasCliente: TsrvFacturasCliente Size = 255 end> end + item + Params = <> + Statements = < + item + Connection = 'IBX' + ConnectionType = 'Interbase' + Default = True + TargetTable = 'TIPOS_FACTURA_CLIENTE' + Name = 'IBX' + SQL = + 'SELECT'#10' ID, DESCRIPCION'#10' FROM'#10' TIPOS_FACTURA_CLIENTE'#10' WH' + + 'ERE {Where}'#10' order by 2'#10 + StatementType = stSQL + ColumnMappings = < + item + DatasetField = 'ID' + TableField = 'ID' + end + item + DatasetField = 'DESCRIPCION' + TableField = 'DESCRIPCION' + end> + end> + Name = 'TiposFacturaCliente' + Fields = < + item + Name = 'ID' + DataType = datInteger + end + item + Name = 'DESCRIPCION' + DataType = datString + Size = 2000 + end> + end item Params = <> Statements = < @@ -263,6 +298,14 @@ object srvFacturasCliente: TsrvFacturasCliente item DatasetField = 'PROCEDENCIA_CLIENTE' TableField = 'PROCEDENCIA_CLIENTE' + end + item + DatasetField = 'ID_TIPO_FACTURA' + TableField = 'ID_TIPO_FACTURA' + end + item + DatasetField = 'TIPO_OPERACION' + TableField = 'TIPO_OPERACION' end> end> Name = 'FacturasCliente' @@ -557,6 +600,16 @@ object srvFacturasCliente: TsrvFacturasCliente item Name = 'FECHA_RETENCION' DataType = datDateTime + end + item + Name = 'ID_TIPO_FACTURA' + DataType = datInteger + end + item + Name = 'TIPO_OPERACION' + DataType = datString + Size = 2000 + ServerAutoRefresh = True end> end item @@ -1174,6 +1227,11 @@ object srvFacturasCliente: TsrvFacturasCliente Name = 'FECHA_RETENCION' DataType = datDateTime Value = '' + end + item + Name = 'ID_TIPO_FACTURA' + DataType = datInteger + Value = '' end> Statements = < item @@ -1190,18 +1248,18 @@ object srvFacturasCliente: TsrvFacturasCliente 'RIO,'#10' ID_FORMA_PAGO,'#10' RECARGO_EQUIVALENCIA,'#10' ID_TIPO_IV' + 'A,'#10' IMPORTE_NETO,'#10' IMPORTE_PORTE,'#10' IGNORAR_CONTABILIDAD' + ','#10' ID_TIENDA,'#10' ID_CONTRATO,'#10' SIN_COMISION,'#10' SITUACIO' + - 'N,'#10' RETENCION,'#10' IMPORTE_RETENCION,'#10' FECHA_RETENCION)'#10' ' + - 'VALUES ('#10' :ID,'#10' :ID_EMPRESA,'#10' :REFERENCIA,'#10' :FECHA_F' + - 'ACTURA,'#10' :FECHA_VENCIMIENTO,'#10' :BASE_IMPONIBLE,'#10' :DESCUE' + - 'NTO,'#10' :IMPORTE_DESCUENTO,'#10' :IVA,'#10' :IMPORTE_IVA,'#10' :RE' + - ','#10' :IMPORTE_RE,'#10' :IMPORTE_TOTAL,'#10' :OBSERVACIONES,'#10' :' + - 'ID_CLIENTE,'#10' :NIF_CIF,'#10' :NOMBRE,'#10' :CALLE,'#10' :POBLACIO' + - 'N,'#10' :PROVINCIA,'#10' :CODIGO_POSTAL,'#10' CURRENT_TIMESTAMP,'#10' ' + - ' :USUARIO,'#10' :ID_FORMA_PAGO,'#10' :RECARGO_EQUIVALENCIA,'#10' :' + - 'ID_TIPO_IVA,'#10' :IMPORTE_NETO,'#10' :IMPORTE_PORTE,'#10' :IGNORAR' + - '_CONTABILIDAD,'#10' :ID_TIENDA,'#10' :ID_CONTRATO,'#10' :SIN_COMISI' + - 'ON,'#10' :SITUACION,'#10' :RETENCION,'#10' :IMPORTE_RETENCION,'#10' ' + - ':FECHA_RETENCION);'#10 + 'N,'#10' RETENCION,'#10' IMPORTE_RETENCION,'#10' FECHA_RETENCION,'#10' ' + + ' ID_TIPO_FACTURA)'#10' VALUES ('#10' :ID,'#10' :ID_EMPRESA,'#10' :REF' + + 'ERENCIA,'#10' :FECHA_FACTURA,'#10' :FECHA_VENCIMIENTO,'#10' :BASE_I' + + 'MPONIBLE,'#10' :DESCUENTO,'#10' :IMPORTE_DESCUENTO,'#10' :IVA,'#10' ' + + ':IMPORTE_IVA,'#10' :RE,'#10' :IMPORTE_RE,'#10' :IMPORTE_TOTAL,'#10' ' + + ':OBSERVACIONES,'#10' :ID_CLIENTE,'#10' :NIF_CIF,'#10' :NOMBRE,'#10' ' + + ':CALLE,'#10' :POBLACION,'#10' :PROVINCIA,'#10' :CODIGO_POSTAL,'#10' ' + + 'CURRENT_TIMESTAMP,'#10' :USUARIO,'#10' :ID_FORMA_PAGO,'#10' :RECARG' + + 'O_EQUIVALENCIA,'#10' :ID_TIPO_IVA,'#10' :IMPORTE_NETO,'#10' :IMPORT' + + 'E_PORTE,'#10' :IGNORAR_CONTABILIDAD,'#10' :ID_TIENDA,'#10' :ID_CONT' + + 'RATO,'#10' :SIN_COMISION,'#10' :SITUACION,'#10' :RETENCION,'#10' :IM' + + 'PORTE_RETENCION,'#10' :FECHA_RETENCION,'#10' :ID_TIPO_FACTURA);'#10 StatementType = stSQL ColumnMappings = <> end> @@ -1388,6 +1446,11 @@ object srvFacturasCliente: TsrvFacturasCliente DataType = datDateTime Value = '' end + item + Name = 'ID_TIPO_FACTURA' + DataType = datInteger + Value = '' + end item Name = 'OLD_ID' Value = '' @@ -1415,7 +1478,8 @@ object srvFacturasCliente: TsrvFacturasCliente 'ENDA,'#10' ID_CONTRATO = :ID_CONTRATO,'#10' SIN_COMISION = :SIN_CO' + 'MISION,'#10' SITUACION = :SITUACION,'#10' RETENCION = :RETENCION,'#10 + ' IMPORTE_RETENCION = :IMPORTE_RETENCION,'#10' FECHA_RETENCION ' + - '= :FECHA_RETENCION'#10' WHERE'#10' (ID = :OLD_ID);'#10 + '= :FECHA_RETENCION,'#10' ID_TIPO_FACTURA = :ID_TIPO_FACTURA'#10' WHE' + + 'RE'#10' (ID = :OLD_ID);'#10 StatementType = stSQL ColumnMappings = <> end> diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm index ed53ecd..801fa0f 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm @@ -58,7 +58,7 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente end end inherited tbxFiltro: TTBXToolbar - ExplicitWidth = 454 + ExplicitWidth = 379 inherited lblAno: TTBXLabelItem Visible = True end @@ -73,10 +73,17 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente ExplicitWidth = 640 end inherited TBXTMain2: TTBXToolbar - Left = 454 + Left = 382 + DockPos = 385 Visible = True - ExplicitLeft = 454 - ExplicitWidth = 91 + ExplicitLeft = 382 + ExplicitWidth = 258 + object TBXItem41: TTBXItem + Action = actAsignarTipoOperacion + DisplayMode = nbdmImageAndText + end + object TBSeparatorItem1: TTBSeparatorItem + end object TBXItem40: TTBXItem Action = actInformes DisplayMode = nbdmImageAndText @@ -200,15 +207,29 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 144 + Width = 144 end inherited edtFechaFinFiltro: TcxDateEdit + Left = 301 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 301 ExplicitWidth = 263 Width = 263 end + inherited txtFiltroTodo2: TcxTextEdit + Left = 473 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 473 + ExplicitWidth = 223 + Width = 223 + end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel Width = 640 @@ -281,6 +302,12 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente ImageIndex = 25 OnExecute = actInformesExecute end + object actAsignarTipoOperacion: TAction + Caption = 'Asignar Tipo Operaci'#243'n' + ImageIndex = 26 + OnExecute = actAsignarTipoOperacionExecute + OnUpdate = actAsignarTipoOperacionUpdate + end end inherited SmallImages: TPngImageList [5] PngImages = < @@ -1026,6 +1053,25 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente 41A130430000000049454E44AE426082} Name = 'PngImage25' Background = clWindow + end + item + PngImage.Data = { + 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF + 61000000097048597300000B3A00000B3A01647F570D0000015D4944415478DA + 63FCFFFF3F030830323232C0C0CEB58DCA2F6E6CBDF3FEF129B818C30F061490 + 3FFF3F58032336032E9C58FD9F8B47904155DB192EF6FFD72B867F9F2F31FCB9 + E3CA3063061E0380B6DBB373F01CB076CD66606165C7AAB96001923E6403809A + 9979F925FEC8299B32482B18E2D40C16C7614032D08039164EA97017810CF875 + 5E1CAC196F18EC5AD7C40F74FA073DB36006411179B8E6FF3F5F32FCBEA687A2 + 196B18000D681797D6AAD06008852B64D5BA0434E4251833000DFBFBA2087718 + 2CEF76FFFFE1E119865F5FDF81F9B993706BC61906D0589056D7D07F2223CE8D + 53332103DAC5C4A52B749438706AC6170BECACAC6C3FF4547918F8397FE3D48C + 3F1A79F9E7982A7F66F8FBBA16A7669C061CDB35E1BF9CAA1D83C84B23BC9AB1 + 1A008C466BA0F38F5888D632CC9AF907AF66AC065C383AF73FC7B7150C3B97ED + 21A819AB0137CE2CFBBF776E2643CE8C4F0435231B00004A4C11F0D3652A8300 + 00000049454E44AE426082} + Name = 'PngImage26' + Background = clWindow end> Left = 395 Bitmap = {} diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas index f47a4ab..38f7879 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas @@ -35,12 +35,17 @@ type actInformes: TAction; JSInformesDialog: TJSDialog; TBXItem40: TTBXItem; + actAsignarTipoOperacion: TAction; + TBXItem41: TTBXItem; + TBSeparatorItem1: TTBSeparatorItem; procedure FormShow(Sender: TObject); procedure actEliminarUpdate(Sender: TObject); procedure actNuevaFacturaExecute(Sender: TObject); procedure actNuevoAbonoExecute(Sender: TObject); procedure actInformesExecute(Sender: TObject); procedure OnListaAnosChange(Sender: TObject; const Text: string); + procedure actAsignarTipoOperacionExecute(Sender: TObject); + procedure actAsignarTipoOperacionUpdate(Sender: TObject); private FFacturas: IBizFacturaCliente; @@ -82,6 +87,37 @@ uses { *************************** TfEditorFacturasCliente *************************** } +procedure TfEditorFacturasCliente.actAsignarTipoOperacionExecute(Sender: TObject); +var + AFacturas: IBizFacturaCliente; + i: integer; + +begin + inherited; + + ViewGrid.SaveGridStatus; + try + SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Facturas as ISeleccionable).SelectedRecords); + AFacturas := (Controller as IFacturasClienteController).ExtraerSeleccionados(Facturas) as IBizFacturaCliente; + finally + ViewGrid.RestoreGridStatus; + end; + + if Controller.AsignarTipoOperacion(AFacturas) then + RefrescarInterno; +end; + +procedure TfEditorFacturasCliente.actAsignarTipoOperacionUpdate(Sender: TObject); +begin + inherited; + if HayDatos and Assigned(ViewGrid) then + (Sender as TAction).Enabled := not (dsDataTable.DataTable.State in dsEditModes) + and ViewGrid.esSeleccionCeldaDatos + and (ViewGrid.NumSeleccionados > 0) + else + (Sender as TAction).Enabled := False; +end; + procedure TfEditorFacturasCliente.actEliminarUpdate(Sender: TObject); begin inherited; diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm index 71834b9..242d6c1 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm @@ -1,6 +1,6 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente - Width = 867 - Height = 490 + Width = 1079 + Height = 553 Align = alClient OnCreate = CustomViewCreate OnDestroy = CustomViewDestroy @@ -9,8 +9,8 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente object dxLayoutControl1: TdxLayoutControl Left = 0 Top = 0 - Width = 867 - Height = 490 + Width = 1079 + Height = 553 Align = alClient ParentBackground = True TabOrder = 0 @@ -20,8 +20,8 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente ExplicitWidth = 451 ExplicitHeight = 304 DesignSize = ( - 867 - 490) + 1079 + 553) object eReferencia: TcxDBTextEdit Left = 135 Top = 30 @@ -66,7 +66,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente end object cbFormaPago: TcxDBLookupComboBox Left = 135 - Top = 135 + Top = 162 DataBinding.DataField = 'ID_FORMA_PAGO' DataBinding.DataSource = DADataSource Properties.DropDownListStyle = lsFixedList @@ -93,21 +93,21 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 3 + TabOrder = 4 Width = 78 end object bFormasPago: TButton - Left = 300 - Top = 135 + Left = 409 + Top = 162 Width = 132 Height = 23 Caption = 'Ver las formas de pago...' - TabOrder = 4 + TabOrder = 5 OnClick = bFormasPagoClick end inline frViewTienda1: TfrViewTienda Left = 22 - Top = 269 + Top = 296 Width = 351 Height = 48 Enabled = False @@ -117,10 +117,10 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Font.Name = 'Tahoma' Font.Style = [] ParentFont = False - TabOrder = 8 + TabOrder = 9 ReadOnly = False ExplicitLeft = 22 - ExplicitTop = 269 + ExplicitTop = 296 ExplicitWidth = 351 ExplicitHeight = 48 inherited dxLayoutControl1: TdxLayoutControl @@ -140,7 +140,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente end end inline frViewClienteFactura1: TfrViewClienteFactura - Left = 460 + Left = 569 Top = 30 Width = 398 Height = 265 @@ -150,9 +150,9 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Font.Name = 'Tahoma' Font.Style = [] ParentFont = False - TabOrder = 10 + TabOrder = 11 ReadOnly = False - ExplicitLeft = 460 + ExplicitLeft = 569 ExplicitTop = 30 ExplicitWidth = 398 ExplicitHeight = 265 @@ -182,12 +182,12 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Width = 276 end inherited edtCodigoPostal: TcxDBTextEdit - Left = 293 - ExplicitLeft = 293 + Left = 396 + ExplicitLeft = 396 end inherited Button3: TBitBtn - Left = 183 - ExplicitLeft = 183 + Left = 286 + ExplicitLeft = 286 end inherited cxDBTextEdit1: TcxDBTextEdit ExplicitWidth = 283 @@ -197,7 +197,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente end object edtFechaVencimiento: TcxDBDateEdit Left = 135 - Top = 164 + Top = 191 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'FECHA_VENCIMIENTO' DataBinding.DataSource = DADataSource @@ -217,12 +217,12 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente StyleDisabled.LookAndFeel.NativeStyle = True StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 5 + TabOrder = 6 Width = 310 end inline frViewObservaciones1: TfrViewObservaciones Left = 22 - Top = 398 + Top = 425 Width = 521 Height = 20 Font.Charset = DEFAULT_CHARSET @@ -231,10 +231,10 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Font.Name = 'Tahoma' Font.Style = [] ParentFont = False - TabOrder = 11 + TabOrder = 12 ReadOnly = False ExplicitLeft = 22 - ExplicitTop = 398 + ExplicitTop = 425 ExplicitHeight = 20 inherited memObservaciones: TcxDBMemo DataBinding.DataField = 'OBSERVACIONES' @@ -245,7 +245,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente end object cbRecargoEquivalencia: TcxDBCheckBox Left = 22 - Top = 347 + Top = 374 Caption = ' No acogida a comisiones' DataBinding.DataField = 'SIN_COMISION' DataBinding.DataSource = DADataSource @@ -271,12 +271,12 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.SkinName = '' - TabOrder = 9 + TabOrder = 10 Width = 158 end object edtSituacion: TcxDBComboBox Left = 135 - Top = 84 + Top = 111 DataBinding.DataField = 'SITUACION' DataBinding.DataSource = DADataSource Properties.DropDownListStyle = lsFixedList @@ -285,12 +285,12 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente 'PENDIENTE' 'PARCIALMENTE PAGADA' 'PAGADA') - TabOrder = 2 + TabOrder = 3 Width = 121 end object edtRefContrato: TcxDBTextEdit Left = 135 - Top = 215 + Top = 242 Anchors = [akLeft, akTop, akRight] AutoSize = False DataBinding.DataField = 'REF_CONTRATO' @@ -307,13 +307,13 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente StyleDisabled.TextColor = clWindowText StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 6 + TabOrder = 7 Height = 21 Width = 294 end object edtRefClienteContrato: TcxDBTextEdit Left = 135 - Top = 242 + Top = 269 Anchors = [akLeft, akTop, akRight] AutoSize = False DataBinding.DataField = 'REF_CLI_CONTRATO' @@ -330,10 +330,42 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente StyleDisabled.TextColor = clWindowText StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 7 + TabOrder = 8 Height = 21 Width = 294 end + object cbTipoFactura: TcxDBLookupComboBox + Left = 135 + Top = 84 + DataBinding.DataField = 'ID_TIPO_FACTURA' + DataBinding.DataSource = DADataSource + Properties.DropDownListStyle = lsFixedList + Properties.ImmediatePost = True + Properties.KeyFieldNames = 'ID' + Properties.ListColumns = < + item + FieldName = 'DESCRIPCION' + end> + Properties.ListOptions.GridLines = glNone + Properties.ListOptions.ShowHeader = False + Properties.ListOptions.SyncMode = True + Properties.ListSource = dsTiposFactura + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.Kind = lfStandard + Style.LookAndFeel.NativeStyle = True + Style.ButtonStyle = bts3D + Style.PopupBorderStyle = epbsFrame3D + StyleDisabled.LookAndFeel.Kind = lfStandard + StyleDisabled.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.Kind = lfStandard + StyleFocused.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.Kind = lfStandard + StyleHot.LookAndFeel.NativeStyle = True + TabOrder = 2 + Width = 158 + end object dxLayoutControl1Group_Root: TdxLayoutGroup ShowCaption = False Hidden = True @@ -363,6 +395,11 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Control = edtFecha ControlOptions.ShowBorder = False end + object dxLayoutControl1Item11: TdxLayoutItem + Caption = 'Tipo operaci'#243'n:' + Control = cbTipoFactura + ControlOptions.ShowBorder = False + end object ledtSituacion: TdxLayoutItem Caption = 'Situaci'#243'n:' Control = edtSituacion @@ -479,4 +516,8 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Left = 64 Top = 24 end + object dsTiposFactura: TDADataSource + Left = 48 + Top = 104 + end end diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas index f1b929d..97dcfad 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas @@ -64,6 +64,9 @@ type edtRefContrato: TcxDBTextEdit; dxLayoutControl1Item9: TdxLayoutItem; edtRefClienteContrato: TcxDBTextEdit; + dxLayoutControl1Item11: TdxLayoutItem; + cbTipoFactura: TcxDBLookupComboBox; + dsTiposFactura: TDADataSource; procedure bFormasPagoClick(Sender: TObject); procedure CustomViewDestroy(Sender: TObject); procedure CustomViewCreate(Sender: TObject); @@ -72,6 +75,7 @@ type protected FFactura : IBizFacturaCliente; FController : IFacturasClienteController; + FTiposFacturaCliente : IBizTiposFacturaCliente; FFormasPago : IBizFormaPago; FFormasPagoController : IFormasPagoController; function GetFactura: IBizFacturaCliente; @@ -104,6 +108,7 @@ procedure TfrViewFacturaCliente.CustomViewCreate(Sender: TObject); begin inherited; FFormasPago := Nil; + FTiposFacturaCliente := Nil; FFormasPagoController := TFormasPagoController.Create; cbFormaPago.Properties.OnEditValueChanged := cbFormaPagoPropertiesEditValueChanged; edtFechaVencimiento.Properties.OnEditValueChanged := edtFechaVencimientoPropertiesEditValueChanged; @@ -112,6 +117,7 @@ end; procedure TfrViewFacturaCliente.CustomViewDestroy(Sender: TObject); begin FFormasPago := Nil; + FTiposFacturaCliente := Nil; FFormasPagoController := NIL; edtFechaVencimiento.Properties.OnEditValueChanged := Nil; cbFormaPago.Properties.OnEditValueChanged := Nil; @@ -221,6 +227,11 @@ begin ledtSituacion.Enabled := True; end; + + FTiposFacturaCliente := FController.darTiposFacturaCliente; + dsTiposFactura.DataTable := FTiposFacturaCliente.DataTable; + dsTiposFactura.DataTable.Active := True; + //Solo se deshabilita al insertar, luego la referencia será modificable //eReferencia.Enabled := (FFactura.DataTable.State = dsInsert); diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm index 55de7e2..27084c5 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm @@ -176,6 +176,10 @@ inherited frViewFacturasCliente: TfrViewFacturasCliente GroupSummaryAlignment = taRightJustify HeaderAlignmentHorz = taRightJustify end + object cxGridViewTIPO_OPERACION: TcxGridDBColumn + Caption = 'Tipo operaci'#243'n' + DataBinding.FieldName = 'TIPO_OPERACION' + end end inherited cxGridLevel: TcxGridLevel Caption = 'Todas' @@ -221,6 +225,16 @@ inherited frViewFacturasCliente: TfrViewFacturasCliente ExplicitWidth = 273 Width = 273 end + inherited txtFiltroTodo2: TcxTextEdit + Left = 541 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 541 + ExplicitWidth = 250 + Width = 250 + end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel Width = 802 diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas index b82b51d..0fd82a2 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas @@ -68,6 +68,7 @@ type actProcedencia: TAction; TBXSeparatorItem3: TTBXSeparatorItem; TBXItem4: TTBXItem; + cxGridViewTIPO_OPERACION: TcxGridDBColumn; procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; out AStyle: TcxStyle); @@ -91,6 +92,7 @@ type public procedure AnadirOtrosFiltros; override; + procedure ConfigView; override; property Facturas: IBizFacturaCliente read GetFacturas write SetFacturas; end; @@ -98,7 +100,7 @@ type implementation uses - uDataModuleFacturasCliente, DateUtils, uViewGridBase; + uDataModuleFacturasCliente, DateUtils, uViewGridBase, uFactuGES_App; {$R *.dfm} @@ -211,6 +213,17 @@ begin cxGrid.ActiveLevel.GridView := cxGridView; end; +procedure TfrViewFacturasCliente.ConfigView; +begin + inherited; + + if ((AppFactuGES.EmpresaActiva.ID = 2) or (AppFactuGES.EmpresaActiva.ID = 3)) then + cxGridViewTIENDA.Visible := True + else + cxGridViewTIENDA.Visible := False; + +end; + procedure TfrViewFacturasCliente.cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel); begin diff --git a/Source/Modulos/Facturas de proveedor/Controller/uDetallesFacturaProveedorController.pas b/Source/Modulos/Facturas de proveedor/Controller/uDetallesFacturaProveedorController.pas index a65dfb3..80625b8 100644 --- a/Source/Modulos/Facturas de proveedor/Controller/uDetallesFacturaProveedorController.pas +++ b/Source/Modulos/Facturas de proveedor/Controller/uDetallesFacturaProveedorController.pas @@ -26,6 +26,7 @@ type procedure AsignarController; override; //Si sobreescribimos este método podremos tener en cuenta otras columnas para el calculo del importe total de un concepto function CalcularImporteTotalConcepto(DataTable: TDADataTable): Double; override; + procedure CalculoDetalleConcepto(DataTable: TDADataTable; var ImporteAcumulado : Double; var ImporteTotal : Double; const Opcional: Boolean); override; procedure ValidarCampos(DataTable: TDADataTable); override; procedure DesglosarPorteDetalles(ImportePorte: Currency; ADetalles: IDAStronglyTypedDataTable); function DarTotalPorteTotal(ADetalles: IDAStronglyTypedDataTable): Double; @@ -43,7 +44,7 @@ implementation { TDetallesFacturaProveedorController } uses Variants, uDataModuleFacturasProveedor, uArticulosFacturaProveedorController, - uControllerDetallesBase, Dialogs, SysUtils, uDialogUtils, uCalculosUtils; + uControllerDetallesBase, Dialogs, SysUtils, uDialogUtils, uCalculosUtils, uNumUtils; procedure TDetallesFacturaProveedorController.ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor); var @@ -99,7 +100,22 @@ end; function TDetallesFacturaProveedorController.CalcularImporteTotalConcepto(DataTable: TDADataTable): Double; begin - Result := CalcularLineaConcepto(DataTable); +//Calcular con 4 decimales + Result := CalcularLineaConcepto(DataTable, 4); +end; + +procedure TDetallesFacturaProveedorController.CalculoDetalleConcepto( + DataTable: TDADataTable; var ImporteAcumulado, ImporteTotal: Double; + const Opcional: Boolean); +begin + with DataTable do + begin + ImporteAcumulado := ImporteAcumulado + RoundCurrency(FieldByName(CAMPO_IMPORTE_TOTAL).AsCurrency, 4); +// ImporteAcumulado := ImporteAcumulado + FieldByName(CAMPO_IMPORTE_TOTAL).AsFloat; + if not Opcional then + ImporteTotal := ImporteTotal + RoundCurrency(FieldByName(CAMPO_IMPORTE_TOTAL).AsCurrency, 4); +// ImporteTotal := ImporteTotal + FieldByName(CAMPO_IMPORTE_TOTAL).AsFloat; + end; end; constructor TDetallesFacturaProveedorController.Create; diff --git a/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorController.pas b/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorController.pas index 63ffded..e86182f 100644 --- a/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorController.pas +++ b/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorController.pas @@ -58,7 +58,7 @@ type procedure FiltrarAno(AFactura: IBizFacturaProveedor; ADynWhereDataTable: WideString; const Ano: String); function darTiposFacturaProveedor: IBizTiposFacturaProveedor; - procedure AsignarTipoOperacion(AFacturas: IBizFacturaProveedor); + function AsignarTipoOperacion(AFacturas: IBizFacturaProveedor): boolean; end; TFacturasProveedorController = class(TControllerBase, IFacturasProveedorController) @@ -133,7 +133,7 @@ type procedure FiltrarAno(AFactura: IBizFacturaProveedor; ADynWhereDataTable: WideString; const Ano: String); function darTiposFacturaProveedor: IBizTiposFacturaProveedor; - procedure AsignarTipoOperacion(AFacturas: IBizFacturaProveedor); + function AsignarTipoOperacion(AFacturas: IBizFacturaProveedor): boolean; end; implementation @@ -451,12 +451,13 @@ begin AFactura.TIPO := CTE_TIPO_ABONO; end; -procedure TFacturasProveedorController.AsignarTipoOperacion(AFacturas: IBizFacturaProveedor); +function TFacturasProveedorController.AsignarTipoOperacion(AFacturas: IBizFacturaProveedor): boolean; var ATipoOperacionController : ITiposOperacionCompraController; ATipoOperacion: Variant; begin + Result := False; if Assigned(AFacturas) then begin @@ -488,6 +489,7 @@ begin Next; end; ApplyUpdates; + Result := True; end; end; HideHourglassCursor; diff --git a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm index b7ba565..7efe927 100644 --- a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm +++ b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm @@ -159,6 +159,10 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor inherited dxLayoutControl1: TdxLayoutControl Width = 350 ExplicitWidth = 350 + inherited Bevel1: TBevel + Width = 242 + ExplicitWidth = 242 + end inherited edtlNombre: TcxDBTextEdit DataBinding.DataSource = dsDataTable ExplicitWidth = 259 @@ -200,14 +204,25 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor end inherited frViewObservaciones1: TfrViewObservaciones Width = 671 + Height = 228 ExplicitWidth = 671 + ExplicitHeight = 228 inherited memObservaciones: TcxDBMemo DataBinding.DataSource = frViewFacturaProveedor1.DADataSource - ExplicitWidth = 669 - ExplicitHeight = 20 + ExplicitWidth = 671 + ExplicitHeight = 228 + Height = 228 Width = 671 end end + inherited cbTipoFactura: TcxDBLookupComboBox + ExplicitWidth = 209 + Width = 209 + end + inherited edtSituacion: TcxDBComboBox + ExplicitWidth = 294 + Width = 294 + end end end end @@ -256,40 +271,40 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor ExplicitWidth = 57 end inherited UpDown1: TUpDown - Left = 220 - ExplicitLeft = 220 + Left = 202 + ExplicitLeft = 202 end inherited ToolButton13: TToolButton - Left = 237 - ExplicitLeft = 237 + Left = 219 + ExplicitLeft = 219 end inherited ToolButton6: TToolButton - Left = 245 - ExplicitLeft = 245 + Left = 227 + ExplicitLeft = 227 end inherited ToolButton7: TToolButton - Left = 279 - ExplicitLeft = 279 + Left = 261 + ExplicitLeft = 261 end inherited ToolButton8: TToolButton - Left = 313 - ExplicitLeft = 313 + Left = 295 + ExplicitLeft = 295 end inherited ToolButton12: TToolButton - Left = 347 - ExplicitLeft = 347 + Left = 329 + ExplicitLeft = 329 end inherited ToolButton9: TToolButton - Left = 355 - ExplicitLeft = 355 + Left = 337 + ExplicitLeft = 337 end inherited ToolButton10: TToolButton - Left = 389 - ExplicitLeft = 389 + Left = 371 + ExplicitLeft = 371 end inherited ToolButton11: TToolButton - Left = 423 - ExplicitLeft = 423 + Left = 405 + ExplicitLeft = 405 end end inherited cxGrid: TcxGrid @@ -335,6 +350,18 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor inherited ToolBar1: TToolBar Width = 732 ExplicitWidth = 732 + inherited ToolButton1: TToolButton + ExplicitWidth = 113 + end + inherited ToolButton4: TToolButton + ExplicitWidth = 113 + end + inherited ToolButton2: TToolButton + ExplicitWidth = 113 + end + inherited ToolButton7: TToolButton + ExplicitWidth = 113 + end end end end @@ -410,21 +437,35 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor Width = 746 ExplicitWidth = 746 inherited Bevel3: TBevel - Left = 398 + Left = 353 Top = 30 Height = 122 - ExplicitLeft = 398 + ExplicitLeft = 353 ExplicitTop = 30 ExplicitHeight = 122 end inherited Bevel4: TBevel - Left = 510 + Left = 465 Top = 57 Width = 186 - ExplicitLeft = 510 + ExplicitLeft = 465 ExplicitTop = 57 ExplicitWidth = 186 end + inherited Bevel2: TBevel + Top = 185 + Width = 333 + ExplicitTop = 185 + ExplicitWidth = 333 + end + inherited Bevel1: TBevel + Left = 372 + Top = 185 + Width = 332 + ExplicitLeft = 372 + ExplicitTop = 185 + ExplicitWidth = 332 + end inherited ImporteDto: TcxDBCurrencyEdit Top = 57 Style.LookAndFeel.SkinName = '' @@ -437,27 +478,27 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor Width = 207 end inherited ImporteIVA: TcxDBCurrencyEdit - Left = 581 + Left = 536 Top = 77 Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 581 + ExplicitLeft = 536 ExplicitTop = 77 ExplicitWidth = 143 Width = 143 end inherited ImporteTotal: TcxDBCurrencyEdit - Left = 511 + Left = 466 Top = 158 Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 511 + ExplicitLeft = 466 ExplicitTop = 158 ExplicitWidth = 213 Width = 213 @@ -473,31 +514,31 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor ExplicitTop = 57 end inherited edtIVA: TcxDBSpinEdit - Left = 510 + Left = 465 Top = 77 Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 510 + ExplicitLeft = 465 ExplicitTop = 77 end inherited ImporteBase: TcxDBCurrencyEdit - Left = 510 + Left = 465 Top = 30 Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 510 + ExplicitLeft = 465 ExplicitTop = 30 ExplicitWidth = 214 Width = 214 end inherited edtRE: TcxDBSpinEdit - Left = 510 + Left = 465 Top = 131 Properties.AssignedValues.MinValue = True Style.LookAndFeel.SkinName = '' @@ -505,37 +546,37 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 510 + ExplicitLeft = 465 ExplicitTop = 131 end inherited edtIRPF: TcxDBSpinEdit - Left = 510 + Left = 465 Top = 104 DataBinding.DataField = 'IRPF' Enabled = True Style.IsFontAssigned = True - ExplicitLeft = 510 + ExplicitLeft = 465 ExplicitTop = 104 end inherited ImporteRE: TcxDBCurrencyEdit - Left = 581 + Left = 536 Top = 131 Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 581 + ExplicitLeft = 536 ExplicitTop = 131 ExplicitWidth = 143 Width = 143 end inherited ImporteIRPF: TcxDBCurrencyEdit - Left = 581 + Left = 536 Top = 104 DataBinding.DataField = 'IMPORTE_IRPF' Style.IsFontAssigned = True - ExplicitLeft = 581 + ExplicitLeft = 536 ExplicitTop = 104 ExplicitWidth = 56 Width = 56 @@ -578,10 +619,10 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor Width = 140 end inherited bTiposIVA: TButton - Left = 250 + Left = 205 Top = 111 OnClick = frViewTotales1bTiposIVAClick - ExplicitLeft = 250 + ExplicitLeft = 205 ExplicitTop = 111 end inherited cbRecargoEquivalencia: TcxDBCheckBox @@ -594,6 +635,32 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor ExplicitWidth = 278 Width = 278 end + inherited edtRetencion: TcxDBSpinEdit + Left = 465 + Top = 200 + Style.IsFontAssigned = True + ExplicitLeft = 465 + ExplicitTop = 200 + end + inherited edtImporteRetencion: TcxDBCurrencyEdit + Left = 536 + Top = 200 + Style.IsFontAssigned = True + ExplicitLeft = 536 + ExplicitTop = 200 + ExplicitWidth = 342 + Width = 342 + end + inherited edtFechaRetencion: TcxDBDateEdit + Top = 200 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitTop = 200 + ExplicitWidth = 333 + Width = 333 + end inherited dxLayoutControl1Group_Root: TdxLayoutGroup LookAndFeel = frViewFacturaProveedor1.dxLayoutOfficeLookAndFeel1 inherited dxLayoutControl1Group1: TdxLayoutGroup diff --git a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturasProveedor.dfm b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturasProveedor.dfm index adf633d..10f78eb 100644 --- a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturasProveedor.dfm +++ b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturasProveedor.dfm @@ -60,7 +60,7 @@ inherited fEditorFacturasProveedor: TfEditorFacturasProveedor end inherited tbxFiltro: TTBXToolbar DockPos = -6 - ExplicitWidth = 454 + ExplicitWidth = 379 inherited lblAno: TTBXLabelItem Visible = True end @@ -75,18 +75,18 @@ inherited fEditorFacturasProveedor: TfEditorFacturasProveedor ExplicitWidth = 929 end inherited TBXTMain2: TTBXToolbar - Left = 454 + Left = 379 Visible = True - ExplicitLeft = 454 + ExplicitLeft = 379 ExplicitWidth = 258 - object TBXItem40: TTBXItem - Action = actInformes + object TBXItem41: TTBXItem + Action = actAsignarTipoOperacion DisplayMode = nbdmImageAndText end object TBSeparatorItem1: TTBSeparatorItem end - object TBXItem41: TTBXItem - Action = actAsignarTipoOperacion + object TBXItem40: TTBXItem + Action = actInformes DisplayMode = nbdmImageAndText end end @@ -144,6 +144,16 @@ inherited fEditorFacturasProveedor: TfEditorFacturasProveedor Kind = skSum Position = spFooter Column = frViewFacturasProveedor1.cxGridViewIMPORTE_RE + end + item + Format = ',0.00 '#8364';-,0.00 '#8364 + Kind = skSum + Position = spFooter + Column = frViewFacturasProveedor1.cxGridViewIMPORTE_IRPF + end + item + Format = ',0.00 '#8364';-,0.00 '#8364 + Column = frViewFacturasProveedor1.cxGridViewIMPORTE_IRPF end> DataController.Summary.FooterSummaryItems = < item @@ -170,6 +180,10 @@ inherited fEditorFacturasProveedor: TfEditorFacturasProveedor Format = ',0.00 '#8364';-,0.00 '#8364 Kind = skSum Column = frViewFacturasProveedor1.cxGridViewIMPORTE_RE + end + item + Kind = skSum + Column = frViewFacturasProveedor1.cxGridViewIMPORTE_IRPF end> end end @@ -208,12 +222,12 @@ inherited fEditorFacturasProveedor: TfEditorFacturasProveedor Width = 263 end inherited txtFiltroTodo2: TcxTextEdit - Left = 695 + Left = 697 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 695 + ExplicitLeft = 697 ExplicitWidth = 204 Width = 204 end diff --git a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturasProveedor.pas b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturasProveedor.pas index 81e4b83..2c4db74 100644 --- a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturasProveedor.pas +++ b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturasProveedor.pas @@ -103,9 +103,7 @@ begin ViewGrid.RestoreGridStatus; end; - Controller.AsignarTipoOperacion(AFacturas); - - if (AFacturas.DataTable.RecordCount > 0) then + if Controller.AsignarTipoOperacion(AFacturas) then RefrescarInterno; end; diff --git a/Source/Modulos/Facturas de proveedor/Views/uViewDetallesFacturaProveedor.dfm b/Source/Modulos/Facturas de proveedor/Views/uViewDetallesFacturaProveedor.dfm index 40fd4f8..fb15321 100644 --- a/Source/Modulos/Facturas de proveedor/Views/uViewDetallesFacturaProveedor.dfm +++ b/Source/Modulos/Facturas de proveedor/Views/uViewDetallesFacturaProveedor.dfm @@ -4,16 +4,31 @@ inherited frViewDetallesFacturaProveedor: TfrViewDetallesFacturaProveedor inherited cxGridViewCANTIDAD: TcxGridDBColumn Properties.Alignment.Horz = taRightJustify end - inherited cxGridViewDESCUENTO: TcxGridDBColumn - Visible = False - VisibleForCustomization = False + inherited cxGridViewIMPORTEUNIDAD: TcxGridDBColumn + Properties.DecimalPlaces = 4 + Properties.DisplayFormat = ',0.0000 '#8364';-,0.0000 '#8364 + Properties.EditFormat = ',0.0000;-,0.0000' end inherited cxGridViewIMPORTENETO: TcxGridDBColumn + Properties.DecimalPlaces = 4 + Properties.DisplayFormat = ',0.0000 '#8364';-,0.0000 '#8364 + Properties.EditFormat = ',0.0000;-,0.0000' Properties.ReadOnly = False - Visible = False Options.Editing = True + end + inherited cxGridViewDESCUENTO: TcxGridDBColumn VisibleForCustomization = False end + inherited cxGridViewIMP_UNIDAD_DTO: TcxGridDBColumn + Properties.DecimalPlaces = 4 + Properties.DisplayFormat = ',0.0000 '#8364';-,0.0000 '#8364 + Properties.EditFormat = ',0.0000;-,0.0000' + end + inherited cxGridViewIMPORTETOTAL: TcxGridDBColumn + Properties.DecimalPlaces = 4 + Properties.DisplayFormat = ',0.0000 '#8364';-,0.0000 '#8364 + Properties.EditFormat = ',0.0000;-,0.0000' + end end end end diff --git a/Source/Modulos/Facturas de proveedor/Views/uViewElegirArticulosFacturasProveedor.dfm b/Source/Modulos/Facturas de proveedor/Views/uViewElegirArticulosFacturasProveedor.dfm index 705a972..6d68f20 100644 --- a/Source/Modulos/Facturas de proveedor/Views/uViewElegirArticulosFacturasProveedor.dfm +++ b/Source/Modulos/Facturas de proveedor/Views/uViewElegirArticulosFacturasProveedor.dfm @@ -6,6 +6,26 @@ inherited frViewElegirArticulosFacturasProveedor: TfrViewElegirArticulosFacturas Height = 321 ExplicitHeight = 321 inherited cxGridView: TcxGridDBTableView + inherited cxGridViewPRECIO_COSTE: TcxGridDBColumn + Caption = 'Precio material' + Properties.DecimalPlaces = 4 + Properties.DisplayFormat = ',0.0000 '#8364';-,0.0000 '#8364 + Properties.EditFormat = '' + VisibleForCustomization = False + end + inherited cxGridViewDESCUENTO: TcxGridDBColumn + Visible = True + end + inherited cxGridViewPRECIO_NETO: TcxGridDBColumn + Caption = 'Precio coste' + Properties.DecimalPlaces = 4 + Properties.DisplayFormat = ',0.0000 '#8364';-,0.0000 '#8364 + Properties.EditFormat = '' + Visible = True + end + inherited cxGridViewPRECIOPVP2: TcxGridDBColumn + Visible = False + end object cxGridViewID_PROVEEDOR: TcxGridDBColumn DataBinding.FieldName = 'ID_PROVEEDOR' Visible = False @@ -38,13 +58,25 @@ inherited frViewElegirArticulosFacturasProveedor: TfrViewElegirArticulosFacturas Width = 121 end inherited edtFechaFinFiltro: TcxDateEdit + Left = 549 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 549 ExplicitWidth = 121 Width = 121 end + inherited txtFiltroTodo2: TcxTextEdit + Left = 525 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 525 + ExplicitWidth = 250 + Width = 250 + end end end end diff --git a/Source/Modulos/Facturas de proveedor/Views/uViewFacturasProveedor.dfm b/Source/Modulos/Facturas de proveedor/Views/uViewFacturasProveedor.dfm index fa5b085..4fb6e99 100644 --- a/Source/Modulos/Facturas de proveedor/Views/uViewFacturasProveedor.dfm +++ b/Source/Modulos/Facturas de proveedor/Views/uViewFacturasProveedor.dfm @@ -31,6 +31,12 @@ inherited frViewFacturasProveedor: TfrViewFacturasProveedor Kind = skSum Position = spFooter Column = cxGridViewBASE_IMPONIBLE + end + item + Format = ',0.00 '#8364';-,0.00 '#8364 + Kind = skSum + Position = spFooter + Column = cxGridViewIMPORTE_IRPF end> DataController.Summary.FooterSummaryItems = < item @@ -52,6 +58,11 @@ inherited frViewFacturasProveedor: TfrViewFacturasProveedor Format = ',0.00 '#8364';-,0.00 '#8364 Kind = skSum Column = cxGridViewBASE_IMPONIBLE + end + item + Format = ',0.00 '#8364';-,0.00 '#8364 + Kind = skSum + Column = cxGridViewIMPORTE_IRPF end> OptionsCustomize.ColumnHidingOnGrouping = False OptionsView.GroupFooters = gfAlwaysVisible @@ -242,12 +253,14 @@ inherited frViewFacturasProveedor: TfrViewFacturasProveedor Width = 287 end inherited txtFiltroTodo2: TcxTextEdit - Left = 377 + Left = 361 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 377 + ExplicitLeft = 361 + ExplicitWidth = 250 + Width = 250 end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel diff --git a/Source/Modulos/Formas de pago/Views/uEditorFormaPago.pas b/Source/Modulos/Formas de pago/Views/uEditorFormaPago.pas index e54cf23..4d135af 100644 --- a/Source/Modulos/Formas de pago/Views/uEditorFormaPago.pas +++ b/Source/Modulos/Formas de pago/Views/uEditorFormaPago.pas @@ -121,6 +121,9 @@ end; procedure TfEditorFormaPago.actAnadirExecute(Sender: TObject); begin + if Assigned(FFormaPago) and (FFormaPago.State = dsInsert) then + FController.Guardar(FFormaPago); + FPlazos.Append; end; diff --git a/Source/Modulos/Historico de movimientos/Views/uEditorHistoricoMovimientos.dfm b/Source/Modulos/Historico de movimientos/Views/uEditorHistoricoMovimientos.dfm index 24099d9..a420f60 100644 --- a/Source/Modulos/Historico de movimientos/Views/uEditorHistoricoMovimientos.dfm +++ b/Source/Modulos/Historico de movimientos/Views/uEditorHistoricoMovimientos.dfm @@ -5,7 +5,7 @@ inherited fEditorHistoricoMovimientos: TfEditorHistoricoMovimientos ClientHeight = 620 ClientWidth = 902 ExplicitWidth = 910 - ExplicitHeight = 654 + ExplicitHeight = 658 PixelsPerInch = 96 TextHeight = 13 inherited JvNavPanelHeader: TJvNavPanelHeader @@ -137,10 +137,10 @@ inherited fEditorHistoricoMovimientos: TfEditorHistoricoMovimientos Width = 902 ExplicitWidth = 902 inherited tbxMain: TTBXToolbar - ExplicitWidth = 358 + ExplicitWidth = 569 end inherited tbxFiltro: TTBXToolbar - ExplicitWidth = 269 + ExplicitWidth = 201 inherited TBXItem37: TTBXItem Visible = False end @@ -148,10 +148,6 @@ inherited fEditorHistoricoMovimientos: TfEditorHistoricoMovimientos inherited tbxMenu: TTBXToolbar ExplicitWidth = 902 end - inherited TBXTMain2: TTBXToolbar - Left = 334 - ExplicitLeft = 334 - end end inherited StatusBar: TJvStatusBar Top = 601 @@ -161,9 +157,9 @@ inherited fEditorHistoricoMovimientos: TfEditorHistoricoMovimientos end inline frViewHistoricoMovimientos1: TfrViewHistoricoMovimientos [3] Left = 0 - Top = 102 + Top = 106 Width = 902 - Height = 499 + Height = 495 Align = alClient Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -173,14 +169,14 @@ inherited fEditorHistoricoMovimientos: TfEditorHistoricoMovimientos ParentFont = False TabOrder = 3 ReadOnly = False - ExplicitTop = 102 + ExplicitTop = 106 ExplicitWidth = 902 - ExplicitHeight = 499 + ExplicitHeight = 495 inherited cxGrid: TcxGrid Width = 902 - Height = 371 + Height = 367 ExplicitWidth = 902 - ExplicitHeight = 371 + ExplicitHeight = 367 inherited cxGridView: TcxGridDBTableView DataController.Summary.FooterSummaryItems = < item @@ -207,19 +203,41 @@ inherited fEditorHistoricoMovimientos: TfEditorHistoricoMovimientos Width = 902 ExplicitWidth = 902 inherited txtFiltroTodo: TcxTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 273 Width = 273 end inherited edtFechaIniFiltro: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 121 Width = 121 end inherited edtFechaFinFiltro: TcxDateEdit Left = 553 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 553 ExplicitWidth = 121 Width = 121 end + inherited txtFiltroTodo2: TcxTextEdit + Left = 529 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 529 + ExplicitWidth = 250 + Width = 250 + end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel Width = 902 @@ -232,8 +250,8 @@ inherited fEditorHistoricoMovimientos: TfEditorHistoricoMovimientos end end inherited pnlAgrupaciones: TTBXDockablePanel - Top = 473 - ExplicitTop = 473 + Top = 469 + ExplicitTop = 469 ExplicitWidth = 902 inherited TBXAlignmentPanel1: TTBXAlignmentPanel Width = 902 @@ -289,6 +307,10 @@ inherited fEditorHistoricoMovimientos: TfEditorHistoricoMovimientos inherited actAnchoAuto: TAction ImageIndex = 27 end + inherited actExportarExcel: TAction + Enabled = True + Visible = True + end object actExpandir: TAction Category = 'Ver' Caption = 'Expandir' diff --git a/Source/Modulos/Inventario/Views/uEditorInventario.dfm b/Source/Modulos/Inventario/Views/uEditorInventario.dfm index fc6838d..707020b 100644 --- a/Source/Modulos/Inventario/Views/uEditorInventario.dfm +++ b/Source/Modulos/Inventario/Views/uEditorInventario.dfm @@ -43,7 +43,7 @@ inherited fEditorInventario: TfEditorInventario Width = 669 ExplicitWidth = 669 inherited tbxMain: TTBXToolbar - ExplicitWidth = 639 + ExplicitWidth = 669 object TBXSeparatorItem84: TTBXSeparatorItem [6] end object TBXItem54: TTBXItem [7] @@ -66,7 +66,7 @@ inherited fEditorInventario: TfEditorInventario end end inherited tbxFiltro: TTBXToolbar - ExplicitWidth = 276 + ExplicitWidth = 201 inherited TBXItem37: TTBXItem Visible = False end @@ -75,10 +75,9 @@ inherited fEditorInventario: TfEditorInventario ExplicitWidth = 669 end inherited TBXTMain2: TTBXToolbar - Left = 276 - DockPos = 264 - Visible = True - ExplicitLeft = 276 + Left = 201 + DockPos = 200 + ExplicitLeft = 201 object TBXItem38: TTBXItem Action = actReservados DisplayMode = nbdmImageAndText @@ -202,6 +201,16 @@ inherited fEditorInventario: TfEditorInventario ExplicitWidth = 205 Width = 205 end + inherited txtFiltroTodo2: TcxTextEdit + Left = 462 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 462 + ExplicitWidth = 250 + Width = 250 + end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel Width = 669 @@ -268,6 +277,10 @@ inherited fEditorInventario: TfEditorInventario inherited actAnchoAuto: TAction ImageIndex = 27 end + inherited actExportarExcel: TAction + Enabled = True + Visible = True + end object actRecibirPedido: TAction Category = 'Logistica' Caption = 'Recibir pedido' diff --git a/Source/Modulos/Pedidos a proveedor/Controller/uDetallesPedidoProveedorController.pas b/Source/Modulos/Pedidos a proveedor/Controller/uDetallesPedidoProveedorController.pas index 6474f3d..f12abbd 100644 --- a/Source/Modulos/Pedidos a proveedor/Controller/uDetallesPedidoProveedorController.pas +++ b/Source/Modulos/Pedidos a proveedor/Controller/uDetallesPedidoProveedorController.pas @@ -101,7 +101,8 @@ end; function TDetallesPedidoProveedorController.CalcularImporteTotalConcepto(DataTable: TDADataTable): Double; begin - Result := CalcularLineaConcepto(DataTable); +//Calcular con 4 decimales + Result := CalcularLineaConcepto(DataTable, 4); end; constructor TDetallesPedidoProveedorController.Create; diff --git a/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorController.pas b/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorController.pas index ba3f772..c3f130f 100644 --- a/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorController.pas +++ b/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorController.pas @@ -49,6 +49,8 @@ type function ElegirPedidos(APedido: IBizPedidoProveedor; AMensaje: String; AMultiSelect: Boolean): IBizPedidoProveedor; procedure RecuperarProveedor(APedido: IBizPedidoProveedor); function ArticulosPendientesDeRecibir(IDPedido: Integer): IBizDetallesPedidoProveedorPend; + + function AsignarSituacion(const ASituacion: Variant; APedidos: IBizPedidoProveedor): boolean; end; TPedidosProveedorController = class(TControllerBase, IPedidosProveedorController) @@ -112,6 +114,8 @@ type function ExtraerSeleccionados(APedido: IBizPedidoProveedor) : IBizPedidoProveedor; function ElegirPedidos(APedido: IBizPedidoProveedor; AMensaje: String; AMultiSelect: Boolean): IBizPedidoProveedor; function ArticulosPendientesDeRecibir(IDPedido: Integer): IBizDetallesPedidoProveedorPend; + + function AsignarSituacion(const ASituacion: Variant; APedidos: IBizPedidoProveedor): boolean; end; implementation @@ -123,7 +127,7 @@ uses schPedidosProveedorClient_Intf, uDAInterfaces, uPedidosProveedorReportController, uDateUtils, uIEditorPedidoProveedor, uIEditorElegirPedidosProveedor, Dialogs, uIEditorDireccionEntregaPedidoProveedor, Classes, - uIEditorSituacionPedidoProveedor, Variants, uSistemaFunc, uEMailUtils; + uIEditorSituacionPedidoProveedor, Variants, uSistemaFunc, uEMailUtils, uStringsUtils; { TPedidosProveedorController } @@ -157,6 +161,32 @@ begin FDataModule := TDataModulePedidosProveedor.Create(Nil); end; +function TPedidosProveedorController.AsignarSituacion(const ASituacion: Variant; APedidos: IBizPedidoProveedor): Boolean; +begin + ShowHourglassCursor; + if not EsCadenaVacia(ASituacion) then + begin + //Asignamos en pedido + with APedidos.DataTable do + begin + First; + while not EOF do + begin + if (APedidos.SITUACION <> ASituacion) then + begin + Edit; + APedidos.SITUACION := ASituacion; + Post; + end; + Next; + end; + ApplyUpdates; + Result := True; + end; + end; + HideHourglassCursor; +end; + function TPedidosProveedorController.Buscar(const ID: Integer): IBizPedidoProveedor; begin Result := FDataModule.GetItem(ID); diff --git a/Source/Modulos/Pedidos a proveedor/Model/schPedidosProveedorClient_Intf.pas b/Source/Modulos/Pedidos a proveedor/Model/schPedidosProveedorClient_Intf.pas index ddbb54e..1393d59 100644 --- a/Source/Modulos/Pedidos a proveedor/Model/schPedidosProveedorClient_Intf.pas +++ b/Source/Modulos/Pedidos a proveedor/Model/schPedidosProveedorClient_Intf.pas @@ -9,9 +9,9 @@ const { Data table rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_PedidosProveedor = '{E291476A-60EC-42CA-B06D-6B53509DE7FB}'; - RID_PedidosProveedor_Detalles = '{0B034760-70AA-425B-90B2-1AA38AB853A0}'; - RID_PedidosProveedor_Articulos_Pendientes = '{1F3E072E-DC0B-4112-8143-9D1A5B5308A0}'; + RID_PedidosProveedor = '{C73B03E3-5C63-486F-A7DC-BE04B7E6ADFD}'; + RID_PedidosProveedor_Detalles = '{667B33D5-3D6D-42CB-B3C3-9F457A096632}'; + RID_PedidosProveedor_Articulos_Pendientes = '{FB971448-F902-43CA-A8E5-9436043FBC5F}'; { Data table names } nme_PedidosProveedor = 'PedidosProveedor'; @@ -163,7 +163,7 @@ const type { IPedidosProveedor } IPedidosProveedor = interface(IDAStronglyTypedDataTable) - ['{D1C7924F-2580-4890-A79B-447004B53DFC}'] + ['{515217A3-BE4D-4E2F-B936-A2F9FC4B1D7A}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -702,7 +702,7 @@ type { IPedidosProveedor_Detalles } IPedidosProveedor_Detalles = interface(IDAStronglyTypedDataTable) - ['{1F888592-BF9F-45C1-ACD2-42737A0B014C}'] + ['{6B771F28-DF70-41D2-9948-515B7A48DAF3}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -917,7 +917,7 @@ type { IPedidosProveedor_Articulos_Pendientes } IPedidosProveedor_Articulos_Pendientes = interface(IDAStronglyTypedDataTable) - ['{186978BA-45ED-4A96-B7C2-FE934735D937}'] + ['{14A36B92-488C-4ADB-8611-B1411470FBF9}'] { Property getters and setters } function GetID_PEDIDOValue: Integer; procedure SetID_PEDIDOValue(const aValue: Integer); diff --git a/Source/Modulos/Pedidos a proveedor/Model/schPedidosProveedorServer_Intf.pas b/Source/Modulos/Pedidos a proveedor/Model/schPedidosProveedorServer_Intf.pas index b391b38..5b0ef46 100644 --- a/Source/Modulos/Pedidos a proveedor/Model/schPedidosProveedorServer_Intf.pas +++ b/Source/Modulos/Pedidos a proveedor/Model/schPedidosProveedorServer_Intf.pas @@ -9,14 +9,14 @@ const { Delta rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_PedidosProveedorDelta = '{DE5BDE2A-F485-42FF-A4F5-10C2257351A5}'; - RID_PedidosProveedor_DetallesDelta = '{F285279F-D471-4EBE-AEB2-820D2410DD07}'; - RID_PedidosProveedor_Articulos_PendientesDelta = '{2DE02310-A897-477C-8AE2-1ED5B72E0FC2}'; + RID_PedidosProveedorDelta = '{6C7C036D-2572-42F5-97DA-3E5D61AB9411}'; + RID_PedidosProveedor_DetallesDelta = '{D2DC8AD6-E572-4D22-83A4-B01887DC0D97}'; + RID_PedidosProveedor_Articulos_PendientesDelta = '{7C16369F-51C4-440D-823E-A228CFE5B7EF}'; type { IPedidosProveedorDelta } IPedidosProveedorDelta = interface(IPedidosProveedor) - ['{DE5BDE2A-F485-42FF-A4F5-10C2257351A5}'] + ['{6C7C036D-2572-42F5-97DA-3E5D61AB9411}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -556,7 +556,7 @@ type { IPedidosProveedor_DetallesDelta } IPedidosProveedor_DetallesDelta = interface(IPedidosProveedor_Detalles) - ['{F285279F-D471-4EBE-AEB2-820D2410DD07}'] + ['{D2DC8AD6-E572-4D22-83A4-B01887DC0D97}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_PEDIDOValue : Integer; @@ -770,7 +770,7 @@ type { IPedidosProveedor_Articulos_PendientesDelta } IPedidosProveedor_Articulos_PendientesDelta = interface(IPedidosProveedor_Articulos_Pendientes) - ['{2DE02310-A897-477C-8AE2-1ED5B72E0FC2}'] + ['{7C16369F-51C4-440D-823E-A228CFE5B7EF}'] { Property getters and setters } function GetOldID_PEDIDOValue : Integer; function GetOldREFERENCIAValue : String; diff --git a/Source/Modulos/Pedidos a proveedor/PedidosProveedor_Group.groupproj b/Source/Modulos/Pedidos a proveedor/PedidosProveedor_Group.groupproj index 743b8fc..e0de180 100644 --- a/Source/Modulos/Pedidos a proveedor/PedidosProveedor_Group.groupproj +++ b/Source/Modulos/Pedidos a proveedor/PedidosProveedor_Group.groupproj @@ -17,12 +17,17 @@ + + + + + @@ -251,14 +256,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + \ No newline at end of file diff --git a/Source/Modulos/Pedidos a proveedor/Servidor/srvPedidosProveedor_Impl.dfm b/Source/Modulos/Pedidos a proveedor/Servidor/srvPedidosProveedor_Impl.dfm index 54500f9..3205a3f 100644 --- a/Source/Modulos/Pedidos a proveedor/Servidor/srvPedidosProveedor_Impl.dfm +++ b/Source/Modulos/Pedidos a proveedor/Servidor/srvPedidosProveedor_Impl.dfm @@ -984,6 +984,12 @@ object srvPedidosProveedor: TsrvPedidosProveedor Name = 'ID_TIPO_IVA' DataType = datInteger Value = '' + end + item + Name = 'SITUACION' + DataType = datString + Size = 255 + Value = '' end> Statements = < item @@ -998,15 +1004,16 @@ object srvPedidosProveedor: TsrvPedidosProveedor ' TELEFONO, ID_CONTRATO_CLIENTE, IMPORTE_NETO, IMPORTE_PORTE,' + #10' DESCUENTO, IMPORTE_DESCUENTO, BASE_IMPONIBLE, IVA,'#10' IM' + 'PORTE_IVA, ID_FORMA_PAGO, ID_TIENDA, ID_VENDEDOR,'#10' ID_DIRECC' + - 'ION, ID_TIPO_IVA)'#10' VALUES'#10' (:ID, :ID_EMPRESA, CURRENT_TIMEST' + - 'AMP, :ID_PROVEEDOR,'#10' :USUARIO, :OBSERVACIONES, :REFERENCIA, ' + - ':FECHA_ENVIO,'#10' :FECHA_PEDIDO, :FECHA_CONFIRMACION, :FECHA_EN' + - 'TREGA, :INCIDENCIAS,'#10' :IMPORTE_TOTAL, :INCIDENCIAS_ACTIVAS, ' + - ':ID_ALMACEN, :CALLE,'#10' :POBLACION, :PROVINCIA, :CODIGO_POSTAL' + - ', :PERSONA_CONTACTO,'#10' :TELEFONO, :ID_CONTRATO_CLIENTE, :IMPO' + - 'RTE_NETO, :IMPORTE_PORTE,'#10' :DESCUENTO, :IMPORTE_DESCUENTO, :' + - 'BASE_IMPONIBLE, :IVA,'#10' :IMPORTE_IVA, :ID_FORMA_PAGO, :ID_TIE' + - 'NDA, :ID_VENDEDOR,'#10' :ID_DIRECCION, :ID_TIPO_IVA)'#10#10' '#10 + 'ION, ID_TIPO_IVA, SITUACION)'#10' VALUES'#10' (:ID, :ID_EMPRESA, CUR' + + 'RENT_TIMESTAMP, :ID_PROVEEDOR,'#10' :USUARIO, :OBSERVACIONES, :R' + + 'EFERENCIA, :FECHA_ENVIO,'#10' :FECHA_PEDIDO, :FECHA_CONFIRMACION' + + ', :FECHA_ENTREGA, :INCIDENCIAS,'#10' :IMPORTE_TOTAL, :INCIDENCIA' + + 'S_ACTIVAS, :ID_ALMACEN, :CALLE,'#10' :POBLACION, :PROVINCIA, :CO' + + 'DIGO_POSTAL, :PERSONA_CONTACTO,'#10' :TELEFONO, :ID_CONTRATO_CLI' + + 'ENTE, :IMPORTE_NETO, :IMPORTE_PORTE,'#10' :DESCUENTO, :IMPORTE_D' + + 'ESCUENTO, :BASE_IMPONIBLE, :IVA,'#10' :IMPORTE_IVA, :ID_FORMA_PA' + + 'GO, :ID_TIENDA, :ID_VENDEDOR,'#10' :ID_DIRECCION, :ID_TIPO_IVA, ' + + ':SITUACION)'#10#10' '#10 StatementType = stSQL ColumnMappings = <> end> @@ -1182,6 +1189,12 @@ object srvPedidosProveedor: TsrvPedidosProveedor DataType = datInteger Value = '' end + item + Name = 'SITUACION' + DataType = datString + Size = 255 + Value = '' + end item Name = 'OLD_ID' Value = '' @@ -1208,8 +1221,8 @@ object srvPedidosProveedor: TsrvPedidosProveedor ' BASE_IMPONIBLE = :BASE_IMPONIBLE,'#10' IVA = :IVA,'#10' IMPORTE_I' + 'VA = :IMPORTE_IVA,'#10' ID_FORMA_PAGO = :ID_FORMA_PAGO,'#10' ID_TI' + 'ENDA = :ID_TIENDA,'#10' ID_VENDEDOR = :ID_VENDEDOR,'#10' ID_DIRECC' + - 'ION = :ID_DIRECCION,'#10' ID_TIPO_IVA = :ID_TIPO_IVA'#10' WHERE'#10' ' + - '(ID = :OLD_ID)'#10#10#10 + 'ION = :ID_DIRECCION,'#10' ID_TIPO_IVA = :ID_TIPO_IVA,'#10' SITUACI' + + 'ON = :SITUACION'#10' WHERE'#10' (ID = :OLD_ID)'#10#10#10 StatementType = stSQL ColumnMappings = <> end> diff --git a/Source/Modulos/Pedidos a proveedor/Views/PedidosProveedor_view.dpk b/Source/Modulos/Pedidos a proveedor/Views/PedidosProveedor_view.dpk index 41bf4e8..99cd8d5 100644 Binary files a/Source/Modulos/Pedidos a proveedor/Views/PedidosProveedor_view.dpk and b/Source/Modulos/Pedidos a proveedor/Views/PedidosProveedor_view.dpk differ diff --git a/Source/Modulos/Pedidos a proveedor/Views/PedidosProveedor_view.dproj b/Source/Modulos/Pedidos a proveedor/Views/PedidosProveedor_view.dproj index 4629b99..9faa2ec 100644 --- a/Source/Modulos/Pedidos a proveedor/Views/PedidosProveedor_view.dproj +++ b/Source/Modulos/Pedidos a proveedor/Views/PedidosProveedor_view.dproj @@ -49,15 +49,27 @@ MainSource - - - - - - - - - + + + + + + + + + + + + + + + + + + + + +
fEditorDireccionEntregaPedidoProveedor
TfEditorDireccionEntregaPedidoProveedor @@ -70,6 +82,10 @@
fEditorElegirPedidosProveedor
TForm
+ +
fEditorElegirSituacionPedido
+ TfEditorSituacionPedidoProveedor +
fEditorPedidoProveedor
TfEditorPedidoProveedor @@ -107,6 +123,10 @@
frViewPedidosProveedor
TFrame
+ + + + diff --git a/Source/Modulos/Tipos de venta/Controller/View/uIEditorTiposVenta.pas b/Source/Modulos/Tipos de venta/Controller/View/uIEditorTiposVenta.pas deleted file mode 100644 index 9f1e4a7..0000000 --- a/Source/Modulos/Tipos de venta/Controller/View/uIEditorTiposVenta.pas +++ /dev/null @@ -1,21 +0,0 @@ -unit uIEditorTiposVenta; - -interface - -uses - uBizTiposVenta; - -type - IEditorTiposVenta = interface - ['{3B42923E-4BB6-4979-A5E0-0BF66CA289A4}'] - function GetTiposVenta: IBizTipoVenta; - procedure SetTiposVenta(const Value: IBizTipoVenta); - property TiposVenta: IBizTipoVenta read GetTiposVenta write SetTiposVenta; - function ShowModal : Integer; - procedure Release; - end; - - -implementation - -end. diff --git a/Source/Modulos/Tipos de venta/Controller/uTiposVentaController.pas b/Source/Modulos/Tipos de venta/Controller/uTiposVentaController.pas deleted file mode 100644 index 3aef6c2..0000000 --- a/Source/Modulos/Tipos de venta/Controller/uTiposVentaController.pas +++ /dev/null @@ -1,178 +0,0 @@ -unit uTiposVentaController; - -interface - - -uses - Classes, SysUtils, uDADataTable, uControllerBase, - uIDataModuleTiposVenta, uBizTiposVenta; - -type - ITiposVentaController = interface(IControllerBase) - ['{A5616174-3C9C-4EF3-8437-2C64E20137EB}'] - function BuscarTodos: IBizTipoVenta; - procedure VerTodos(ATiposVenta: IBizTipoVenta); - function Guardar(AReferencia : IBizTipoVenta): Boolean; - procedure DescartarCambios(AReferencia : IBizTipoVenta); - function DarListaTiposVenta: TStringList; - end; - - TTiposVentaController = class(TControllerBase, ITiposVentaController) - protected - FDataModule : IDataModuleTiposVenta; - -// procedure RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable); override; - function CreateEditor(const AName : String; const IID: TGUID; out Intf): Boolean; - - function ValidarReferencia(AReferencia: IBizTipoVenta): Boolean; - procedure AsignarDataModule; - - public - constructor Create; override; - destructor Destroy; override; - - function Guardar(AReferencia : IBizTipoVenta): Boolean; virtual; - procedure DescartarCambios(AReferencia : IBizTipoVenta); virtual; - function BuscarTodos: IBizTipoVenta; - procedure VerTodos(ATiposVenta: IBizTipoVenta); - function DarListaTiposVenta: TStringList; - end; - -implementation - -uses - cxControls, DB, uEditorRegistryUtils, schTiposVentaClient_Intf, - uIEditorTiposVenta, uDataModuleTiposVenta, - uDAInterfaces, uDataTableUtils, uDialogUtils, - uDateUtils, uROTypes, DateUtils, Controls, Windows; - -{ TTiposVentaController } - -procedure TTiposVentaController.AsignarDataModule; -begin - FDataModule := TDataModuleTiposVenta.Create(Nil); -end; - -function TTiposVentaController.BuscarTodos: IBizTipoVenta; -begin - Result := FDataModule.GetItems; -end; - -constructor TTiposVentaController.Create; -begin - inherited; - AsignarDataModule; -end; - -function TTiposVentaController.CreateEditor(const AName: String; const IID: TGUID; out Intf): Boolean; -begin - Result := Supports(EditorRegistry.CreateEditor(AName), IID, Intf); -end; - -function TTiposVentaController.DarListaTiposVenta: TStringList; -var - ATiposVenta: IBizTipoVenta; - i : integer; -begin - ATiposVenta := BuscarTodos; - ATiposVenta.DataTable.Active := True; - - Result := TStringList.Create; - try - with Result do - begin - Add(Format('%s=%d', [CTE_GENERAL, CTE_ID_GENERAL])); - - ATiposVenta.DataTable.First; - while not ATiposVenta.DataTable.EOF do - begin - Add(Format('%s=%d', [ATiposVenta.DESCRIPCION, ATiposVenta.ID])); - ATiposVenta.DataTable.Next; - end; - end; - finally - ATiposVenta := NIL; - end; -end; - -procedure TTiposVentaController.DescartarCambios(AReferencia: IBizTipoVenta); -begin - if not Assigned(AReferencia) then - raise Exception.Create ('Forma de pago no asignada'); - - ShowHourglassCursor; - try - if (AReferencia.State in dsEditModes) then - AReferencia.Cancel; - - AReferencia.DataTable.CancelUpdates; - finally - HideHourglassCursor; - end; -end; - -destructor TTiposVentaController.Destroy; -begin - FDataModule := NIL; - inherited; -end; - -function TTiposVentaController.ValidarReferencia(AReferencia: IBizTipoVenta): Boolean; -begin - Result := False; - - if not Assigned(AReferencia) then - raise Exception.Create ('Referencia no asignada'); - - if (AReferencia.DataTable.State in dsEditModes) then - AReferencia.DataTable.Post; - -// if Length(AReferencia.VALOR) = 0 then -// raise Exception.Create('Debe indicar un código para esta referencia.'); - - Result := True; -end; - -procedure TTiposVentaController.VerTodos(ATiposVenta: IBizTipoVenta); -var - AEditor : IEditorTiposVenta; -begin - AEditor := NIL; - - CreateEditor('EditorTiposVenta', IEditorTiposVenta, AEditor); - if Assigned(AEditor) then - try - AEditor.TiposVenta := ATiposVenta; - AEditor.ShowModal; - finally - AEditor.Release; - AEditor := NIL; - end; -end; -{ -procedure TTiposVentaController.RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable); -begin - inherited; -// -end; -} - -function TTiposVentaController.Guardar(AReferencia: IBizTipoVenta): Boolean; -var - NuevoID : Integer; -begin - Result := False; - - if ValidarReferencia(AReferencia) then - begin - ShowHourglassCursor; - try - AReferencia.DataTable.ApplyUpdates; - Result := True; - finally - HideHourglassCursor; - end; - end; -end; - -end. diff --git a/Source/Modulos/Tipos de venta/Data/TiposVenta_data.dpk b/Source/Modulos/Tipos de venta/Data/TiposVenta_data.dpk deleted file mode 100644 index c1e576a..0000000 Binary files a/Source/Modulos/Tipos de venta/Data/TiposVenta_data.dpk and /dev/null differ diff --git a/Source/Modulos/Tipos de venta/Data/TiposVenta_data.dproj b/Source/Modulos/Tipos de venta/Data/TiposVenta_data.dproj deleted file mode 100644 index c2333f7..0000000 --- a/Source/Modulos/Tipos de venta/Data/TiposVenta_data.dproj +++ /dev/null @@ -1,540 +0,0 @@ - - - - {c8118762-09b6-432f-ba26-058fa36c39d9} - TiposVenta_data.dpk - Debug - AnyCPU - DCC32 - ..\..\..\..\Output\Debug\Cliente\TiposVenta_data.bpl - - - 7.0 - False - False - 0 - .\ - .\ - .\ - ..\..\..\..\Output\Debug\Cliente - ..\..\Lib - ..\..\..\Lib;..\..\Lib - ..\..\..\Lib;..\..\Lib - ..\..\..\Lib;..\..\Lib - ..\..\..\Lib;..\..\Lib - RELEASE - - - 7.0 - .\ - .\ - .\ - ..\..\..\..\Output\Debug\Cliente - ..\..\Lib - ..\..\..\Lib;..\..\Lib - ..\..\..\Lib;..\..\Lib - ..\..\..\Lib;..\..\Lib - ..\..\..\Lib;..\..\Lib - - - Delphi.Personality - Package - -FalseTrueFalseFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0TiposVenta_data.dpk - - - - - MainSource - - - - - -
DataModuleTiposVenta
-
-
-
- diff --git a/Source/Modulos/Tipos de venta/Data/uDataModuleTiposVenta.dfm b/Source/Modulos/Tipos de venta/Data/uDataModuleTiposVenta.dfm deleted file mode 100644 index 363567b..0000000 --- a/Source/Modulos/Tipos de venta/Data/uDataModuleTiposVenta.dfm +++ /dev/null @@ -1,62 +0,0 @@ -inherited DataModuleTiposVenta: TDataModuleTiposVenta - OnCreate = DAClientDataModuleCreate - Height = 245 - Width = 455 - object RORemoteService: TRORemoteService - Message = dmConexion.ROMessage - Channel = dmConexion.ROChannel - ServiceName = 'srvTiposVenta' - Left = 48 - Top = 24 - end - object Bin2DataStreamer: TDABin2DataStreamer - Left = 48 - Top = 84 - end - object rda_TiposVenta: TDARemoteDataAdapter - GetSchemaCall.RemoteService = RORemoteService - GetDataCall.RemoteService = RORemoteService - UpdateDataCall.RemoteService = RORemoteService - GetScriptsCall.RemoteService = RORemoteService - RemoteService = RORemoteService - DataStreamer = Bin2DataStreamer - Left = 51 - Top = 151 - end - object tbl_TiposVenta: TDAMemDataTable - RemoteUpdatesOptions = [] - Fields = < - item - Name = 'ID' - DataType = datAutoInc - GeneratorName = 'GEN_TIPOS_VENTA_ID' - Required = True - InPrimaryKey = True - end - item - Name = 'DESCRIPCION' - DataType = datString - Size = 255 - end - item - Name = 'CODIGO_CONTABLE' - DataType = datString - Size = 2 - end> - Params = <> - StreamingOptions = [soDisableEventsWhileStreaming] - RemoteDataAdapter = rda_TiposVenta - DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] - MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] - LogicalName = 'TiposVenta' - IndexDefs = <> - Left = 200 - Top = 104 - end - object ds_TiposVenta: TDADataSource - DataSet = tbl_TiposVenta.Dataset - DataTable = tbl_TiposVenta - Left = 200 - Top = 48 - end -end diff --git a/Source/Modulos/Tipos de venta/Data/uDataModuleTiposVenta.pas b/Source/Modulos/Tipos de venta/Data/uDataModuleTiposVenta.pas deleted file mode 100644 index 81965f2..0000000 --- a/Source/Modulos/Tipos de venta/Data/uDataModuleTiposVenta.pas +++ /dev/null @@ -1,57 +0,0 @@ -unit uDataModuleTiposVenta; - -interface - -uses - SysUtils, Classes, DB, uDADataTable, uDABINAdapter, - uDAScriptingProvider, uDACDSDataTable, uROWinInetHttpChannel, uROTypes, - uRORemoteService, uROClient, uROBinMessage, - uDADesigntimeCall, uIDataModuleTiposVenta, uBizTiposVenta, uDataModuleBase, - uDARemoteDataAdapter, uDADataStreamer, uDABin2DataStreamer, uDAInterfaces, - uDAMemDataTable; - -type - TDataModuleTiposVenta = class(TDataModuleBase, IDataModuleTiposVenta) - RORemoteService: TRORemoteService; - Bin2DataStreamer: TDABin2DataStreamer; - rda_TiposVenta: TDARemoteDataAdapter; - tbl_TiposVenta: TDAMemDataTable; - ds_TiposVenta: TDADataSource; - procedure DAClientDataModuleCreate(Sender: TObject); - public - function GetItems: IBizTipoVenta; - end; - -implementation - -{$R *.DFM} - -uses - FactuGES_Intf, cxControls, uDataModuleConexion, uDataTableUtils, - schTiposVentaClient_Intf; - -{ TdmAlmacens } - -procedure TDataModuleTiposVenta.DAClientDataModuleCreate(Sender: TObject); -begin - RORemoteService.Channel := dmConexion.Channel; - RORemoteService.Message := dmConexion.Message; -end; - -function TDataModuleTiposVenta.GetItems: IBizTipoVenta; -var - AReferencia : TDAMemDataTable; -begin - ShowHourglassCursor; - try - AReferencia := CloneDataTable(tbl_TiposVenta); - AReferencia.BusinessRulesID := BIZ_CLIENT_TIPOSVENTA; - - Result := (AReferencia as IBizTipoVenta); - finally - HideHourglassCursor; - end; -end; - - -end. diff --git a/Source/Modulos/Tipos de venta/Model/Data/uIDataModuleTiposVenta.pas b/Source/Modulos/Tipos de venta/Model/Data/uIDataModuleTiposVenta.pas deleted file mode 100644 index da9d46d..0000000 --- a/Source/Modulos/Tipos de venta/Model/Data/uIDataModuleTiposVenta.pas +++ /dev/null @@ -1,16 +0,0 @@ -unit uIDataModuleTiposVenta; - -interface - -uses - uBizTiposVenta; - -type - IDataModuleTiposVenta = interface - ['{68E398CA-8942-45A9-ABD4-D881D464737B}'] - function GetItems: IBizTipoVenta; - end; - -implementation - -end. diff --git a/Source/Modulos/Tipos de venta/Model/TiposVenta_model.dpk b/Source/Modulos/Tipos de venta/Model/TiposVenta_model.dpk deleted file mode 100644 index 23f9c7c..0000000 Binary files a/Source/Modulos/Tipos de venta/Model/TiposVenta_model.dpk and /dev/null differ diff --git a/Source/Modulos/Tipos de venta/Model/TiposVenta_model.dproj b/Source/Modulos/Tipos de venta/Model/TiposVenta_model.dproj deleted file mode 100644 index 3bd31dc..0000000 --- a/Source/Modulos/Tipos de venta/Model/TiposVenta_model.dproj +++ /dev/null @@ -1,543 +0,0 @@ - - - - {73acd39c-b2f0-49b7-9acf-10945bbac8c1} - TiposVenta_model.dpk - Debug - AnyCPU - DCC32 - ..\..\..\..\Output\Debug\Cliente\TiposVenta_model.bpl - - - 7.0 - False - False - 0 - .\ - .\ - .\ - ..\..\..\..\Output\Debug\Cliente - ..\..\Lib - ..\..\..\Lib;..\..\Lib - ..\..\..\Lib;..\..\Lib - ..\..\..\Lib;..\..\Lib - ..\..\..\Lib;..\..\Lib - RELEASE - - - 7.0 - .\ - .\ - .\ - ..\..\..\..\Output\Debug\Cliente - ..\..\Lib - ..\..\..\Lib;..\..\Lib - ..\..\..\Lib;..\..\Lib - ..\..\..\Lib;..\..\Lib - ..\..\..\Lib;..\..\Lib - - - Delphi.Personality - Package - -FalseTrueFalseFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0TiposVenta_model.dpk - - - - - MainSource - - - - - - - - - - - - - diff --git a/Source/Modulos/Tipos de venta/Model/schTiposVentaClient_Intf.pas b/Source/Modulos/Tipos de venta/Model/schTiposVentaClient_Intf.pas deleted file mode 100644 index ced563d..0000000 --- a/Source/Modulos/Tipos de venta/Model/schTiposVentaClient_Intf.pas +++ /dev/null @@ -1,169 +0,0 @@ -unit schTiposVentaClient_Intf; - -interface - -uses - Classes, DB, schBase_Intf, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf; - -const - { Data table rules ids - Feel free to change them to something more human readable - but make sure they are unique in the context of your application } - RID_TiposVenta = '{DE49579B-AC5A-44C9-9C04-B59C78623378}'; - - { Data table names } - nme_TiposVenta = 'TiposVenta'; - - { TiposVenta fields } - fld_TiposVentaID = 'ID'; - fld_TiposVentaDESCRIPCION = 'DESCRIPCION'; - fld_TiposVentaCODIGO_CONTABLE = 'CODIGO_CONTABLE'; - - { TiposVenta field indexes } - idx_TiposVentaID = 0; - idx_TiposVentaDESCRIPCION = 1; - idx_TiposVentaCODIGO_CONTABLE = 2; - -type - { ITiposVenta } - ITiposVenta = interface(IDAStronglyTypedDataTable) - ['{AEA6CA6A-2A69-4A3A-B3FE-40D955421E16}'] - { Property getters and setters } - function GetIDValue: Integer; - procedure SetIDValue(const aValue: Integer); - function GetIDIsNull: Boolean; - procedure SetIDIsNull(const aValue: Boolean); - function GetDESCRIPCIONValue: String; - procedure SetDESCRIPCIONValue(const aValue: String); - function GetDESCRIPCIONIsNull: Boolean; - procedure SetDESCRIPCIONIsNull(const aValue: Boolean); - function GetCODIGO_CONTABLEValue: String; - procedure SetCODIGO_CONTABLEValue(const aValue: String); - function GetCODIGO_CONTABLEIsNull: Boolean; - procedure SetCODIGO_CONTABLEIsNull(const aValue: Boolean); - - - { Properties } - property ID: Integer read GetIDValue write SetIDValue; - property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull; - property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue; - property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull; - property CODIGO_CONTABLE: String read GetCODIGO_CONTABLEValue write SetCODIGO_CONTABLEValue; - property CODIGO_CONTABLEIsNull: Boolean read GetCODIGO_CONTABLEIsNull write SetCODIGO_CONTABLEIsNull; - end; - - { TTiposVentaDataTableRules } - TTiposVentaDataTableRules = class(TIntfObjectDADataTableRules, ITiposVenta) - private - protected - { Property getters and setters } - function GetIDValue: Integer; virtual; - procedure SetIDValue(const aValue: Integer); virtual; - function GetIDIsNull: Boolean; virtual; - procedure SetIDIsNull(const aValue: Boolean); virtual; - function GetDESCRIPCIONValue: String; virtual; - procedure SetDESCRIPCIONValue(const aValue: String); virtual; - function GetDESCRIPCIONIsNull: Boolean; virtual; - procedure SetDESCRIPCIONIsNull(const aValue: Boolean); virtual; - function GetCODIGO_CONTABLEValue: String; virtual; - procedure SetCODIGO_CONTABLEValue(const aValue: String); virtual; - function GetCODIGO_CONTABLEIsNull: Boolean; virtual; - procedure SetCODIGO_CONTABLEIsNull(const aValue: Boolean); virtual; - - { Properties } - property ID: Integer read GetIDValue write SetIDValue; - property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull; - property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue; - property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull; - property CODIGO_CONTABLE: String read GetCODIGO_CONTABLEValue write SetCODIGO_CONTABLEValue; - property CODIGO_CONTABLEIsNull: Boolean read GetCODIGO_CONTABLEIsNull write SetCODIGO_CONTABLEIsNull; - - public - constructor Create(aDataTable: TDADataTable); override; - destructor Destroy; override; - - end; - -implementation - -uses Variants, uROBinaryHelpers; - -{ TTiposVentaDataTableRules } -constructor TTiposVentaDataTableRules.Create(aDataTable: TDADataTable); -begin - inherited; -end; - -destructor TTiposVentaDataTableRules.Destroy; -begin - inherited; -end; - -function TTiposVentaDataTableRules.GetIDValue: Integer; -begin - result := DataTable.Fields[idx_TiposVentaID].AsInteger; -end; - -procedure TTiposVentaDataTableRules.SetIDValue(const aValue: Integer); -begin - DataTable.Fields[idx_TiposVentaID].AsInteger := aValue; -end; - -function TTiposVentaDataTableRules.GetIDIsNull: boolean; -begin - result := DataTable.Fields[idx_TiposVentaID].IsNull; -end; - -procedure TTiposVentaDataTableRules.SetIDIsNull(const aValue: Boolean); -begin - if aValue then - DataTable.Fields[idx_TiposVentaID].AsVariant := Null; -end; - -function TTiposVentaDataTableRules.GetDESCRIPCIONValue: String; -begin - result := DataTable.Fields[idx_TiposVentaDESCRIPCION].AsString; -end; - -procedure TTiposVentaDataTableRules.SetDESCRIPCIONValue(const aValue: String); -begin - DataTable.Fields[idx_TiposVentaDESCRIPCION].AsString := aValue; -end; - -function TTiposVentaDataTableRules.GetDESCRIPCIONIsNull: boolean; -begin - result := DataTable.Fields[idx_TiposVentaDESCRIPCION].IsNull; -end; - -procedure TTiposVentaDataTableRules.SetDESCRIPCIONIsNull(const aValue: Boolean); -begin - if aValue then - DataTable.Fields[idx_TiposVentaDESCRIPCION].AsVariant := Null; -end; - -function TTiposVentaDataTableRules.GetCODIGO_CONTABLEValue: String; -begin - result := DataTable.Fields[idx_TiposVentaCODIGO_CONTABLE].AsString; -end; - -procedure TTiposVentaDataTableRules.SetCODIGO_CONTABLEValue(const aValue: String); -begin - DataTable.Fields[idx_TiposVentaCODIGO_CONTABLE].AsString := aValue; -end; - -function TTiposVentaDataTableRules.GetCODIGO_CONTABLEIsNull: boolean; -begin - result := DataTable.Fields[idx_TiposVentaCODIGO_CONTABLE].IsNull; -end; - -procedure TTiposVentaDataTableRules.SetCODIGO_CONTABLEIsNull(const aValue: Boolean); -begin - if aValue then - DataTable.Fields[idx_TiposVentaCODIGO_CONTABLE].AsVariant := Null; -end; - - -initialization - RegisterDataTableRules(RID_TiposVenta, TTiposVentaDataTableRules); - -end. diff --git a/Source/Modulos/Tipos de venta/Model/schTiposVentaServer_Intf.pas b/Source/Modulos/Tipos de venta/Model/schTiposVentaServer_Intf.pas deleted file mode 100644 index dbeea38..0000000 --- a/Source/Modulos/Tipos de venta/Model/schTiposVentaServer_Intf.pas +++ /dev/null @@ -1,186 +0,0 @@ -unit schTiposVentaServer_Intf; - -interface - -uses - Classes, DB, SysUtils, uROClasses, uDADataTable, uDABusinessProcessor, FmtBCD, uROXMLIntf, schTiposVentaClient_Intf; - -const - { Delta rules ids - Feel free to change them to something more human readable - but make sure they are unique in the context of your application } - RID_TiposVentaDelta = '{EE4200D0-8534-4896-8C5F-B34391984BD1}'; - -type - { ITiposVentaDelta } - ITiposVentaDelta = interface(ITiposVenta) - ['{EE4200D0-8534-4896-8C5F-B34391984BD1}'] - { Property getters and setters } - function GetOldIDValue : Integer; - function GetOldDESCRIPCIONValue : String; - function GetOldCODIGO_CONTABLEValue : String; - - { Properties } - property OldID : Integer read GetOldIDValue; - property OldDESCRIPCION : String read GetOldDESCRIPCIONValue; - property OldCODIGO_CONTABLE : String read GetOldCODIGO_CONTABLEValue; - end; - - { TTiposVentaBusinessProcessorRules } - TTiposVentaBusinessProcessorRules = class(TDABusinessProcessorRules, ITiposVenta, ITiposVentaDelta) - private - protected - { Property getters and setters } - function GetIDValue: Integer; virtual; - function GetIDIsNull: Boolean; virtual; - function GetOldIDValue: Integer; virtual; - function GetOldIDIsNull: Boolean; virtual; - procedure SetIDValue(const aValue: Integer); virtual; - procedure SetIDIsNull(const aValue: Boolean); virtual; - function GetDESCRIPCIONValue: String; virtual; - function GetDESCRIPCIONIsNull: Boolean; virtual; - function GetOldDESCRIPCIONValue: String; virtual; - function GetOldDESCRIPCIONIsNull: Boolean; virtual; - procedure SetDESCRIPCIONValue(const aValue: String); virtual; - procedure SetDESCRIPCIONIsNull(const aValue: Boolean); virtual; - function GetCODIGO_CONTABLEValue: String; virtual; - function GetCODIGO_CONTABLEIsNull: Boolean; virtual; - function GetOldCODIGO_CONTABLEValue: String; virtual; - function GetOldCODIGO_CONTABLEIsNull: Boolean; virtual; - procedure SetCODIGO_CONTABLEValue(const aValue: String); virtual; - procedure SetCODIGO_CONTABLEIsNull(const aValue: Boolean); virtual; - - { Properties } - property ID : Integer read GetIDValue write SetIDValue; - property IDIsNull : Boolean read GetIDIsNull write SetIDIsNull; - property OldID : Integer read GetOldIDValue; - property OldIDIsNull : Boolean read GetOldIDIsNull; - property DESCRIPCION : String read GetDESCRIPCIONValue write SetDESCRIPCIONValue; - property DESCRIPCIONIsNull : Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull; - property OldDESCRIPCION : String read GetOldDESCRIPCIONValue; - property OldDESCRIPCIONIsNull : Boolean read GetOldDESCRIPCIONIsNull; - property CODIGO_CONTABLE : String read GetCODIGO_CONTABLEValue write SetCODIGO_CONTABLEValue; - property CODIGO_CONTABLEIsNull : Boolean read GetCODIGO_CONTABLEIsNull write SetCODIGO_CONTABLEIsNull; - property OldCODIGO_CONTABLE : String read GetOldCODIGO_CONTABLEValue; - property OldCODIGO_CONTABLEIsNull : Boolean read GetOldCODIGO_CONTABLEIsNull; - - public - constructor Create(aBusinessProcessor: TDABusinessProcessor); override; - destructor Destroy; override; - - end; - -implementation - -uses - Variants, uROBinaryHelpers, uDAInterfaces; - -{ TTiposVentaBusinessProcessorRules } -constructor TTiposVentaBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); -begin - inherited; -end; - -destructor TTiposVentaBusinessProcessorRules.Destroy; -begin - inherited; -end; - -function TTiposVentaBusinessProcessorRules.GetIDValue: Integer; -begin - result := BusinessProcessor.CurrentChange.NewValueByName[fld_TiposVentaID]; -end; - -function TTiposVentaBusinessProcessorRules.GetIDIsNull: Boolean; -begin - result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_TiposVentaID]); -end; - -function TTiposVentaBusinessProcessorRules.GetOldIDValue: Integer; -begin - result := BusinessProcessor.CurrentChange.OldValueByName[fld_TiposVentaID]; -end; - -function TTiposVentaBusinessProcessorRules.GetOldIDIsNull: Boolean; -begin - result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_TiposVentaID]); -end; - -procedure TTiposVentaBusinessProcessorRules.SetIDValue(const aValue: Integer); -begin - BusinessProcessor.CurrentChange.NewValueByName[fld_TiposVentaID] := aValue; -end; - -procedure TTiposVentaBusinessProcessorRules.SetIDIsNull(const aValue: Boolean); -begin - if aValue then - BusinessProcessor.CurrentChange.NewValueByName[fld_TiposVentaID] := Null; -end; - -function TTiposVentaBusinessProcessorRules.GetDESCRIPCIONValue: String; -begin - result := BusinessProcessor.CurrentChange.NewValueByName[fld_TiposVentaDESCRIPCION]; -end; - -function TTiposVentaBusinessProcessorRules.GetDESCRIPCIONIsNull: Boolean; -begin - result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_TiposVentaDESCRIPCION]); -end; - -function TTiposVentaBusinessProcessorRules.GetOldDESCRIPCIONValue: String; -begin - result := BusinessProcessor.CurrentChange.OldValueByName[fld_TiposVentaDESCRIPCION]; -end; - -function TTiposVentaBusinessProcessorRules.GetOldDESCRIPCIONIsNull: Boolean; -begin - result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_TiposVentaDESCRIPCION]); -end; - -procedure TTiposVentaBusinessProcessorRules.SetDESCRIPCIONValue(const aValue: String); -begin - BusinessProcessor.CurrentChange.NewValueByName[fld_TiposVentaDESCRIPCION] := aValue; -end; - -procedure TTiposVentaBusinessProcessorRules.SetDESCRIPCIONIsNull(const aValue: Boolean); -begin - if aValue then - BusinessProcessor.CurrentChange.NewValueByName[fld_TiposVentaDESCRIPCION] := Null; -end; - -function TTiposVentaBusinessProcessorRules.GetCODIGO_CONTABLEValue: String; -begin - result := BusinessProcessor.CurrentChange.NewValueByName[fld_TiposVentaCODIGO_CONTABLE]; -end; - -function TTiposVentaBusinessProcessorRules.GetCODIGO_CONTABLEIsNull: Boolean; -begin - result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_TiposVentaCODIGO_CONTABLE]); -end; - -function TTiposVentaBusinessProcessorRules.GetOldCODIGO_CONTABLEValue: String; -begin - result := BusinessProcessor.CurrentChange.OldValueByName[fld_TiposVentaCODIGO_CONTABLE]; -end; - -function TTiposVentaBusinessProcessorRules.GetOldCODIGO_CONTABLEIsNull: Boolean; -begin - result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_TiposVentaCODIGO_CONTABLE]); -end; - -procedure TTiposVentaBusinessProcessorRules.SetCODIGO_CONTABLEValue(const aValue: String); -begin - BusinessProcessor.CurrentChange.NewValueByName[fld_TiposVentaCODIGO_CONTABLE] := aValue; -end; - -procedure TTiposVentaBusinessProcessorRules.SetCODIGO_CONTABLEIsNull(const aValue: Boolean); -begin - if aValue then - BusinessProcessor.CurrentChange.NewValueByName[fld_TiposVentaCODIGO_CONTABLE] := Null; -end; - - -initialization - RegisterBusinessProcessorRules(RID_TiposVentaDelta, TTiposVentaBusinessProcessorRules); - -end. diff --git a/Source/Modulos/Tipos de venta/Model/uBizTiposVenta.pas b/Source/Modulos/Tipos de venta/Model/uBizTiposVenta.pas deleted file mode 100644 index 8962333..0000000 --- a/Source/Modulos/Tipos de venta/Model/uBizTiposVenta.pas +++ /dev/null @@ -1,32 +0,0 @@ -unit uBizTiposVenta; - -interface - -uses - uDAInterfaces, uDADataTable, schTiposVentaClient_Intf; - -const - BIZ_CLIENT_TIPOSVENTA = 'Client.TiposVenta'; - CTE_ID_GENERAL = 0; - CTE_GENERAL = 'General'; - - -type - IBizTipoVenta = interface(ITiposVenta) - ['{4A9D9B62-A67C-4390-B662-0CC2818C4895}'] - end; - - TBizTipoVenta = class(TTiposVentaDataTableRules, IBizTipoVenta) - end; - -implementation - -{ TBizTiposVenta } - -initialization - RegisterDataTableRules(BIZ_CLIENT_TIPOSVENTA, TBizTipoVenta); - -finalization - -end. - diff --git a/Source/Modulos/Tipos de venta/Plugin/TiposVenta_plugin.dpk b/Source/Modulos/Tipos de venta/Plugin/TiposVenta_plugin.dpk deleted file mode 100644 index 77da8be..0000000 Binary files a/Source/Modulos/Tipos de venta/Plugin/TiposVenta_plugin.dpk and /dev/null differ diff --git a/Source/Modulos/Tipos de venta/Plugin/TiposVenta_plugin.dproj b/Source/Modulos/Tipos de venta/Plugin/TiposVenta_plugin.dproj deleted file mode 100644 index 9290165..0000000 --- a/Source/Modulos/Tipos de venta/Plugin/TiposVenta_plugin.dproj +++ /dev/null @@ -1,540 +0,0 @@ - - - - {82e36812-58c4-491b-b463-6b951e95da51} - TiposVenta_plugin.dpk - Debug - AnyCPU - DCC32 - ..\..\..\..\Output\Debug\Cliente\TiposVenta_plugin.bpl - - - 7.0 - False - False - 0 - .\ - .\ - .\ - ..\..\..\..\Output\Debug\Cliente - ..\..\Lib - ..\..\..\Lib;..\..\Lib - ..\..\..\Lib;..\..\Lib - ..\..\..\Lib;..\..\Lib - ..\..\..\Lib;..\..\Lib - RELEASE - - - 7.0 - .\ - .\ - .\ - ..\..\..\..\Output\Debug\Cliente - ..\..\Lib - ..\..\..\Lib;..\..\Lib - ..\..\..\Lib;..\..\Lib - ..\..\..\Lib;..\..\Lib - ..\..\..\Lib;..\..\Lib - - - Delphi.Personality - Package - -FalseTrueFalseFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0TiposVenta_plugin.dpk - - - - - MainSource - - - - - -
PluginTiposVenta
-
-
-
- diff --git a/Source/Modulos/Tipos de venta/Plugin/uPluginTiposVenta.dfm b/Source/Modulos/Tipos de venta/Plugin/uPluginTiposVenta.dfm deleted file mode 100644 index c94c27c..0000000 --- a/Source/Modulos/Tipos de venta/Plugin/uPluginTiposVenta.dfm +++ /dev/null @@ -1,83 +0,0 @@ -object PluginTiposVenta: TPluginTiposVenta - OldCreateOrder = True - DefaultAction = actTiposVenta - Description = 'Tipos de venta' - ModuleMenu = MainMenu - ModuleName = 'TiposVenta' - SmallImages = SmallImages - LargeImages = SmallImages - Author = 'Rodax Software' - Version = '1.0.0' - Height = 252 - Width = 401 - object LargeImages: TPngImageList - Height = 24 - Width = 24 - PngImages = <> - Left = 232 - Top = 16 - end - object ModuleActionList: TActionList - Images = SmallImages - Left = 40 - Top = 72 - object actTiposVenta: TAction - Category = 'TiposVenta' - Caption = 'Tipos de venta' - ImageIndex = 0 - OnExecute = actTiposVentaExecute - end - end - object MainMenu: TMainMenu - Images = SmallImages - Left = 32 - Top = 16 - object TiposVenta: TMenuItem - Caption = 'Empresa' - SubMenuImages = SmallImages - object N1: TMenuItem - Tag = 18990 - Caption = '-' - end - object TiposVenta1: TMenuItem - Tag = 19001 - Action = actTiposVenta - SubMenuImages = SmallImages - end - end - end - object SmallImages: TPngImageList - PngImages = < - item - PngImage.Data = { - 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF - 61000001A34944415478DA9D922177E3300CC7655636C3B20596CD702C86C7E6 - B141C342EF1BE42318167AECD81916BA6CD0638582852A0BCBA46CCDDAF46E77 - EFF4E2A7D8F2FF2759B6724FD9354BF30B09810EF5B16C43866FACAC7DA67DD5 - E364655A15020ECEDD42AD47C839EE4AE9EC5CE492EBB2CF9DFC676BCA83772D - 6C133CEFE14D395F066B0C032AA4346AD5B9905D20C49BD255350196D4BEF40D - C48A47657F44073D05CEDC9AFBF0585F63B61D1379AF7BF2B702C67D8509B0F6 - 4329E52D1DE8CE2CF557B6B93144CAF13C04767702CCED62B12433587FB99141 - 4E1C03C2B70011B72EC02E479843CEAD6E60D04BEED9C1825B47A54E6273CF15 - F73CE9095226D00B891000FB66C1733E2F71CCACCC08EA36043165755141D334 - 2CE6EEAFE429F0552F3468CD5E370CE05842F04E4FE2DFF6A05979CE04633524 - 15F08707024484E0F9EA36C880ACAE7A70DE87931D7B0190BCD0B1326F11E256 - 20FF0098C454D92324167A5320163B95FF47C0518EC02219F4E9D3AB01C780F4 - 3780910A46D167763E3FF508B95A59BA105F037E76038EC28FE6C9B58DCDEC3F - E273F115E07FEC1D6B02010E884AA1F00000000049454E44AE426082} - Name = 'PngImage0' - Background = clWindow - end> - PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled] - Left = 308 - Top = 16 - Bitmap = {} - end - object ExtraImages: TPngImageList - Height = 28 - Width = 28 - PngImages = <> - Left = 232 - Top = 80 - end -end diff --git a/Source/Modulos/Tipos de venta/Plugin/uPluginTiposVenta.pas b/Source/Modulos/Tipos de venta/Plugin/uPluginTiposVenta.pas deleted file mode 100644 index 1799d8e..0000000 --- a/Source/Modulos/Tipos de venta/Plugin/uPluginTiposVenta.pas +++ /dev/null @@ -1,74 +0,0 @@ -unit uPluginTiposVenta; - -interface - -uses - uModuleController, uInterfaces, uHostManager, Menus, Classes, ActnList, - ImgList, Controls, PngImageList; - -type - IMCTiposVenta = interface(IInterface) - ['{FCFD32A3-68B9-4A15-B458-EB8B27324D22}'] - end; - - TPluginTiposVenta = class(TModuleController, IMCTiposVenta) - actTiposVenta: TAction; - ExtraImages: TPngImageList; - LargeImages: TPngImageList; - MainMenu: TMainMenu; - ModuleActionList: TActionList; - SmallImages: TPngImageList; - TiposVenta: TMenuItem; - TiposVenta1: TMenuItem; - N1: TMenuItem; - procedure actTiposVentaExecute(Sender: TObject); - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - end; - -implementation - -{$R *.dfm} - -uses - Forms, Dialogs, SysUtils, - uTiposVentaController, uBizTiposVenta, uTiposVentaViewRegister; - -function GetModule : TModuleController; -begin - Result := TPluginTiposVenta.Create(NIL); -end; - -exports - GetModule name GET_MODULE_FUNC; - -procedure TPluginTiposVenta.actTiposVentaExecute(Sender: TObject); -var - ATiposVentaController : ITiposVentaController; - ATiposVenta : IBizTipoVenta; -begin - ATiposVentaController := TTiposVentaController.Create; - ATiposVenta := (ATiposVentaController.BuscarTodos as IBizTipoVenta); - ATiposVentaController.VerTodos(ATiposVenta); -end; - -constructor TPluginTiposVenta.Create(AOwner: TComponent); -begin - inherited; - uTiposVentaViewRegister.RegisterViews; -end; - -destructor TPluginTiposVenta.Destroy; -begin - uTiposVentaViewRegister.UnregisterViews; - inherited; -end; - -initialization - RegisterModuleClass(TPluginTiposVenta); - -finalization - UnRegisterModuleClass(TPluginTiposVenta); - -end. diff --git a/Source/Modulos/Tipos de venta/Servidor/srvTiposVenta_Impl.dfm b/Source/Modulos/Tipos de venta/Servidor/srvTiposVenta_Impl.dfm deleted file mode 100644 index 697c2de..0000000 --- a/Source/Modulos/Tipos de venta/Servidor/srvTiposVenta_Impl.dfm +++ /dev/null @@ -1,71 +0,0 @@ -object srvTiposVenta: TsrvTiposVenta - OldCreateOrder = True - OnCreate = DataAbstractServiceCreate - SessionManager = dmServer.SessionManager - ServiceSchema = schTiposVenta - ServiceDataStreamer = Bin2DataStreamer - ExportedDataTables = <> - BeforeAcquireConnection = DataAbstractServiceBeforeAcquireConnection - Height = 300 - Width = 300 - object schTiposVenta: TDASchema - ConnectionManager = dmServer.ConnectionManager - Datasets = < - item - Params = <> - Statements = < - item - Connection = 'IBX' - ConnectionType = 'Interbase' - Default = True - TargetTable = 'TIPOS_VENTA' - Name = 'IBX' - StatementType = stAutoSQL - ColumnMappings = < - item - DatasetField = 'ID' - TableField = 'ID' - end - item - DatasetField = 'DESCRIPCION' - TableField = 'DESCRIPCION' - end - item - DatasetField = 'CODIGO_CONTABLE' - TableField = 'CODIGO_CONTABLE' - end> - end> - Name = 'TiposVenta' - Fields = < - item - Name = 'ID' - DataType = datAutoInc - GeneratorName = 'GEN_TIPOS_VENTA_ID' - Required = True - InPrimaryKey = True - end - item - Name = 'DESCRIPCION' - DataType = datString - Size = 255 - end - item - Name = 'CODIGO_CONTABLE' - DataType = datString - Size = 2 - end> - end> - JoinDataTables = <> - UnionDataTables = <> - Commands = <> - RelationShips = <> - UpdateRules = <> - Version = 0 - Left = 40 - Top = 24 - end - object Bin2DataStreamer: TDABin2DataStreamer - Left = 40 - Top = 88 - end -end diff --git a/Source/Modulos/Tipos de venta/Servidor/srvTiposVenta_Impl.pas b/Source/Modulos/Tipos de venta/Servidor/srvTiposVenta_Impl.pas deleted file mode 100644 index 71d4172..0000000 --- a/Source/Modulos/Tipos de venta/Servidor/srvTiposVenta_Impl.pas +++ /dev/null @@ -1,60 +0,0 @@ -unit srvTiposVenta_Impl; - -{----------------------------------------------------------------------------} -{ This unit was automatically generated by the RemObjects SDK after reading } -{ the RODL file associated with this project . } -{ } -{ This is where you are supposed to code the implementation of your objects. } -{----------------------------------------------------------------------------} - -{$I Remobjects.inc} - -interface - -uses - {vcl:} Classes, SysUtils, - {RemObjects:} uROXMLIntf, uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions, - {Ancestor Implementation:} DataAbstractService_Impl, - {Used RODLs:} DataAbstract4_Intf, - {Generated:} FactuGES_Intf, uDADataStreamer, uDABin2DataStreamer, uDAClasses, uDAInterfaces; - -type - { TsrvTiposVenta } - TsrvTiposVenta = class(TDataAbstractService, IsrvTiposVenta) - Bin2DataStreamer: TDABin2DataStreamer; - schTiposVenta: TDASchema; - procedure DataAbstractServiceBeforeAcquireConnection(aSender: TObject; var aConnectionName: string); - procedure DataAbstractServiceCreate(Sender: TObject); - end; - -implementation - -{$R *.dfm} -uses - {Generated:} FactuGES_Invk, Variants, - uDataModuleServer, uROClasses; - -procedure Create_srvTiposVenta(out anInstance : IUnknown); -begin - anInstance := TsrvTiposVenta.Create(nil); -end; - -{ srvTiposVenta } - -procedure TsrvTiposVenta.DataAbstractServiceBeforeAcquireConnection(aSender: TObject; var aConnectionName: string); -begin - ConnectionName := dmServer.ConnectionName; -end; - -procedure TsrvTiposVenta.DataAbstractServiceCreate(Sender: TObject); -begin - //SessionManager := dmServer.SessionManager; -end; - - -initialization - TROClassFactory.Create('srvTiposVenta', Create_srvTiposVenta, TsrvTiposVenta_Invoker); - -finalization - -end. diff --git a/Source/Modulos/Tipos de venta/TiposVenta_Group.groupproj b/Source/Modulos/Tipos de venta/TiposVenta_Group.groupproj deleted file mode 100644 index a1f76c3..0000000 --- a/Source/Modulos/Tipos de venta/TiposVenta_Group.groupproj +++ /dev/null @@ -1,124 +0,0 @@ - - - {6fa7160e-0b4c-4f7c-9c55-08938cd225c4} - - - - - - - - - - - - - - - - Default.Personality - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Source/Modulos/Tipos de venta/Views/TiposVenta_view.dpk b/Source/Modulos/Tipos de venta/Views/TiposVenta_view.dpk deleted file mode 100644 index e29efed..0000000 Binary files a/Source/Modulos/Tipos de venta/Views/TiposVenta_view.dpk and /dev/null differ diff --git a/Source/Modulos/Tipos de venta/Views/TiposVenta_view.dproj b/Source/Modulos/Tipos de venta/Views/TiposVenta_view.dproj deleted file mode 100644 index 6adcdb3..0000000 --- a/Source/Modulos/Tipos de venta/Views/TiposVenta_view.dproj +++ /dev/null @@ -1,562 +0,0 @@ - - - - {e3d36a6f-7004-4c89-9f3d-f2d77e386d1b} - TiposVenta_view.dpk - Debug - AnyCPU - DCC32 - ..\..\..\..\Output\Debug\Cliente\TiposVenta_view.bpl - - - 7.0 - False - False - 0 - .\ - .\ - .\ - ..\..\..\..\Output\Debug\Cliente - ..\..\Lib - ..\..\..\Lib;..\..\Lib - ..\..\..\Lib;..\..\Lib - ..\..\..\Lib;..\..\Lib - ..\..\..\Lib;..\..\Lib - RELEASE - - - 7.0 - .\ - .\ - .\ - ..\..\..\..\Output\Debug\Cliente - ..\..\Lib - ..\..\..\Lib;..\..\Lib - ..\..\..\Lib;..\..\Lib - ..\..\..\Lib;..\..\Lib - ..\..\..\Lib;..\..\Lib - - - Delphi.Personality - Package - -FalseTrueFalseFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0TiposVenta_view.dpk - - - - - MainSource - - - - - - - - - - - - - - - - - - - - - -
fEditorTiposVenta
- TfEditorFormasPago -
- - -
frViewTiposVenta
- TFrame -
-
-
- diff --git a/Source/Modulos/Tipos de venta/Views/uEditorTiposVenta.dfm b/Source/Modulos/Tipos de venta/Views/uEditorTiposVenta.dfm deleted file mode 100644 index 7ec436e..0000000 --- a/Source/Modulos/Tipos de venta/Views/uEditorTiposVenta.dfm +++ /dev/null @@ -1,148 +0,0 @@ -object fEditorTiposVenta: TfEditorTiposVenta - Left = 453 - Top = 234 - BorderIcons = [biSystemMenu] - BorderStyle = bsSingle - Caption = 'Lista de referencias' - ClientHeight = 406 - ClientWidth = 466 - Color = clBtnFace - ParentFont = True - OldCreateOrder = False - Position = poScreenCenter - OnCloseQuery = FormCloseQuery - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - object bAceptar: TButton - Left = 297 - Top = 373 - Width = 75 - Height = 23 - Action = actAceptar - Default = True - TabOrder = 1 - end - object bCancelar: TButton - Left = 382 - Top = 373 - Width = 75 - Height = 23 - Action = actCancelar - Cancel = True - TabOrder = 2 - end - object PageControl1: TPageControl - Left = 8 - Top = 8 - Width = 450 - Height = 356 - ActivePage = TabSheet1 - TabOrder = 0 - object TabSheet1: TTabSheet - Caption = 'Referencias' - object Label1: TLabel - Left = 6 - Top = 12 - Width = 149 - Height = 13 - Caption = 'Lista de referencias disponibles' - end - object ListaTiposVenta: TcxGrid - Left = 0 - Top = 0 - Width = 442 - Height = 328 - Align = alClient - TabOrder = 0 - LookAndFeel.Kind = lfOffice11 - LookAndFeel.NativeStyle = True - object ListaTiposVentaView: TcxGridDBTableView - NavigatorButtons.ConfirmDelete = False - FilterBox.Visible = fvNever - DataController.DataSource = dsTiposVenta - DataController.Filter.Options = [fcoCaseInsensitive] - DataController.KeyFieldNames = 'ID' - DataController.Options = [dcoAnsiSort, dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoFocusTopRowAfterSorting, dcoImmediatePost] - DataController.Summary.DefaultGroupSummaryItems = <> - DataController.Summary.FooterSummaryItems = <> - DataController.Summary.SummaryGroups = <> - OptionsBehavior.AlwaysShowEditor = True - OptionsBehavior.CellHints = True - OptionsBehavior.FocusCellOnTab = True - OptionsBehavior.GoToNextCellOnEnter = True - OptionsBehavior.BestFitMaxRecordCount = 20 - OptionsBehavior.FocusCellOnCycle = True - OptionsCustomize.ColumnFiltering = False - OptionsCustomize.ColumnGrouping = False - OptionsCustomize.ColumnMoving = False - OptionsCustomize.ColumnSorting = False - OptionsCustomize.DataRowSizing = True - OptionsData.CancelOnExit = False - OptionsData.Deleting = False - OptionsData.DeletingConfirmation = False - OptionsData.Inserting = False - OptionsSelection.UnselectFocusedRecordOnExit = False - OptionsView.CellEndEllipsis = True - OptionsView.CellAutoHeight = True - OptionsView.ColumnAutoWidth = True - OptionsView.GridLineColor = cl3DLight - OptionsView.GroupByBox = False - OptionsView.HeaderEndEllipsis = True - OptionsView.Indicator = True - object ListaTiposVentaViewID: TcxGridDBColumn - DataBinding.FieldName = 'ID' - Visible = False - VisibleForCustomization = False - end - object ListaTiposVentaViewDESCRIPCION: TcxGridDBColumn - Caption = 'Tipo de venta' - DataBinding.FieldName = 'DESCRIPCION' - PropertiesClassName = 'TcxTextEditProperties' - Properties.ReadOnly = True - Options.Editing = False - Options.Focusing = False - SortIndex = 0 - SortOrder = soAscending - Width = 287 - end - object ListaTiposVentaViewCODIGO: TcxGridDBColumn - Caption = 'C'#243'digo contable' - DataBinding.FieldName = 'CODIGO_CONTABLE' - PropertiesClassName = 'TcxSpinEditProperties' - Properties.Alignment.Horz = taRightJustify - Properties.ImmediatePost = True - Properties.SpinButtons.Visible = False - GroupSummaryAlignment = taRightJustify - HeaderAlignmentHorz = taRightJustify - HeaderGlyphAlignmentHorz = taRightJustify - Width = 141 - end - end - object ListaTiposVentaLevel: TcxGridLevel - GridView = ListaTiposVentaView - end - end - end - end - object ActionList1: TActionList - Left = 144 - Top = 16 - object actAceptar: TAction - Caption = 'A&ceptar' - OnExecute = actAceptarExecute - end - object actCancelar: TAction - Caption = '&Cancelar' - OnExecute = actCancelarExecute - end - object actCerrar: TAction - Caption = 'actCerrar' - OnExecute = actCerrarExecute - end - end - object dsTiposVenta: TDADataSource - Left = 168 - Top = 16 - end -end diff --git a/Source/Modulos/Tipos de venta/Views/uEditorTiposVenta.pas b/Source/Modulos/Tipos de venta/Views/uEditorTiposVenta.pas deleted file mode 100644 index 7f350df..0000000 --- a/Source/Modulos/Tipos de venta/Views/uEditorTiposVenta.pas +++ /dev/null @@ -1,173 +0,0 @@ -{ -=============================================================================== - Copyright (©) 2006. Rodax Software. -=============================================================================== - Los contenidos de este fichero son propiedad de Rodax Software titular del - copyright. Este fichero sólo podrá ser copiado, distribuido y utilizado, - en su totalidad o en parte, con el permiso escrito de Rodax Software, o de - acuerdo con los términos y condiciones establecidas en el acuerdo/contrato - bajo el que se suministra. - ----------------------------------------------------------------------------- - Web: www.rodax-software.com -=============================================================================== - Fecha primera versión: 22-05-2006 - Versión actual: 1.0.0 - Fecha versión actual: 22-05-2006 -=============================================================================== - Modificaciones: - - Fecha Comentarios - --------------------------------------------------------------------------- -=============================================================================== -} - -unit uEditorTiposVenta; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - uIEditorTiposVenta, uBizTiposVenta, uTiposVentaController, DB, uDADataTable, - ActnList, Grids, DBGrids, StdCtrls, ComCtrls, cxStyles, cxCustomData, - cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, cxGridLevel, - cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses, - cxControls, cxGridCustomView, cxGrid, cxTextEdit, uDAInterfaces, cxSpinEdit; - -type - TfEditorTiposVenta = class(TForm, IEditorTiposVenta) - ActionList1: TActionList; - dsTiposVenta: TDADataSource; - actAceptar: TAction; - actCancelar: TAction; - bAceptar: TButton; - bCancelar: TButton; - actCerrar: TAction; - PageControl1: TPageControl; - TabSheet1: TTabSheet; - Label1: TLabel; - ListaTiposVenta: TcxGrid; - ListaTiposVentaView: TcxGridDBTableView; - ListaTiposVentaViewCODIGO: TcxGridDBColumn; - ListaTiposVentaViewDESCRIPCION: TcxGridDBColumn; - ListaTiposVentaLevel: TcxGridLevel; - ListaTiposVentaViewID: TcxGridDBColumn; - procedure FormShow(Sender: TObject); - - procedure actAceptarExecute(Sender: TObject); - procedure actCancelarExecute(Sender: TObject); - procedure actCerrarExecute(Sender: TObject); - procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); - procedure ListaTiposVentaViewVALORPropertiesValidate(Sender: TObject; - var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean); - - protected - FTiposVenta: IBizTipoVenta; - FController: ITiposVentaController; - function GetTiposVenta: IBizTipoVenta; - procedure SetTiposVenta(const Value: IBizTipoVenta); - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - property TiposVenta: IBizTipoVenta read GetTiposVenta write SetTiposVenta; - end; - - -implementation -{$R *.dfm} - -{ TfEditorTiposVenta } - -uses - uDialogUtils, Dialogs, uDataTableUtils; - -function TfEditorTiposVenta.GetTiposVenta: IBizTipoVenta; -begin - Result := FTiposVenta; -end; - -procedure TfEditorTiposVenta.ListaTiposVentaViewVALORPropertiesValidate( - Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; - var Error: Boolean); -begin -// Showmessage('Validar'); No es necesario porque si no pone número lo pone el servidor -end; - -procedure TfEditorTiposVenta.SetTiposVenta(const Value: IBizTipoVenta); -begin - FTiposVenta := Value; - dsTiposVenta.DataTable := FTiposVenta.DataTable; - dsTiposVenta.DataTable.Open; -end; - -constructor TfEditorTiposVenta.Create(AOwner: TComponent); -begin - inherited; - FController := TTiposVentaController.Create; -end; - -destructor TfEditorTiposVenta.Destroy; -begin - FTiposVenta := NIL; - FController := NIL; - inherited; -end; - -procedure TfEditorTiposVenta.actAceptarExecute(Sender: TObject); -begin - try - if (TiposVenta.DataTable.State in dsEditModes) then - TiposVenta.DataTable.Post; - TiposVenta.DataTable.ApplyUpdates; - except - on E : Exception do begin - TiposVenta.DataTable.CancelUpdates; - ShowErrorMessage('Error al guardar cambios', 'Se ha producido un error grave', E); - Exit; - end; - end; - actCerrar.Execute; -end; - -procedure TfEditorTiposVenta.actCancelarExecute(Sender: TObject); -begin - TiposVenta.DataTable.CancelUpdates; - actCerrar.Execute; -end; - -procedure TfEditorTiposVenta.actCerrarExecute(Sender: TObject); -begin - Close; -end; - -procedure TfEditorTiposVenta.FormCloseQuery(Sender: TObject; var CanClose: Boolean); -var - Respuesta: Integer; -begin - Respuesta := IDNO; - - if (DataTableModified(dsTiposVenta.DataTable)) then - Respuesta := ShowConfirmMessage('Atención', 'Se han producido cambios', - '¿Desea guardar los cambios que se han producido antes de cerrar?', - [TDlgButton_SI, TDlgButton_NO, TDlgButton_CANCELAR]); - - case Respuesta of - IDYES : actAceptar.Execute; - IDNO : actCancelar.Execute; - else CanClose := False; - end; -end; - -procedure TfEditorTiposVenta.FormShow(Sender: TObject); -begin - if not FTiposVenta.DataTable.Active then - FTiposVenta.DataTable.Active := true; - - ListaTiposVenta.SetFocus; -{ - EnableScrollBar(ListaTiposVenta.Handle,SB_HORZ,ESB_DISABLE_BOTH); - ShowScrollBar(ListaTiposVenta.Handle,SB_HORZ,false); - EnableScrollBar(ListaTiposVenta.Handle,SB_VERT,ESB_DISABLE_BOTH); -} -end; - -end. diff --git a/Source/Modulos/Tipos de venta/Views/uTiposVentaViewRegister.pas b/Source/Modulos/Tipos de venta/Views/uTiposVentaViewRegister.pas deleted file mode 100644 index 374324a..0000000 --- a/Source/Modulos/Tipos de venta/Views/uTiposVentaViewRegister.pas +++ /dev/null @@ -1,23 +0,0 @@ -unit uTiposVentaViewRegister; - -interface - -procedure RegisterViews; -procedure UnregisterViews; - -implementation - -uses - uEditorRegistryUtils, uEditorTiposVenta; - -procedure RegisterViews; -begin - EditorRegistry.RegisterClass(TfEditorTiposVenta, 'EditorTiposVenta'); -end; - -procedure UnregisterViews; -begin - EditorRegistry.UnRegisterClass(TfEditorTiposVenta); -end; - -end. diff --git a/Source/Modulos/Tipos de venta/Views/uViewTiposVenta.dfm b/Source/Modulos/Tipos de venta/Views/uViewTiposVenta.dfm deleted file mode 100644 index 18419ac..0000000 --- a/Source/Modulos/Tipos de venta/Views/uViewTiposVenta.dfm +++ /dev/null @@ -1,58 +0,0 @@ -inherited frViewTiposVenta: TfrViewTiposVenta - Width = 451 - Height = 41 - OnCreate = CustomViewCreate - OnDestroy = CustomViewDestroy - ExplicitWidth = 451 - ExplicitHeight = 41 - object dxLayoutControl1: TdxLayoutControl - Left = 0 - Top = 0 - Width = 451 - Height = 41 - Margins.Left = 0 - Margins.Top = 0 - Margins.Right = 0 - Margins.Bottom = 0 - Align = alTop - ParentBackground = True - TabOrder = 0 - AutoContentSizes = [acsWidth, acsHeight] - DesignSize = ( - 451 - 41) - object cbTiposVenta: TcxComboBox - Left = 85 - Top = 10 - Anchors = [akLeft, akTop, akRight] - Properties.DropDownListStyle = lsFixedList - Properties.ImmediatePost = True - Properties.OnValidate = cbTiposVentaPropertiesValidate - Style.BorderColor = clWindowFrame - Style.BorderStyle = ebs3D - Style.HotTrack = False - Style.LookAndFeel.Kind = lfStandard - Style.LookAndFeel.NativeStyle = True - Style.ButtonStyle = bts3D - Style.PopupBorderStyle = epbsFrame3D - StyleDisabled.LookAndFeel.Kind = lfStandard - StyleDisabled.LookAndFeel.NativeStyle = True - StyleFocused.LookAndFeel.Kind = lfStandard - StyleFocused.LookAndFeel.NativeStyle = True - StyleHot.LookAndFeel.Kind = lfStandard - StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 0 - Width = 376 - end - object dxLayoutControl1Group_Root: TdxLayoutGroup - ShowCaption = False - Hidden = True - ShowBorder = False - object dxLayoutControl1Item1: TdxLayoutItem - Caption = 'Tipo de venta:' - Control = cbTiposVenta - ControlOptions.ShowBorder = False - end - end - end -end diff --git a/Source/Modulos/Tipos de venta/Views/uViewTiposVenta.pas b/Source/Modulos/Tipos de venta/Views/uViewTiposVenta.pas deleted file mode 100644 index d29761a..0000000 --- a/Source/Modulos/Tipos de venta/Views/uViewTiposVenta.pas +++ /dev/null @@ -1,137 +0,0 @@ -unit uViewTiposVenta; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, uViewBase, ExtCtrls, StdCtrls, DB, uDADataTable, cxGraphics, - dxLayoutControl, cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxDropDownEdit, - cxControls, uTiposVentaController; - -type - IViewTiposVenta = interface(IViewBase) - ['{B9371DA3-A682-4062-9BBE-EA688B9EACD5}'] - end; - - TfrViewTiposVenta = class(TfrViewBase, IViewTiposVenta) - cbTiposVenta: TcxComboBox; - dxLayoutControl1Group_Root: TdxLayoutGroup; - dxLayoutControl1: TdxLayoutControl; - dxLayoutControl1Item1: TdxLayoutItem; - procedure CustomViewCreate(Sender: TObject); - procedure CustomViewDestroy(Sender: TObject); - procedure cbTiposVentaPropertiesValidate(Sender: TObject; - var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean); - private - FController : ITiposVentaController; - FDataItem : TDADataTable; - FListaTiposVenta : TStringList; - function GetDataItem: TDADataTable; - procedure SetDataItem(const Value: TDADataTable); - public - property DataItem : TDADataTable read GetDataItem write SetDataItem; - procedure ElegirTiposVenta(const AIDTiposVenta : Integer); - function getIDTipoVenta: Integer; - procedure SetIDTipoVenta(const ID: Integer); - - end; - - -implementation -{$R *.dfm} - - -procedure TfrViewTiposVenta.cbTiposVentaPropertiesValidate(Sender: TObject; - var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean); -var - AIndex : integer; -begin - inherited; - - if Assigned(FDataItem) and FDataItem.Active then - begin - AIndex := StrToInt(FListaTiposVenta.Values[DisplayValue]); - - FDataItem.Edit; - if Assigned(FDataItem.FindField('ID_TIPOVENTA')) then - FDataItem.FieldByName('ID_TIPOVENTA').AsInteger := AIndex; - - if Assigned(FDataItem.FindField('TIPOVENTA')) then - FDataItem.FieldByName('TIPOVENTA').AsString := DisplayValue; - end; - -end; - -procedure TfrViewTiposVenta.CustomViewCreate(Sender: TObject); -var - i : integer; -begin - inherited; - FController := TTiposVentaController.create; - with FController do - begin - FListaTiposVenta := DarListaTiposVenta; - with cbTiposVenta.Properties.Items do - begin - BeginUpdate; - try - Clear; - for i := 0 to FListaTiposVenta.Count - 1 do - Add(FListaTiposVenta.Names[i]); - finally - EndUpdate; - end; - end; - end; -end; - -procedure TfrViewTiposVenta.CustomViewDestroy(Sender: TObject); -begin - inherited; - FreeAndNIL(FListaTiposVenta); - FController := NIL; -end; - -procedure TfrViewTiposVenta.ElegirTiposVenta(const AIDTiposVenta: Integer); -var - i : integer; -begin - for i := 0 to FListaTiposVenta.Count-1 do - begin - if FListaTiposVenta.ValueFromIndex[i] = IntToStr(AIDTiposVenta) then - begin - cbTiposVenta.Text := FListaTiposVenta.Names[i]; - Break; - end; - end; -end; - -function TfrViewTiposVenta.GetDataItem: TDADataTable; -begin - Result := FDataItem; -end; - -function TfrViewTiposVenta.getIDTipoVenta: Integer; -begin -{ if FListaTiposVentas.IndexOf(cbTiposVenta.Text) < 0 then - Result := FListaTiposVentas.IndexOf(cbTiposVenta.Text) - else - Result := FListaIDTiposVentas.Integers[FListaTiposVentas.IndexOf(cbTiposVenta.Text)];} -end; - -procedure TfrViewTiposVenta.SetDataItem(const Value: TDADataTable); -begin - FDataItem := Value; - if Assigned(FDataItem.FindField('ID_TIPOVENTA')) then - ElegirTiposVenta(FDataItem.FieldByName('ID_TIPOVENTA').AsInteger); -end; - -procedure TfrViewTiposVenta.SetIDTipoVenta(const ID: Integer); -var - AIndex: Integer; -begin -{ if FListaIDTiposVentas.Find(ID, AIndex) then - cbTiposVenta.Text := FListaTiposVentas.Strings[AIndex];} -end; - -end. diff --git a/Source/Servicios/FactuGES.RODL b/Source/Servicios/FactuGES.RODL index 148ed66..d84d084 100644 --- a/Source/Servicios/FactuGES.RODL +++ b/Source/Servicios/FactuGES.RODL @@ -1048,6 +1048,15 @@ + + + + + + + + + diff --git a/Source/Servicios/FactuGES_Intf.pas b/Source/Servicios/FactuGES_Intf.pas index 9b0ee22..5a06720 100644 --- a/Source/Servicios/FactuGES_Intf.pas +++ b/Source/Servicios/FactuGES_Intf.pas @@ -57,6 +57,7 @@ const IsrvSubfamilias_IID : TGUID = '{B2A29B16-BF65-45B3-B864-EA3E33406001}'; IsrvTarifas_IID : TGUID = '{BA51338D-4E54-48F9-9534-DCDDD771DE0D}'; IsrvTiposOperacionCompra_IID : TGUID = '{CCBF4D39-D55E-440B-A5D5-9847CD5F4F35}'; + IsrvTiposOperacionVenta_IID : TGUID = '{FC1745A8-F8BF-4088-B030-CDCD642C68FF}'; { Event ID's } @@ -96,6 +97,7 @@ type IsrvSubfamilias = interface; IsrvTarifas = interface; IsrvTiposOperacionCompra = interface; + IsrvTiposOperacionVenta = interface; TRdxEmpresasArray = class; TIntegerArray = class; @@ -954,6 +956,23 @@ type end; + { IsrvTiposOperacionVenta } + IsrvTiposOperacionVenta = interface(IDataAbstractService) + ['{FC1745A8-F8BF-4088-B030-CDCD642C68FF}'] + end; + + { CosrvTiposOperacionVenta } + CosrvTiposOperacionVenta = class + class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvTiposOperacionVenta; + end; + + { TsrvTiposOperacionVenta_Proxy } + TsrvTiposOperacionVenta_Proxy = class(TDataAbstractService_Proxy, IsrvTiposOperacionVenta) + protected + function __GetInterfaceName:string; override; + + end; + implementation uses @@ -3000,6 +3019,18 @@ begin result := 'srvTiposOperacionCompra'; end; +{ CosrvTiposOperacionVenta } + +class function CosrvTiposOperacionVenta.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvTiposOperacionVenta; +begin + result := TsrvTiposOperacionVenta_Proxy.Create(aMessage, aTransportChannel); +end; + +function TsrvTiposOperacionVenta_Proxy.__GetInterfaceName:string; +begin + result := 'srvTiposOperacionVenta'; +end; + initialization RegisterROClass(TRdxLoginInfo); RegisterROClass(TRdxEmpresasArray); @@ -3038,6 +3069,7 @@ initialization RegisterProxyClass(IsrvSubfamilias_IID, TsrvSubfamilias_Proxy); RegisterProxyClass(IsrvTarifas_IID, TsrvTarifas_Proxy); RegisterProxyClass(IsrvTiposOperacionCompra_IID, TsrvTiposOperacionCompra_Proxy); + RegisterProxyClass(IsrvTiposOperacionVenta_IID, TsrvTiposOperacionVenta_Proxy); finalization @@ -3078,5 +3110,6 @@ finalization UnregisterProxyClass(IsrvSubfamilias_IID); UnregisterProxyClass(IsrvTarifas_IID); UnregisterProxyClass(IsrvTiposOperacionCompra_IID); + UnregisterProxyClass(IsrvTiposOperacionVenta_IID); end. diff --git a/Source/Servicios/FactuGES_Invk.pas b/Source/Servicios/FactuGES_Invk.pas index f05b063..35dee06 100644 --- a/Source/Servicios/FactuGES_Invk.pas +++ b/Source/Servicios/FactuGES_Invk.pas @@ -355,6 +355,14 @@ type published end; + TsrvTiposOperacionVenta_Invoker = class(TDataAbstractService_Invoker) + private + protected + public + constructor Create; override; + published + end; + implementation uses @@ -2524,5 +2532,13 @@ begin FAbstract := False; end; +{ TsrvTiposOperacionVenta_Invoker } + +constructor TsrvTiposOperacionVenta_Invoker.Create; +begin + inherited Create; + FAbstract := False; +end; + initialization end. diff --git a/Source/Servicios/RODLFile.res b/Source/Servicios/RODLFile.res index bfe24b6..f2f2c14 100644 Binary files a/Source/Servicios/RODLFile.res and b/Source/Servicios/RODLFile.res differ diff --git a/Source/Servidor/FactuGES_Server.dpr b/Source/Servidor/FactuGES_Server.dpr index 418d4d9..d498cc1 100644 --- a/Source/Servidor/FactuGES_Server.dpr +++ b/Source/Servidor/FactuGES_Server.dpr @@ -117,8 +117,6 @@ uses schEmpresasClient_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasClient_Intf.pas', schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas', uNumUtils in '..\Base\Utiles\uNumUtils.pas', - schFacturasClienteClient_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteClient_Intf.pas', - schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas', schRecibosClienteClient_Intf in '..\Modulos\Recibos de cliente\Model\schRecibosClienteClient_Intf.pas', schRecibosClienteServer_Intf in '..\Modulos\Recibos de cliente\Model\schRecibosClienteServer_Intf.pas', uBizReferenciasServer in '..\Modulos\Referencias\Model\uBizReferenciasServer.pas', @@ -142,17 +140,22 @@ uses schPresupuestosClienteServer_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteServer_Intf.pas', schContratosClienteClient_Intf in '..\Modulos\Contratos de cliente\Model\schContratosClienteClient_Intf.pas', schContratosClienteServer_Intf in '..\Modulos\Contratos de cliente\Model\schContratosClienteServer_Intf.pas', - schArticulosClient_Intf in '..\Modulos\Articulos\Model\schArticulosClient_Intf.pas', - schArticulosServer_Intf in '..\Modulos\Articulos\Model\schArticulosServer_Intf.pas', srvTiposOperacionCompra_Impl in '..\Modulos\Tipos de operacion compra\Servidor\srvTiposOperacionCompra_Impl.pas' {srvTiposOperacionCompra: TDataAbstractService}, schTiposOperacionCompraClient_Intf in '..\Modulos\Tipos de operacion compra\Model\schTiposOperacionCompraClient_Intf.pas', schTiposOperacionCompraServer_Intf in '..\Modulos\Tipos de operacion compra\Model\schTiposOperacionCompraServer_Intf.pas', schFacturasProveedorClient_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorClient_Intf.pas', schFacturasProveedorServer_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorServer_Intf.pas', - schPedidosProveedorClient_Intf in '..\Modulos\Pedidos a proveedor\Model\schPedidosProveedorClient_Intf.pas', - schPedidosProveedorServer_Intf in '..\Modulos\Pedidos a proveedor\Model\schPedidosProveedorServer_Intf.pas', schContactosClient_Intf in '..\Modulos\Contactos\Model\schContactosClient_Intf.pas', - schContactosServer_Intf in '..\Modulos\Contactos\Model\schContactosServer_Intf.pas'; + schContactosServer_Intf in '..\Modulos\Contactos\Model\schContactosServer_Intf.pas', + srvTiposOperacionVenta_Impl in '..\Modulos\Tipos de operacion venta\Servidor\srvTiposOperacionVenta_Impl.pas' {srvTiposOperacionVenta: TDataAbstractService}, + schTiposOperacionVentaClient_Intf in '..\Modulos\Tipos de operacion venta\Model\schTiposOperacionVentaClient_Intf.pas', + schTiposOperacionVentaServer_Intf in '..\Modulos\Tipos de operacion venta\Model\schTiposOperacionVentaServer_Intf.pas', + schFacturasClienteClient_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteClient_Intf.pas', + schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas', + schArticulosClient_Intf in '..\Modulos\Articulos\Model\schArticulosClient_Intf.pas', + schArticulosServer_Intf in '..\Modulos\Articulos\Model\schArticulosServer_Intf.pas', + schPedidosProveedorClient_Intf in '..\Modulos\Pedidos a proveedor\Model\schPedidosProveedorClient_Intf.pas', + schPedidosProveedorServer_Intf in '..\Modulos\Pedidos a proveedor\Model\schPedidosProveedorServer_Intf.pas'; {$R *.res} {$R ..\Servicios\RODLFile.res} diff --git a/Source/Servidor/FactuGES_Server.dproj b/Source/Servidor/FactuGES_Server.dproj index 673c00e..b0e63e5 100644 --- a/Source/Servidor/FactuGES_Server.dproj +++ b/Source/Servidor/FactuGES_Server.dproj @@ -28,7 +28,7 @@ Delphi.Personality - FalseTrueFalseTrueFalse3600FalseFalseFalseFalseFalse30821252Rodax Software S.L.3.6.0.0FactuGES (Servidor)3.6.0.0sábado, 12 de marzo de 2022 11:34 + FalseTrueFalseTrueFalse3900FalseFalseFalseFalseFalse30821252Rodax Software S.L.3.9.0.0FactuGES (Servidor)3.9.0.0viernes, 20 de mayo de 2022 18:56 File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found FactuGES_Server.dpr @@ -275,6 +275,12 @@
srvTiposOperacionCompra
TDataAbstractService
+ + + +
srvTiposOperacionVenta
+ TDataAbstractService +
diff --git a/Source/Servidor/FactuGES_Server.res b/Source/Servidor/FactuGES_Server.res index c260797..181ccd4 100644 Binary files a/Source/Servidor/FactuGES_Server.res and b/Source/Servidor/FactuGES_Server.res differ diff --git a/Source/Servidor/uDataModuleServer.pas b/Source/Servidor/uDataModuleServer.pas index 3f1ed1b..53e5747 100644 --- a/Source/Servidor/uDataModuleServer.pas +++ b/Source/Servidor/uDataModuleServer.pas @@ -36,7 +36,7 @@ type procedure BINMessageWriteException(Sender: TROMessage; aStream: TStream; E: Exception); private - FEscribirLog : TCriticalSection; + //FEscribirLog : TCriticalSection; FConnectionName : string; function GetConnectionString: string; procedure IniciarLog; @@ -172,11 +172,11 @@ end; procedure TdmServer.IniciarLog; begin - FEscribirLog := TCriticalSection.Create; + //FEscribirLog := TCriticalSection.Create; //SE COMENTA PORQUE TUESTA LA PARTE SERVIDORA SI SE DESEA ARREGLAR ACTUALIZAR LAS JV de tecsitel JvLogFile1.Active := False; - JvLogFile1.FileName := ExtractFilePath(Application.ExeName) + 'ServerLog.txt'; + JvLogFile1.FileName := ExtractFilePath(Application.ExeName) + 'FactuGES_Server_' + FormatDateTime('yyyymmddhhnnss', Now) + '.log'; JvLogFile1.AutoSave := True; // JvLogFile1.Active := True; JvLogFile1.Clear; @@ -268,7 +268,7 @@ end; procedure TdmServer.DetenerLog; begin - FEscribirLog.Free; +// FEscribirLog.Free; end; procedure TdmServer.DriverManagerTraceEvent(Sender: TObject; const Text: string; @@ -279,11 +279,11 @@ end; procedure TdmServer.EscribirLog(const AMensaje: String); begin - FEscribirLog.Acquire; +// FEscribirLog.Acquire; try JvLogFile1.Add(AMensaje); finally - FEscribirLog.Release; +// FEscribirLog.Release; end; end;