diff --git a/Source/Base/Base.res b/Source/Base/Base.res index 1641339f..8b251f31 100644 Binary files a/Source/Base/Base.res and b/Source/Base/Base.res differ diff --git a/Source/GUIBase/uEditorGridBase.pas b/Source/GUIBase/uEditorGridBase.pas index 058e4afd..09daa41d 100644 --- a/Source/GUIBase/uEditorGridBase.pas +++ b/Source/GUIBase/uEditorGridBase.pas @@ -68,7 +68,7 @@ type cbxListaAnos: TTBXComboBoxItem; sepAno: TTBXSeparatorItem; procedure tbxEditFiltroChange(Sender: TObject; const Text: String); - procedure FormShow(Sender: TObject); + procedure FormShow(Sender: TObject); procedure actQuitarFiltroExecute(Sender: TObject); procedure actDuplicarUpdate(Sender: TObject); procedure actModificarUpdate(Sender: TObject); @@ -244,7 +244,7 @@ begin ViewGrid.RestoreFromIniFile; end; - cbxListaAnos.ItemIndex := 0; + cbxListaAnos.ItemIndex := 0; end; procedure TfEditorGridBase.actEliminarUpdate(Sender: TObject); diff --git a/Source/Informes/3/InfFacturaCliente.fr3 b/Source/Informes/3/InfFacturaCliente.fr3 index 3910e5d3..22702810 100644 --- a/Source/Informes/3/InfFacturaCliente.fr3 +++ b/Source/Informes/3/InfFacturaCliente.fr3 @@ -1,10 +1,10 @@ - + - - + + @@ -12,8 +12,8 @@ - - + + @@ -23,18 +23,15 @@ - - - - + + - + - @@ -51,7 +48,7 @@ - + @@ -59,9 +56,7 @@ - - - + diff --git a/Source/Modulos/Comisiones/Views/uEditorComision.dfm b/Source/Modulos/Comisiones/Views/uEditorComision.dfm index 075a5ce9..4147750c 100644 --- a/Source/Modulos/Comisiones/Views/uEditorComision.dfm +++ b/Source/Modulos/Comisiones/Views/uEditorComision.dfm @@ -127,7 +127,6 @@ inherited fEditorComision: TfEditorComision Width = 741 Height = 506 MultiLine = True - ExplicitTop = 109 ExplicitWidth = 741 ExplicitHeight = 506 inherited pagGeneral: TTabSheet @@ -287,6 +286,7 @@ inherited fEditorComision: TfEditorComision Kind = skCount Column = frViewVendedoresComision1.cxGridViewNOMBRE end> + OptionsData.Editing = True inherited cxGridViewID: TcxGridDBColumn IsCaptionAssigned = True end @@ -295,12 +295,6 @@ inherited fEditorComision: TfEditorComision inherited ToolBar1: TToolBar Width = 662 ExplicitWidth = 662 - inherited ToolButton3: TToolButton - ExplicitWidth = 98 - end - inherited ToolButton8: TToolButton - ExplicitWidth = 99 - end end end object dxLayoutControl1Group_Root: TdxLayoutGroup @@ -358,18 +352,18 @@ inherited fEditorComision: TfEditorComision Width = 747 ExplicitWidth = 747 inherited Bevel3: TBevel - Left = 338 + Left = 370 Top = 10 Height = 30 - ExplicitLeft = 338 + ExplicitLeft = 370 ExplicitTop = 10 ExplicitHeight = 30 end inherited Bevel4: TBevel - Left = 450 + Left = 482 Top = 52 Width = 192 - ExplicitLeft = 450 + ExplicitLeft = 482 ExplicitTop = 52 ExplicitWidth = 192 end @@ -384,9 +378,11 @@ inherited fEditorComision: TfEditorComision StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 163 ExplicitTop = 37 + ExplicitWidth = 93 + Width = 93 end inherited ImporteIVA: TcxDBCurrencyEdit - Left = 521 + Left = 553 Top = 87 DataBinding.DataField = '' Style.LookAndFeel.SkinName = '' @@ -394,19 +390,23 @@ inherited fEditorComision: TfEditorComision StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 521 + ExplicitLeft = 553 ExplicitTop = 87 + ExplicitWidth = 137 + Width = 137 end inherited ImporteTotal: TcxDBCurrencyEdit - Left = 451 + Left = 483 Top = 141 Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 451 + ExplicitLeft = 483 ExplicitTop = 141 + ExplicitWidth = 137 + Width = 137 end inherited edtDescuento: TcxDBSpinEdit Left = 92 @@ -421,7 +421,7 @@ inherited fEditorComision: TfEditorComision ExplicitTop = 37 end inherited edtIVA: TcxDBSpinEdit - Left = 450 + Left = 482 Top = 87 DataBinding.DataField = '' Style.LookAndFeel.SkinName = '' @@ -429,11 +429,11 @@ inherited fEditorComision: TfEditorComision StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 450 + ExplicitLeft = 482 ExplicitTop = 87 end inherited ImporteBase: TcxDBCurrencyEdit - Left = 450 + Left = 482 Top = 10 DataBinding.DataField = '' Style.LookAndFeel.SkinName = '' @@ -441,11 +441,13 @@ inherited fEditorComision: TfEditorComision StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 450 + ExplicitLeft = 482 ExplicitTop = 10 + ExplicitWidth = 92 + Width = 92 end inherited edtRE: TcxDBSpinEdit - Left = 450 + Left = 482 Top = 114 DataBinding.DataField = '' Style.LookAndFeel.SkinName = '' @@ -453,11 +455,11 @@ inherited fEditorComision: TfEditorComision StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 450 + ExplicitLeft = 482 ExplicitTop = 114 end inherited ImporteRE: TcxDBCurrencyEdit - Left = 521 + Left = 553 Top = 114 DataBinding.DataField = '' Style.LookAndFeel.SkinName = '' @@ -465,8 +467,10 @@ inherited fEditorComision: TfEditorComision StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 521 + ExplicitLeft = 553 ExplicitTop = 114 + ExplicitWidth = 56 + Width = 56 end inherited eImporteNeto: TcxDBCurrencyEdit Left = 92 @@ -479,6 +483,8 @@ inherited fEditorComision: TfEditorComision StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 92 ExplicitTop = 10 + ExplicitWidth = 147 + Width = 147 end inherited ePorte: TcxDBCurrencyEdit Left = 92 @@ -491,6 +497,8 @@ inherited fEditorComision: TfEditorComision StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 92 ExplicitTop = 64 + ExplicitWidth = 147 + Width = 147 end inherited eIVA: TcxDBLookupComboBox Left = 92 @@ -502,11 +510,13 @@ inherited fEditorComision: TfEditorComision StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 92 ExplicitTop = 91 + ExplicitWidth = 81 + Width = 81 end inherited bTiposIVA: TButton - Left = 190 + Left = 222 Top = 91 - ExplicitLeft = 190 + ExplicitLeft = 222 ExplicitTop = 91 end inherited cbRecargoEquivalencia: TcxDBCheckBox @@ -519,6 +529,8 @@ inherited fEditorComision: TfEditorComision StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 92 ExplicitTop = 118 + ExplicitWidth = 219 + Width = 219 end inherited dxLayoutControl1Group_Root: TdxLayoutGroup inherited dxLayoutControl1Group1: TdxLayoutGroup @@ -1368,13 +1380,7 @@ inherited fEditorComision: TfEditorComision Top = 0 Bitmap = {} end - inherited JvFormStorage: TJvFormStorage - OnSavePlacement = JvFormStorageSavePlacement - OnRestorePlacement = JvFormStorageRestorePlacement - Left = 528 - Top = 32 - end - inherited SmallImages: TPngImageList [9] + inherited SmallImages: TPngImageList [8] PngImages = < item PngImage.Data = { @@ -1903,6 +1909,12 @@ inherited fEditorComision: TfEditorComision Top = 0 Bitmap = {} end + inherited JvFormStorage: TJvFormStorage [9] + OnSavePlacement = JvFormStorageSavePlacement + OnRestorePlacement = JvFormStorageRestorePlacement + Left = 528 + Top = 32 + end inherited JvAppRegistryStorage: TJvAppRegistryStorage Left = 560 Top = 32 diff --git a/Source/Modulos/Comisiones/Views/uEditorComision.pas b/Source/Modulos/Comisiones/Views/uEditorComision.pas index d098137d..e1afdd23 100644 --- a/Source/Modulos/Comisiones/Views/uEditorComision.pas +++ b/Source/Modulos/Comisiones/Views/uEditorComision.pas @@ -39,7 +39,9 @@ type procedure dsDataTableDataChange(Sender: TObject; Field: TField); procedure OnFacturasComisionAfterSummary(ASender: TcxDataSummary); procedure OnVendedoresComisionAfterSummary(ASender: TcxDataSummary); - procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); override; //Importante, es donde deben quitarse eventos para que afecten a la tabla una vez que se cierre el editor + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); override; + procedure OnComisionChanged(Sender: TObject); + //Importante, es donde deben quitarse eventos para que afecten a la tabla una vez que se cierre el editor private FImporteTotalFacturas: Variant; @@ -234,6 +236,7 @@ procedure TfEditorComision.FormCloseQuery(Sender: TObject; var CanClose: Boolean begin frViewFacturasComision1.cxGridView.DataController.Summary.OnAfterSummary := Nil; frViewVendedoresComision1.cxGridView.DataController.Summary.OnAfterSummary := Nil; + frViewVendedoresComision1.cxGridViewCOMISION.Properties.OnEditValueChanged := Nil; inherited; end; @@ -250,10 +253,23 @@ begin frViewFacturasComision1.cxGridView.DataController.Summary.OnAfterSummary := OnFacturasComisionAfterSummary; frViewVendedoresComision1.cxGridView.DataController.Summary.OnAfterSummary := OnVendedoresComisionAfterSummary; + frViewVendedoresComision1.cxGridViewCOMISION.Properties.OnEditValueChanged := OnComisionChanged; Comision.DataTable.Active := True; end; +procedure TfEditorComision.OnComisionChanged(Sender: TObject); +begin + inherited; + FImporteTotalFacturas := frViewFacturasComision1.cxGridView.DataController.Summary.FooterSummaryValues[1]; + + //Recalculamos comisiones + if Assigned(FController) + and (not VarIsNull(FImporteTotalFacturas)) + and (FImporteTotalFacturas > 0) then + FController.RecalcularComisiones(Comision, FImporteTotalFacturas); +end; + procedure TfEditorComision.OnFacturasComisionAfterSummary(ASender: TcxDataSummary); begin inherited; @@ -312,7 +328,7 @@ begin inherited; FImporteTotalFacturas := -1; FImporteTotalVendedores := -1; - FTotalVendedores := -1; + FTotalVendedores := -1; pgPaginas.ActivePageIndex := 0; FViewComision := frViewComision1; end; @@ -335,6 +351,7 @@ begin //Quitamos los eventos antes de eliminar para que no intercedan en la operacion frViewFacturasComision1.cxGridView.DataController.Summary.OnAfterSummary := Nil; frViewVendedoresComision1.cxGridView.DataController.Summary.OnAfterSummary := Nil; + frViewVendedoresComision1.cxGridViewCOMISION.Properties.OnEditValueChanged := Nil; if not FController.Eliminar(FComision) then actRefrescar.Execute; diff --git a/Source/Modulos/Comisiones/Views/uViewVendedoresComision.dfm b/Source/Modulos/Comisiones/Views/uViewVendedoresComision.dfm index 8c3f54f3..75690646 100644 --- a/Source/Modulos/Comisiones/Views/uViewVendedoresComision.dfm +++ b/Source/Modulos/Comisiones/Views/uViewVendedoresComision.dfm @@ -54,20 +54,24 @@ inherited frViewVendedoresComision: TfrViewVendedoresComision end object cxGridViewNOMBRE: TcxGridDBColumn DataBinding.FieldName = 'NOMBRE' + Options.Editing = False end object cxGridViewCOMISION: TcxGridDBColumn Caption = 'Comisi'#243'n' DataBinding.FieldName = 'COMISION' PropertiesClassName = 'TcxSpinEditProperties' - Properties.Alignment.Horz = taRightJustify - Properties.DisplayFormat = '0.0 %;-0.0 %' + Properties.DisplayFormat = ',0.00 %;-,0.00 %' + Properties.EditFormat = ',0.00 %;-,0.00 %' + Properties.ImmediatePost = True Properties.MaxValue = 100.000000000000000000 HeaderAlignmentHorz = taRightJustify end object cxGridViewIMPORTE_TOTAL: TcxGridDBColumn Caption = 'Importe total' DataBinding.FieldName = 'IMPORTE_TOTAL' + PropertiesClassName = 'TcxCurrencyEditProperties' HeaderAlignmentHorz = taRightJustify + Options.Editing = False end end end diff --git a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas index 252ad670..e327d88a 100644 --- a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas +++ b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas @@ -369,6 +369,8 @@ begin begin ID_EMPRESA := AppFactuGES.EmpresaActiva.ID; USUARIO := AppFactuGES.UsuarioActivo.UserName; + ID_TIENDA := AppFactuGES.TiendaActiva.ID; + TIENDA := AppFactuGES.TiendaActiva.NOMBRE; FECHA_CONTRATO := DateOf(Now); INCIDENCIAS_ACTIVAS := 0; INCIDENCIASIsNull := True; diff --git a/Source/Modulos/Contratos de cliente/Views/uViewContratoCliente.dfm b/Source/Modulos/Contratos de cliente/Views/uViewContratoCliente.dfm index 3bbfd3d2..554c903e 100644 --- a/Source/Modulos/Contratos de cliente/Views/uViewContratoCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Views/uViewContratoCliente.dfm @@ -141,6 +141,10 @@ inherited frViewContratoCliente: TfrViewContratoCliente item Description = 'TERMINADO' Value = 'TERMINADO' + end + item + Description = 'TERMINADO Y PAGADO' + Value = 'TERMINADO_PAGADO' end> Style.BorderColor = clWindowFrame Style.BorderStyle = ebs3D diff --git a/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.dfm b/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.dfm index 735532bd..23d2704e 100644 --- a/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.dfm @@ -122,6 +122,13 @@ inherited frViewContratosCliente: TfrViewContratosCliente HeaderAlignmentHorz = taRightJustify Width = 63 end + object cxGridViewVENDEDOR: TcxGridDBColumn + Caption = 'Vendedor' + DataBinding.FieldName = 'VENDEDOR' + PropertiesClassName = 'TcxTextEditProperties' + Properties.Alignment.Horz = taRightJustify + HeaderAlignmentHorz = taRightJustify + end end inherited cxGridLevel: TcxGridLevel Caption = 'Todos' diff --git a/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.pas b/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.pas index ab4303d9..69b1cd0a 100644 --- a/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.pas +++ b/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.pas @@ -12,7 +12,7 @@ uses uDADataTable, cxGridLevel, cxClasses, cxControls, cxGridCustomView, Classes, cxGrid, uBizContratosCliente, cxCurrencyEdit, Forms, uViewFiltroBase, ActnList, TB2Item, TBX, TB2Toolbar, TBXDkPanels, TB2Dock, dxPgsDlg, uDAInterfaces, Windows, - uCustomView, uViewBase; + uCustomView, uViewBase, cxTextEdit; type IViewContratosCliente = interface(IViewGrid) @@ -44,6 +44,7 @@ type cxGridViewPOBLACION: TcxGridDBColumn; cxGridViewCODIGO_POSTAL: TcxGridDBColumn; cxGridViewPROVINCIA: TcxGridDBColumn; + cxGridViewVENDEDOR: TcxGridDBColumn; procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel); procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView; diff --git a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas index 995c5923..c40acbd7 100644 --- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas +++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas @@ -407,11 +407,12 @@ begin Expression := NewBinaryExpression(Expression, Condicion, dboAnd); end; + with Result.DataTable.DynamicWhere do begin + //Todas las facturas de esta liquidación Condicion1 := NewBinaryExpression(NewField('', fld_FacturasClienteID_COMISION_LIQUIDADA), NewConstant(IdComision, datInteger), dboEqual); - //Todas aquellas facturas que ya esten asociadas a la liquidación actual no deben salir if (Length(IdFacturasAsociadas) > 0) then begin @@ -431,17 +432,35 @@ begin Cadena.Free; end; + //Si no hay facturas en el editor no las tenemos en cuenta + if (Condicion2 <> nil) then + Condicion1 := NewBinaryExpression(Condicion1, Condicion2, dboAnd); //Todas aquellas que no esten asociadas a ninguna liquidación, y que tampoco esten en el editor, ya que en cache estan //asociadas a la liquidadcion pero en datos me viene como nula Condicion3 := NewBinaryExpression(NewField('', fld_FacturasClienteID_COMISION_LIQUIDADA), NewNull(), dboEqual); + //Todas aquellas facturas que ya esten asociadas a la liquidación actual no deben salir + if (Length(IdFacturasAsociadas) > 0) then + begin + Cadena := TStringList.Create; + Cadena.CommaText := IdFacturasAsociadas; + Condicion2 := nil; + //Vamos generando todas las where de cada uno de los ID recibidos por parametro + for i := 0 to Cadena.Count - 1 do + with Result.DataTable.DynamicWhere do + begin + Condicion4 := NewBinaryExpression(NewField('', fld_FacturasClienteID), NewConstant(StrToInt(Cadena.Strings[i]), datInteger), dboNotEqual); + if Condicion2 = nil then + Condicion2 := Condicion4 + else + Condicion2 := NewBinaryExpression(Condicion2, Condicion4, dboAnd); + end; + Cadena.Free; + end; //Si no hay facturas en el editor no las tenemos en cuenta if (Condicion2 <> nil) then - begin - Condicion1 := NewBinaryExpression(Condicion1, Condicion2, dboAnd); - Condicion3 := NewBinaryExpression(Condicion3, Condicion2, dboAnd); - end; + Condicion3 := NewBinaryExpression(Condicion3, Condicion2, dboAnd); // Todas aquellas facturas asociadas a la comisión actual y que no estén asociadas al editor (IdFacturasAsociadas) //esto es porque se puede agregar y quitar facturas y todos los cambios estan en cache @@ -562,6 +581,8 @@ begin begin ID_EMPRESA := AppFactuGES.EmpresaActiva.ID; USUARIO := AppFactuGES.UsuarioActivo.UserName; + ID_TIENDA := AppFactuGES.TiendaActiva.ID; + TIENDA := AppFactuGES.TiendaActiva.NOMBRE; REFERENCIA := ''; //Para que se asigne una nueva SITUACION := CTE_PENDIENTE; //Al ser una nueva debe de estar pendiente FECHA_FACTURA := DateOf(Now); diff --git a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm index 65241aa3..20124003 100644 --- a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm @@ -147,6 +147,11 @@ inherited DataModuleFacturasCliente: TDataModuleFacturasCliente Size = 255 ServerAutoRefresh = True end + item + Name = 'REFERENCIA_CLIENTE' + DataType = datString + Size = 255 + end item Name = 'NOMBRE_COMERCIAL_CLIENTE' DataType = datString @@ -305,6 +310,11 @@ inherited DataModuleFacturasCliente: TDataModuleFacturasCliente DataType = datString Size = 255 end + item + Name = 'VENDEDOR' + DataType = datString + Size = 255 + end item Name = 'SIN_COMISION' DataType = datSmallInt diff --git a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas index 5839070f..725d685f 100644 --- a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas +++ b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_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_ListaAnosFacturas = '{C6E2E8B4-2CB3-4679-BA75-D15FE79F93EE}'; - RID_FacturasCliente = '{FFE70CEB-56D8-4951-BA12-13F7C72BFE18}'; - RID_FacturasCliente_Detalles = '{B28CF6EF-D5C9-47F9-8D64-A80E8AF20724}'; + RID_ListaAnosFacturas = '{145AB429-AA3C-428B-862E-44860A53C63D}'; + RID_FacturasCliente = '{FB6656F1-09E4-4105-B0E9-4D9ADE60387B}'; + RID_FacturasCliente_Detalles = '{29D7E3D2-87AC-4F64-98AA-E4501188EB6B}'; { Data table names } nme_ListaAnosFacturas = 'ListaAnosFacturas'; @@ -44,6 +44,7 @@ const fld_FacturasClienteOBSERVACIONES = 'OBSERVACIONES'; fld_FacturasClienteID_CLIENTE = 'ID_CLIENTE'; fld_FacturasClienteNOMBRE_CLIENTE = 'NOMBRE_CLIENTE'; + fld_FacturasClienteREFERENCIA_CLIENTE = 'REFERENCIA_CLIENTE'; fld_FacturasClienteNOMBRE_COMERCIAL_CLIENTE = 'NOMBRE_COMERCIAL_CLIENTE'; fld_FacturasClienteNIF_CIF = 'NIF_CIF'; fld_FacturasClienteNOMBRE = 'NOMBRE'; @@ -72,6 +73,7 @@ const fld_FacturasClienteASIENTO_PUNTEADO = 'ASIENTO_PUNTEADO'; fld_FacturasClienteID_CONTRATO = 'ID_CONTRATO'; fld_FacturasClienteREF_CONTRATO = 'REF_CONTRATO'; + fld_FacturasClienteVENDEDOR = 'VENDEDOR'; fld_FacturasClienteSIN_COMISION = 'SIN_COMISION'; fld_FacturasClienteTIPO_FACTURA = 'TIPO_FACTURA'; @@ -95,36 +97,38 @@ const idx_FacturasClienteOBSERVACIONES = 16; idx_FacturasClienteID_CLIENTE = 17; idx_FacturasClienteNOMBRE_CLIENTE = 18; - idx_FacturasClienteNOMBRE_COMERCIAL_CLIENTE = 19; - idx_FacturasClienteNIF_CIF = 20; - idx_FacturasClienteNOMBRE = 21; - idx_FacturasClienteID_DIRECCION = 22; - idx_FacturasClienteCALLE = 23; - idx_FacturasClientePOBLACION = 24; - idx_FacturasClientePROVINCIA = 25; - idx_FacturasClienteCODIGO_POSTAL = 26; - idx_FacturasClienteFECHA_ALTA = 27; - idx_FacturasClienteFECHA_MODIFICACION = 28; - idx_FacturasClienteUSUARIO = 29; - idx_FacturasClienteID_FORMA_PAGO = 30; - idx_FacturasClienteRECARGO_EQUIVALENCIA = 31; - idx_FacturasClienteID_TIPO_IVA = 32; - idx_FacturasClienteIMPORTE_NETO = 33; - idx_FacturasClienteIMPORTE_PORTE = 34; - idx_FacturasClienteID_AGENTE = 35; - idx_FacturasClienteREFERENCIA_COMISION = 36; - idx_FacturasClienteIGNORAR_CONTABILIDAD = 37; - idx_FacturasClienteID_TIENDA = 38; - idx_FacturasClienteTIENDA = 39; - idx_FacturasClienteID_SUBCUENTA = 40; - idx_FacturasClienteSUBCUENTA = 41; - idx_FacturasClienteID_EJERCICIO = 42; - idx_FacturasClienteESTADO_EJERCICIO = 43; - idx_FacturasClienteASIENTO_PUNTEADO = 44; - idx_FacturasClienteID_CONTRATO = 45; - idx_FacturasClienteREF_CONTRATO = 46; - idx_FacturasClienteSIN_COMISION = 47; - idx_FacturasClienteTIPO_FACTURA = 48; + idx_FacturasClienteREFERENCIA_CLIENTE = 19; + idx_FacturasClienteNOMBRE_COMERCIAL_CLIENTE = 20; + idx_FacturasClienteNIF_CIF = 21; + idx_FacturasClienteNOMBRE = 22; + idx_FacturasClienteID_DIRECCION = 23; + idx_FacturasClienteCALLE = 24; + idx_FacturasClientePOBLACION = 25; + idx_FacturasClientePROVINCIA = 26; + idx_FacturasClienteCODIGO_POSTAL = 27; + idx_FacturasClienteFECHA_ALTA = 28; + idx_FacturasClienteFECHA_MODIFICACION = 29; + idx_FacturasClienteUSUARIO = 30; + idx_FacturasClienteID_FORMA_PAGO = 31; + idx_FacturasClienteRECARGO_EQUIVALENCIA = 32; + idx_FacturasClienteID_TIPO_IVA = 33; + idx_FacturasClienteIMPORTE_NETO = 34; + idx_FacturasClienteIMPORTE_PORTE = 35; + idx_FacturasClienteID_AGENTE = 36; + idx_FacturasClienteREFERENCIA_COMISION = 37; + idx_FacturasClienteIGNORAR_CONTABILIDAD = 38; + idx_FacturasClienteID_TIENDA = 39; + idx_FacturasClienteTIENDA = 40; + idx_FacturasClienteID_SUBCUENTA = 41; + idx_FacturasClienteSUBCUENTA = 42; + idx_FacturasClienteID_EJERCICIO = 43; + idx_FacturasClienteESTADO_EJERCICIO = 44; + idx_FacturasClienteASIENTO_PUNTEADO = 45; + idx_FacturasClienteID_CONTRATO = 46; + idx_FacturasClienteREF_CONTRATO = 47; + idx_FacturasClienteVENDEDOR = 48; + idx_FacturasClienteSIN_COMISION = 49; + idx_FacturasClienteTIPO_FACTURA = 50; { FacturasCliente_Detalles fields } fld_FacturasCliente_DetallesID = 'ID'; @@ -161,7 +165,7 @@ const type { IListaAnosFacturas } IListaAnosFacturas = interface(IDAStronglyTypedDataTable) - ['{3A65D9C0-CBC7-49BD-890B-CB27E537E661}'] + ['{9B736788-CB7F-4171-80FB-BB95F35FFF7B}'] { Property getters and setters } function GetANOValue: String; procedure SetANOValue(const aValue: String); @@ -196,7 +200,7 @@ type { IFacturasCliente } IFacturasCliente = interface(IDAStronglyTypedDataTable) - ['{0DB0095F-A024-45A3-9A3A-59E7029B3648}'] + ['{B69EA0DD-6019-492A-821A-0EE660AC366C}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -273,6 +277,10 @@ type procedure SetNOMBRE_CLIENTEValue(const aValue: String); function GetNOMBRE_CLIENTEIsNull: Boolean; procedure SetNOMBRE_CLIENTEIsNull(const aValue: Boolean); + function GetREFERENCIA_CLIENTEValue: String; + procedure SetREFERENCIA_CLIENTEValue(const aValue: String); + function GetREFERENCIA_CLIENTEIsNull: Boolean; + procedure SetREFERENCIA_CLIENTEIsNull(const aValue: Boolean); function GetNOMBRE_COMERCIAL_CLIENTEValue: String; procedure SetNOMBRE_COMERCIAL_CLIENTEValue(const aValue: String); function GetNOMBRE_COMERCIAL_CLIENTEIsNull: Boolean; @@ -385,6 +393,10 @@ type procedure SetREF_CONTRATOValue(const aValue: String); function GetREF_CONTRATOIsNull: Boolean; procedure SetREF_CONTRATOIsNull(const aValue: Boolean); + function GetVENDEDORValue: String; + procedure SetVENDEDORValue(const aValue: String); + function GetVENDEDORIsNull: Boolean; + procedure SetVENDEDORIsNull(const aValue: Boolean); function GetSIN_COMISIONValue: SmallInt; procedure SetSIN_COMISIONValue(const aValue: SmallInt); function GetSIN_COMISIONIsNull: Boolean; @@ -434,6 +446,8 @@ type property ID_CLIENTEIsNull: Boolean read GetID_CLIENTEIsNull write SetID_CLIENTEIsNull; property NOMBRE_CLIENTE: String read GetNOMBRE_CLIENTEValue write SetNOMBRE_CLIENTEValue; property NOMBRE_CLIENTEIsNull: Boolean read GetNOMBRE_CLIENTEIsNull write SetNOMBRE_CLIENTEIsNull; + property REFERENCIA_CLIENTE: String read GetREFERENCIA_CLIENTEValue write SetREFERENCIA_CLIENTEValue; + property REFERENCIA_CLIENTEIsNull: Boolean read GetREFERENCIA_CLIENTEIsNull write SetREFERENCIA_CLIENTEIsNull; property NOMBRE_COMERCIAL_CLIENTE: String read GetNOMBRE_COMERCIAL_CLIENTEValue write SetNOMBRE_COMERCIAL_CLIENTEValue; property NOMBRE_COMERCIAL_CLIENTEIsNull: Boolean read GetNOMBRE_COMERCIAL_CLIENTEIsNull write SetNOMBRE_COMERCIAL_CLIENTEIsNull; property NIF_CIF: String read GetNIF_CIFValue write SetNIF_CIFValue; @@ -490,6 +504,8 @@ type property ID_CONTRATOIsNull: Boolean read GetID_CONTRATOIsNull write SetID_CONTRATOIsNull; property REF_CONTRATO: String read GetREF_CONTRATOValue write SetREF_CONTRATOValue; property REF_CONTRATOIsNull: Boolean read GetREF_CONTRATOIsNull write SetREF_CONTRATOIsNull; + property VENDEDOR: String read GetVENDEDORValue write SetVENDEDORValue; + property VENDEDORIsNull: Boolean read GetVENDEDORIsNull write SetVENDEDORIsNull; property SIN_COMISION: SmallInt read GetSIN_COMISIONValue write SetSIN_COMISIONValue; property SIN_COMISIONIsNull: Boolean read GetSIN_COMISIONIsNull write SetSIN_COMISIONIsNull; property TIPO_FACTURA: String read GetTIPO_FACTURAValue write SetTIPO_FACTURAValue; @@ -578,6 +594,10 @@ type procedure SetNOMBRE_CLIENTEValue(const aValue: String); virtual; function GetNOMBRE_CLIENTEIsNull: Boolean; virtual; procedure SetNOMBRE_CLIENTEIsNull(const aValue: Boolean); virtual; + function GetREFERENCIA_CLIENTEValue: String; virtual; + procedure SetREFERENCIA_CLIENTEValue(const aValue: String); virtual; + function GetREFERENCIA_CLIENTEIsNull: Boolean; virtual; + procedure SetREFERENCIA_CLIENTEIsNull(const aValue: Boolean); virtual; function GetNOMBRE_COMERCIAL_CLIENTEValue: String; virtual; procedure SetNOMBRE_COMERCIAL_CLIENTEValue(const aValue: String); virtual; function GetNOMBRE_COMERCIAL_CLIENTEIsNull: Boolean; virtual; @@ -690,6 +710,10 @@ type procedure SetREF_CONTRATOValue(const aValue: String); virtual; function GetREF_CONTRATOIsNull: Boolean; virtual; procedure SetREF_CONTRATOIsNull(const aValue: Boolean); virtual; + function GetVENDEDORValue: String; virtual; + procedure SetVENDEDORValue(const aValue: String); virtual; + function GetVENDEDORIsNull: Boolean; virtual; + procedure SetVENDEDORIsNull(const aValue: Boolean); virtual; function GetSIN_COMISIONValue: SmallInt; virtual; procedure SetSIN_COMISIONValue(const aValue: SmallInt); virtual; function GetSIN_COMISIONIsNull: Boolean; virtual; @@ -738,6 +762,8 @@ type property ID_CLIENTEIsNull: Boolean read GetID_CLIENTEIsNull write SetID_CLIENTEIsNull; property NOMBRE_CLIENTE: String read GetNOMBRE_CLIENTEValue write SetNOMBRE_CLIENTEValue; property NOMBRE_CLIENTEIsNull: Boolean read GetNOMBRE_CLIENTEIsNull write SetNOMBRE_CLIENTEIsNull; + property REFERENCIA_CLIENTE: String read GetREFERENCIA_CLIENTEValue write SetREFERENCIA_CLIENTEValue; + property REFERENCIA_CLIENTEIsNull: Boolean read GetREFERENCIA_CLIENTEIsNull write SetREFERENCIA_CLIENTEIsNull; property NOMBRE_COMERCIAL_CLIENTE: String read GetNOMBRE_COMERCIAL_CLIENTEValue write SetNOMBRE_COMERCIAL_CLIENTEValue; property NOMBRE_COMERCIAL_CLIENTEIsNull: Boolean read GetNOMBRE_COMERCIAL_CLIENTEIsNull write SetNOMBRE_COMERCIAL_CLIENTEIsNull; property NIF_CIF: String read GetNIF_CIFValue write SetNIF_CIFValue; @@ -794,6 +820,8 @@ type property ID_CONTRATOIsNull: Boolean read GetID_CONTRATOIsNull write SetID_CONTRATOIsNull; property REF_CONTRATO: String read GetREF_CONTRATOValue write SetREF_CONTRATOValue; property REF_CONTRATOIsNull: Boolean read GetREF_CONTRATOIsNull write SetREF_CONTRATOIsNull; + property VENDEDOR: String read GetVENDEDORValue write SetVENDEDORValue; + property VENDEDORIsNull: Boolean read GetVENDEDORIsNull write SetVENDEDORIsNull; property SIN_COMISION: SmallInt read GetSIN_COMISIONValue write SetSIN_COMISIONValue; property SIN_COMISIONIsNull: Boolean read GetSIN_COMISIONIsNull write SetSIN_COMISIONIsNull; property TIPO_FACTURA: String read GetTIPO_FACTURAValue write SetTIPO_FACTURAValue; @@ -807,7 +835,7 @@ type { IFacturasCliente_Detalles } IFacturasCliente_Detalles = interface(IDAStronglyTypedDataTable) - ['{C8FB6F13-CC9F-4716-925A-56A598401F23}'] + ['{824CB867-0513-46EE-8E49-714506B6D7B0}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1450,6 +1478,27 @@ begin DataTable.Fields[idx_FacturasClienteNOMBRE_CLIENTE].AsVariant := Null; end; +function TFacturasClienteDataTableRules.GetREFERENCIA_CLIENTEValue: String; +begin + result := DataTable.Fields[idx_FacturasClienteREFERENCIA_CLIENTE].AsString; +end; + +procedure TFacturasClienteDataTableRules.SetREFERENCIA_CLIENTEValue(const aValue: String); +begin + DataTable.Fields[idx_FacturasClienteREFERENCIA_CLIENTE].AsString := aValue; +end; + +function TFacturasClienteDataTableRules.GetREFERENCIA_CLIENTEIsNull: boolean; +begin + result := DataTable.Fields[idx_FacturasClienteREFERENCIA_CLIENTE].IsNull; +end; + +procedure TFacturasClienteDataTableRules.SetREFERENCIA_CLIENTEIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_FacturasClienteREFERENCIA_CLIENTE].AsVariant := Null; +end; + function TFacturasClienteDataTableRules.GetNOMBRE_COMERCIAL_CLIENTEValue: String; begin result := DataTable.Fields[idx_FacturasClienteNOMBRE_COMERCIAL_CLIENTE].AsString; @@ -2038,6 +2087,27 @@ begin DataTable.Fields[idx_FacturasClienteREF_CONTRATO].AsVariant := Null; end; +function TFacturasClienteDataTableRules.GetVENDEDORValue: String; +begin + result := DataTable.Fields[idx_FacturasClienteVENDEDOR].AsString; +end; + +procedure TFacturasClienteDataTableRules.SetVENDEDORValue(const aValue: String); +begin + DataTable.Fields[idx_FacturasClienteVENDEDOR].AsString := aValue; +end; + +function TFacturasClienteDataTableRules.GetVENDEDORIsNull: boolean; +begin + result := DataTable.Fields[idx_FacturasClienteVENDEDOR].IsNull; +end; + +procedure TFacturasClienteDataTableRules.SetVENDEDORIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_FacturasClienteVENDEDOR].AsVariant := Null; +end; + function TFacturasClienteDataTableRules.GetSIN_COMISIONValue: SmallInt; begin result := DataTable.Fields[idx_FacturasClienteSIN_COMISION].AsSmallInt; diff --git a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas index 629300fd..016301dd 100644 --- a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas +++ b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_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_ListaAnosFacturasDelta = '{3340EDE9-C8BC-4A98-B867-A746A393909C}'; - RID_FacturasClienteDelta = '{D0017EBE-F53A-4E75-8BDB-A2AA4B6734B5}'; - RID_FacturasCliente_DetallesDelta = '{C71C0559-5EAC-4B7A-96BA-BCAF08A89042}'; + RID_ListaAnosFacturasDelta = '{13B2244C-664D-4276-B52B-B4F0ADD71D74}'; + RID_FacturasClienteDelta = '{A39B6A48-A724-487A-AC10-ED6BF3D502CC}'; + RID_FacturasCliente_DetallesDelta = '{EC7C88A7-6AA6-4A0F-A760-A7FDCACB21A9}'; type { IListaAnosFacturasDelta } IListaAnosFacturasDelta = interface(IListaAnosFacturas) - ['{3340EDE9-C8BC-4A98-B867-A746A393909C}'] + ['{13B2244C-664D-4276-B52B-B4F0ADD71D74}'] { Property getters and setters } function GetOldANOValue : String; @@ -50,7 +50,7 @@ type { IFacturasClienteDelta } IFacturasClienteDelta = interface(IFacturasCliente) - ['{D0017EBE-F53A-4E75-8BDB-A2AA4B6734B5}'] + ['{A39B6A48-A724-487A-AC10-ED6BF3D502CC}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -71,6 +71,7 @@ type function GetOldOBSERVACIONESValue : IROStrings; function GetOldID_CLIENTEValue : Integer; function GetOldNOMBRE_CLIENTEValue : String; + function GetOldREFERENCIA_CLIENTEValue : String; function GetOldNOMBRE_COMERCIAL_CLIENTEValue : String; function GetOldNIF_CIFValue : String; function GetOldNOMBREValue : String; @@ -99,6 +100,7 @@ type function GetOldASIENTO_PUNTEADOValue : SmallInt; function GetOldID_CONTRATOValue : Integer; function GetOldREF_CONTRATOValue : String; + function GetOldVENDEDORValue : String; function GetOldSIN_COMISIONValue : SmallInt; function GetOldTIPO_FACTURAValue : String; @@ -122,6 +124,7 @@ type property OldOBSERVACIONES : IROStrings read GetOldOBSERVACIONESValue; property OldID_CLIENTE : Integer read GetOldID_CLIENTEValue; property OldNOMBRE_CLIENTE : String read GetOldNOMBRE_CLIENTEValue; + property OldREFERENCIA_CLIENTE : String read GetOldREFERENCIA_CLIENTEValue; property OldNOMBRE_COMERCIAL_CLIENTE : String read GetOldNOMBRE_COMERCIAL_CLIENTEValue; property OldNIF_CIF : String read GetOldNIF_CIFValue; property OldNOMBRE : String read GetOldNOMBREValue; @@ -150,6 +153,7 @@ type property OldASIENTO_PUNTEADO : SmallInt read GetOldASIENTO_PUNTEADOValue; property OldID_CONTRATO : Integer read GetOldID_CONTRATOValue; property OldREF_CONTRATO : String read GetOldREF_CONTRATOValue; + property OldVENDEDOR : String read GetOldVENDEDORValue; property OldSIN_COMISION : SmallInt read GetOldSIN_COMISIONValue; property OldTIPO_FACTURA : String read GetOldTIPO_FACTURAValue; end; @@ -274,6 +278,12 @@ type function GetOldNOMBRE_CLIENTEIsNull: Boolean; virtual; procedure SetNOMBRE_CLIENTEValue(const aValue: String); virtual; procedure SetNOMBRE_CLIENTEIsNull(const aValue: Boolean); virtual; + function GetREFERENCIA_CLIENTEValue: String; virtual; + function GetREFERENCIA_CLIENTEIsNull: Boolean; virtual; + function GetOldREFERENCIA_CLIENTEValue: String; virtual; + function GetOldREFERENCIA_CLIENTEIsNull: Boolean; virtual; + procedure SetREFERENCIA_CLIENTEValue(const aValue: String); virtual; + procedure SetREFERENCIA_CLIENTEIsNull(const aValue: Boolean); virtual; function GetNOMBRE_COMERCIAL_CLIENTEValue: String; virtual; function GetNOMBRE_COMERCIAL_CLIENTEIsNull: Boolean; virtual; function GetOldNOMBRE_COMERCIAL_CLIENTEValue: String; virtual; @@ -442,6 +452,12 @@ type function GetOldREF_CONTRATOIsNull: Boolean; virtual; procedure SetREF_CONTRATOValue(const aValue: String); virtual; procedure SetREF_CONTRATOIsNull(const aValue: Boolean); virtual; + function GetVENDEDORValue: String; virtual; + function GetVENDEDORIsNull: Boolean; virtual; + function GetOldVENDEDORValue: String; virtual; + function GetOldVENDEDORIsNull: Boolean; virtual; + procedure SetVENDEDORValue(const aValue: String); virtual; + procedure SetVENDEDORIsNull(const aValue: Boolean); virtual; function GetSIN_COMISIONValue: SmallInt; virtual; function GetSIN_COMISIONIsNull: Boolean; virtual; function GetOldSIN_COMISIONValue: SmallInt; virtual; @@ -532,6 +548,10 @@ type property NOMBRE_CLIENTEIsNull : Boolean read GetNOMBRE_CLIENTEIsNull write SetNOMBRE_CLIENTEIsNull; property OldNOMBRE_CLIENTE : String read GetOldNOMBRE_CLIENTEValue; property OldNOMBRE_CLIENTEIsNull : Boolean read GetOldNOMBRE_CLIENTEIsNull; + property REFERENCIA_CLIENTE : String read GetREFERENCIA_CLIENTEValue write SetREFERENCIA_CLIENTEValue; + property REFERENCIA_CLIENTEIsNull : Boolean read GetREFERENCIA_CLIENTEIsNull write SetREFERENCIA_CLIENTEIsNull; + property OldREFERENCIA_CLIENTE : String read GetOldREFERENCIA_CLIENTEValue; + property OldREFERENCIA_CLIENTEIsNull : Boolean read GetOldREFERENCIA_CLIENTEIsNull; property NOMBRE_COMERCIAL_CLIENTE : String read GetNOMBRE_COMERCIAL_CLIENTEValue write SetNOMBRE_COMERCIAL_CLIENTEValue; property NOMBRE_COMERCIAL_CLIENTEIsNull : Boolean read GetNOMBRE_COMERCIAL_CLIENTEIsNull write SetNOMBRE_COMERCIAL_CLIENTEIsNull; property OldNOMBRE_COMERCIAL_CLIENTE : String read GetOldNOMBRE_COMERCIAL_CLIENTEValue; @@ -644,6 +664,10 @@ type property REF_CONTRATOIsNull : Boolean read GetREF_CONTRATOIsNull write SetREF_CONTRATOIsNull; property OldREF_CONTRATO : String read GetOldREF_CONTRATOValue; property OldREF_CONTRATOIsNull : Boolean read GetOldREF_CONTRATOIsNull; + property VENDEDOR : String read GetVENDEDORValue write SetVENDEDORValue; + property VENDEDORIsNull : Boolean read GetVENDEDORIsNull write SetVENDEDORIsNull; + property OldVENDEDOR : String read GetOldVENDEDORValue; + property OldVENDEDORIsNull : Boolean read GetOldVENDEDORIsNull; property SIN_COMISION : SmallInt read GetSIN_COMISIONValue write SetSIN_COMISIONValue; property SIN_COMISIONIsNull : Boolean read GetSIN_COMISIONIsNull write SetSIN_COMISIONIsNull; property OldSIN_COMISION : SmallInt read GetOldSIN_COMISIONValue; @@ -661,7 +685,7 @@ type { IFacturasCliente_DetallesDelta } IFacturasCliente_DetallesDelta = interface(IFacturasCliente_Detalles) - ['{C71C0559-5EAC-4B7A-96BA-BCAF08A89042}'] + ['{EC7C88A7-6AA6-4A0F-A760-A7FDCACB21A9}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_FACTURAValue : Integer; @@ -1505,6 +1529,37 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteNOMBRE_CLIENTE] := Null; end; +function TFacturasClienteBusinessProcessorRules.GetREFERENCIA_CLIENTEValue: String; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteREFERENCIA_CLIENTE]; +end; + +function TFacturasClienteBusinessProcessorRules.GetREFERENCIA_CLIENTEIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteREFERENCIA_CLIENTE]); +end; + +function TFacturasClienteBusinessProcessorRules.GetOldREFERENCIA_CLIENTEValue: String; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteREFERENCIA_CLIENTE]; +end; + +function TFacturasClienteBusinessProcessorRules.GetOldREFERENCIA_CLIENTEIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteREFERENCIA_CLIENTE]); +end; + +procedure TFacturasClienteBusinessProcessorRules.SetREFERENCIA_CLIENTEValue(const aValue: String); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteREFERENCIA_CLIENTE] := aValue; +end; + +procedure TFacturasClienteBusinessProcessorRules.SetREFERENCIA_CLIENTEIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteREFERENCIA_CLIENTE] := Null; +end; + function TFacturasClienteBusinessProcessorRules.GetNOMBRE_COMERCIAL_CLIENTEValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteNOMBRE_COMERCIAL_CLIENTE]; @@ -2373,6 +2428,37 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteREF_CONTRATO] := Null; end; +function TFacturasClienteBusinessProcessorRules.GetVENDEDORValue: String; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteVENDEDOR]; +end; + +function TFacturasClienteBusinessProcessorRules.GetVENDEDORIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteVENDEDOR]); +end; + +function TFacturasClienteBusinessProcessorRules.GetOldVENDEDORValue: String; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteVENDEDOR]; +end; + +function TFacturasClienteBusinessProcessorRules.GetOldVENDEDORIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteVENDEDOR]); +end; + +procedure TFacturasClienteBusinessProcessorRules.SetVENDEDORValue(const aValue: String); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteVENDEDOR] := aValue; +end; + +procedure TFacturasClienteBusinessProcessorRules.SetVENDEDORIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteVENDEDOR] := Null; +end; + function TFacturasClienteBusinessProcessorRules.GetSIN_COMISIONValue: SmallInt; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteSIN_COMISION]; diff --git a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm index 802358e5..bef2db9c 100644 --- a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm +++ b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm @@ -243,6 +243,14 @@ object srvFacturasCliente: TsrvFacturasCliente item DatasetField = 'TIPO_FACTURA' TableField = 'TIPO_FACTURA' + end + item + DatasetField = 'REFERENCIA_CLIENTE' + TableField = 'REFERENCIA_CLIENTE' + end + item + DatasetField = 'VENDEDOR' + TableField = 'VENDEDOR' end> end> Name = 'FacturasCliente' @@ -348,6 +356,11 @@ object srvFacturasCliente: TsrvFacturasCliente Size = 255 ServerAutoRefresh = True end + item + Name = 'REFERENCIA_CLIENTE' + DataType = datString + Size = 255 + end item Name = 'NOMBRE_COMERCIAL_CLIENTE' DataType = datString @@ -493,6 +506,11 @@ object srvFacturasCliente: TsrvFacturasCliente DataType = datString Size = 255 end + item + Name = 'VENDEDOR' + DataType = datString + Size = 255 + end item Name = 'SIN_COMISION' DataType = datSmallInt diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorElegirFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Views/uEditorElegirFacturasCliente.pas index bd51c526..4541d792 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorElegirFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uEditorElegirFacturasCliente.pas @@ -88,6 +88,7 @@ end; procedure TfEditorElegirFacturasCliente.FormShow(Sender: TObject); begin inherited; + EditorActionList.State := asSuspended; frViewFacturasCliente1.frViewFiltroBase1.edtFechaIniFiltro.EditValue := darFechaPrimerDia(now); diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm index b7f3727f..d979796c 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm @@ -188,16 +188,24 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente Width = 640 ExplicitWidth = 640 inherited txtFiltroTodo: TcxTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 543 Width = 543 end inherited edtFechaIniFiltro: TcxDateEdit - ExplicitWidth = 144 - Width = 144 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' end inherited edtFechaFinFiltro: TcxDateEdit - Left = 301 - ExplicitLeft = 301 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 263 Width = 263 end diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm index 6acf423e..fee359a8 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm @@ -160,6 +160,11 @@ inherited frViewFacturasCliente: TfrViewFacturasCliente Caption = 'Contrato' DataBinding.FieldName = 'REF_CONTRATO' end + object cxGridViewVENDEDOR: TcxGridDBColumn + Caption = 'Vendedor' + DataBinding.FieldName = 'VENDEDOR' + Visible = False + end end inherited cxGridLevel: TcxGridLevel Caption = 'Todas' diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas index c00780f1..2c9a26f6 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas @@ -63,6 +63,7 @@ type cxGridViewRE: TcxGridDBColumn; cxGridViewREF_CONTRATO: TcxGridDBColumn; cxGridViewTIPO_FACTURA: TcxGridDBColumn; + cxGridViewVENDEDOR: TcxGridDBColumn; procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; out AStyle: TcxStyle); diff --git a/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorController.pas b/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorController.pas index 4b9c1413..a8c500fd 100644 --- a/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorController.pas +++ b/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorController.pas @@ -617,6 +617,8 @@ begin begin ID_EMPRESA := AppFactuGES.EmpresaActiva.ID; USUARIO := AppFactuGES.UsuarioActivo.UserName; + ID_TIENDA := AppFactuGES.TiendaActiva.ID; + TIENDA := AppFactuGES.TiendaActiva.NOMBRE; REFERENCIA := ''; //Para que se asigne una nueva SITUACION := CTE_PENDIENTE; //Una factura nueva debe estar pendiente FECHA_FACTURA := DateOf(Now); diff --git a/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas b/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas index 8b883730..488a1d68 100644 --- a/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas +++ b/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas @@ -468,6 +468,8 @@ begin begin ID_EMPRESA := AppFactuGES.EmpresaActiva.ID; USUARIO := AppFactuGES.UsuarioActivo.UserName; + ID_TIENDA := AppFactuGES.TiendaActiva.ID; + TIENDA := AppFactuGES.TiendaActiva.NOMBRE; FECHA_PRESUPUESTO := DateOf(Now); INCIDENCIAS_ACTIVAS := 0; INCIDENCIASIsNull := True; diff --git a/Source/Servidor/FactuGES_Server.dpr b/Source/Servidor/FactuGES_Server.dpr index 62e66716..fe9dc527 100644 --- a/Source/Servidor/FactuGES_Server.dpr +++ b/Source/Servidor/FactuGES_Server.dpr @@ -130,14 +130,14 @@ uses schArticulosServer_Intf in '..\Modulos\Articulos\Model\schArticulosServer_Intf.pas', schPresupuestosClienteClient_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteClient_Intf.pas', schPresupuestosClienteServer_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteServer_Intf.pas', - schFacturasClienteClient_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteClient_Intf.pas', - schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas', schAlbaranesClienteClient_Intf in '..\Modulos\Albaranes de cliente\Model\schAlbaranesClienteClient_Intf.pas', schAlbaranesClienteServer_Intf in '..\Modulos\Albaranes de cliente\Model\schAlbaranesClienteServer_Intf.pas', schContratosClienteClient_Intf in '..\Modulos\Contratos de cliente\Model\schContratosClienteClient_Intf.pas', schContratosClienteServer_Intf in '..\Modulos\Contratos de cliente\Model\schContratosClienteServer_Intf.pas', schEmpresasClient_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasClient_Intf.pas', - schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas'; + schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas', + schFacturasClienteClient_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteClient_Intf.pas', + schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas'; {$R *.res} {$R ..\Servicios\RODLFile.res} diff --git a/Source/Servidor/FactuGES_Server.dproj b/Source/Servidor/FactuGES_Server.dproj index 13cd9172..fbe038ba 100644 --- a/Source/Servidor/FactuGES_Server.dproj +++ b/Source/Servidor/FactuGES_Server.dproj @@ -1,299 +1,294 @@ - + - - {ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1} - FactuGES_Server.dpr - Debug - AnyCPU - DCC32 - ..\..\Output\Debug\Servidor\FactuGES_Server.exe - - - 7.0 - False - False - 0 - 3 - ..\..\Output\Release\Servidor - RELEASE - - - 7.0 - 3 - ..\..\Output\Debug\Servidor - DEBUG; - True - - - Delphi.Personality - - -FalseTrueFalseTrueFalse2580FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.5.8.0FactuGES (Servidor)2.5.8.0miércoles, 13 de noviembre de 2013 13:58 - - - - - - File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found - FactuGES_Server.dpr - - - - - MainSource - - - - - -
srvEjercicios
- TDataAbstractService -
- - - -
srvEmpresas
- TDARemoteService -
- -
srvProvinciasPoblaciones
- TRORemoteDataModule -
- - - - - - - - - - - -
srvAlbaranesCliente
- TDataAbstractService -
- - - - -
srvAlbaranesProveedor
- TDataAbstractService -
- - - -
srvAlmacenes
- TDARemoteService -
- - - - - - - -
RptComisiones
- TDataModule -
- -
srvComisiones
- TDataAbstractService -
- - - - -
srvContabilidad
- TDataAbstractService -
- - - - - - - -
RptEtiquetasContacto
- TDataModule -
- -
srvContactos
- TDARemoteService -
- - - - -
RptContratosCliente
-
- -
srvContratosCliente
- TDataAbstractService -
- - - - -
RptFacturasCliente
- TDataModule -
- -
srvFacturasCliente
- TDataAbstractService -
- - - - -
RptFacturasProveedor
- TDataModule -
- -
srvFacturasProveedor
- TDataAbstractService -
- - - - - - - -
srvGestorDocumentos
- TDataAbstractService -
- -
srvGestorInformes
- TDataAbstractService -
- - - -
srvHistoricoMovimientos
- TDataAbstractService -
- - - -
srvInventario
- TDataAbstractService -
- - - - -
srvPedidosProveedor
- TDataAbstractService -
- - - - -
RptPresupuestosCliente
-
- -
srvPresupuestosCliente
- TDataAbstractService -
- - - - - -
RptRecibosCliente
- TDataModule -
- -
srvRecibosCliente
- TDataAbstractService -
- - - - - -
RptRecibosProveedor
- TDataModule -
- -
srvRecibosProveedor
- TDataAbstractService -
- - - -
srvReferencias
- TDataAbstractService -
- - - - -
srvRemesasCliente
- TDataAbstractService -
- - - - -
srvRemesasProveedor
- TDataAbstractService -
- - - - - - -
srvUnidadesMedida
- TDataAbstractService -
- - - -
srvConfiguracion
- TDataAbstractService -
- -
frConexionBD
- TFrame -
- -
frConfGeneral
- TFrame -
- -
fConfiguracion
- TForm -
- -
FrameConfiguracion
- TFrame -
- -
srvLogin
- TDARemoteService -
- -
fAcercaDe
-
- -
dmServer
- TDataModule -
- -
fServerForm
-
- - - - - - - - -
+ + {ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1} + FactuGES_Server.dpr + Debug + AnyCPU + DCC32 + ..\..\Output\Debug\Servidor\FactuGES_Server.exe + + + 7.0 + False + False + 0 + 3 + ..\..\Output\Release\Servidor + RELEASE + + + 7.0 + 3 + ..\..\Output\Debug\Servidor + DEBUG; + True + + + Delphi.Personality + + + FalseTrueFalseTrueFalse2580FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.5.8.0FactuGES (Servidor)2.5.8.0miércoles, 13 de noviembre de 2013 13:58 + File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found + FactuGES_Server.dpr + + + + + MainSource + + + + + +
srvEjercicios
+ TDataAbstractService +
+ + + +
srvEmpresas
+ TDARemoteService +
+ +
srvProvinciasPoblaciones
+ TRORemoteDataModule +
+ + + + + + + + + + + +
srvAlbaranesCliente
+ TDataAbstractService +
+ + + + +
srvAlbaranesProveedor
+ TDataAbstractService +
+ + + +
srvAlmacenes
+ TDARemoteService +
+ + + + + + + +
RptComisiones
+ TDataModule +
+ +
srvComisiones
+ TDataAbstractService +
+ + + + +
srvContabilidad
+ TDataAbstractService +
+ + + + + + + +
RptEtiquetasContacto
+ TDataModule +
+ +
srvContactos
+ TDARemoteService +
+ + + + +
RptContratosCliente
+
+ +
srvContratosCliente
+ TDataAbstractService +
+ + + + +
RptFacturasCliente
+ TDataModule +
+ +
srvFacturasCliente
+ TDataAbstractService +
+ + + + +
RptFacturasProveedor
+ TDataModule +
+ +
srvFacturasProveedor
+ TDataAbstractService +
+ + + + + + + +
srvGestorDocumentos
+ TDataAbstractService +
+ +
srvGestorInformes
+ TDataAbstractService +
+ + + +
srvHistoricoMovimientos
+ TDataAbstractService +
+ + + +
srvInventario
+ TDataAbstractService +
+ + + + +
srvPedidosProveedor
+ TDataAbstractService +
+ + + + +
RptPresupuestosCliente
+
+ +
srvPresupuestosCliente
+ TDataAbstractService +
+ + + + + +
RptRecibosCliente
+ TDataModule +
+ +
srvRecibosCliente
+ TDataAbstractService +
+ + + + + +
RptRecibosProveedor
+ TDataModule +
+ +
srvRecibosProveedor
+ TDataAbstractService +
+ + + +
srvReferencias
+ TDataAbstractService +
+ + + + +
srvRemesasCliente
+ TDataAbstractService +
+ + + + +
srvRemesasProveedor
+ TDataAbstractService +
+ + + + + + +
srvUnidadesMedida
+ TDataAbstractService +
+ + + +
srvConfiguracion
+ TDataAbstractService +
+ +
frConexionBD
+ TFrame +
+ +
frConfGeneral
+ TFrame +
+ +
fConfiguracion
+ TForm +
+ +
FrameConfiguracion
+ TFrame +
+ +
srvLogin
+ TDARemoteService +
+ +
fAcercaDe
+
+ +
dmServer
+ TDataModule +
+ +
fServerForm
+
+ + + + + + + + +