Arreglado problema con tipos de IVA en facturas de proveedor.
git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@126 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
parent
c78a51ed53
commit
f9bcbb1b27
@ -936,7 +936,7 @@ begin
|
||||
|
||||
finally
|
||||
AReportController := NIL;
|
||||
ID_Facturas.Free;
|
||||
FreeANDNIL(ID_Facturas);
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -971,7 +971,7 @@ begin
|
||||
|
||||
finally
|
||||
AReportController := NIL;
|
||||
ID_Facturas.Free;
|
||||
FreeANDNIL(ID_Facturas);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -235,14 +235,14 @@ inherited DataModuleFacturasProveedor: TDataModuleFacturasProveedor
|
||||
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
|
||||
LogicalName = 'FacturasProveedor'
|
||||
IndexDefs = <>
|
||||
Left = 216
|
||||
Top = 96
|
||||
Left = 208
|
||||
Top = 32
|
||||
end
|
||||
object ds_FacturasProveedor: TDADataSource
|
||||
DataSet = tbl_FacturasProveedor.Dataset
|
||||
DataTable = tbl_FacturasProveedor
|
||||
Left = 216
|
||||
Top = 48
|
||||
Left = 208
|
||||
Top = 104
|
||||
end
|
||||
object tbl_FacturasProveedor_Detalles: TDAMemDataTable
|
||||
RemoteUpdatesOptions = []
|
||||
@ -345,13 +345,13 @@ inherited DataModuleFacturasProveedor: TDataModuleFacturasProveedor
|
||||
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
|
||||
LogicalName = 'FacturasProveedor_Detalles'
|
||||
IndexDefs = <>
|
||||
Left = 392
|
||||
Top = 88
|
||||
Left = 368
|
||||
Top = 32
|
||||
end
|
||||
object ds_FacturasProveedor_Detalles: TDADataSource
|
||||
DataSet = tbl_FacturasProveedor_Detalles.Dataset
|
||||
DataTable = tbl_FacturasProveedor_Detalles
|
||||
Left = 392
|
||||
Top = 40
|
||||
Left = 368
|
||||
Top = 104
|
||||
end
|
||||
end
|
||||
|
||||
@ -3,9 +3,9 @@ unit uDataModuleFacturasProveedor;
|
||||
interface
|
||||
|
||||
uses
|
||||
SysUtils, Classes, DB, uDAClientDataModule, uDADataTable, uDABINAdapter,
|
||||
SysUtils, Classes, DB, uDADataTable, uDABINAdapter,
|
||||
uDAScriptingProvider, uDACDSDataTable, uROWinInetHttpChannel, uROTypes,
|
||||
uROServiceComponent, uRORemoteService, uROClient, uROBinMessage,
|
||||
uRORemoteService, uROClient, uROBinMessage,
|
||||
uDataModuleBase,
|
||||
uIDataModuleFacturasProveedor, uBizFacturasProveedor, uBizDetallesFacturaProveedor,
|
||||
uDADesigntimeCall, uIDataModuleFacturasProveedorReport, uDARemoteDataAdapter,
|
||||
|
||||
@ -32,10 +32,10 @@
|
||||
<DCC_HppOutput>.\</DCC_HppOutput>
|
||||
<DCC_BplOutput>..\..\..\..\Output\Debug\Cliente</DCC_BplOutput>
|
||||
<DCC_DcpOutput>..\..\Lib</DCC_DcpOutput>
|
||||
<DCC_UnitSearchPath>..\..\..\Lib;..\..\Lib</DCC_UnitSearchPath>
|
||||
<DCC_ResourcePath>..\..\..\Lib;..\..\Lib</DCC_ResourcePath>
|
||||
<DCC_ObjPath>..\..\..\Lib;..\..\Lib</DCC_ObjPath>
|
||||
<DCC_IncludePath>..\..\..\Lib;..\..\Lib</DCC_IncludePath>
|
||||
<DCC_UnitSearchPath>$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;..\..\..\Lib;..\..\Lib</DCC_UnitSearchPath>
|
||||
<DCC_ResourcePath>$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;..\..\..\Lib;..\..\Lib</DCC_ResourcePath>
|
||||
<DCC_ObjPath>$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;..\..\..\Lib;..\..\Lib</DCC_ObjPath>
|
||||
<DCC_IncludePath>$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;..\..\..\Lib;..\..\Lib</DCC_IncludePath>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Delphi.Personality</Borland.Personality>
|
||||
@ -53,22 +53,20 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Excluded_Packages Name="C:\Archivos de programa\RemObjects Software\Pascal Script\Dcu\D10\PascalScript_RO_D10.bpl">RemObjects Pascal Script - RemObjects SDK 3.0 Integration</Excluded_Packages>
|
||||
<Excluded_Packages Name="C:\Archivos de programa\EurekaLog 5\Delphi10\ExceptionExpert10.bpl">EurekaLog 5.1.9</Excluded_Packages>
|
||||
</Excluded_Packages><Source><Source Name="MainSource">FacturasProveedor_model.dpk</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
|
||||
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPSCoreD10.bpl">ExpressPrinting System by Developer Express Inc.</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDS)\bin\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDS)\bin\dclofficexp100.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
</Excluded_Packages><Source><Source Name="MainSource">FacturasProveedor_model.dpk</Source></Source></Delphi.Personality><ModelSupport>False</ModelSupport></BorlandProject></BorlandProject>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
|
||||
<ItemGroup>
|
||||
<DelphiCompile Include="FacturasProveedor_model.dpk">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="..\..\Lib\Base.dcp" />
|
||||
<DCCReference Include="..\..\Lib\Contactos_model.dcp" />
|
||||
<DCCReference Include="..\..\Lib\TiposIVA_controller.dcp" />
|
||||
<DCCReference Include="..\..\Lib\TiposIVA_model.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\Base.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\Contactos_model.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\TiposIVA_controller.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\TiposIVA_model.dcp" />
|
||||
<DCCReference Include="Data\uIDataModuleFacturasProveedor.pas" />
|
||||
<DCCReference Include="Data\uIDataModuleFacturasProveedorReport.pas" />
|
||||
<DCCReference Include="schFacturasProveedorClient_Intf.pas" />
|
||||
@ -78,7 +76,6 @@
|
||||
<None Include="ModelSupport_FacturasProveedor_model\default.txaPackage" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
<!-- EurekaLog First Line
|
||||
[Exception Log]
|
||||
EurekaLog Version=6006
|
||||
|
||||
@ -1,2 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<TgConfig Version="3" SubLevelDisabled="False" />
|
||||
@ -3,15 +3,15 @@ unit schFacturasProveedorClient_Intf;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, DB, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf;
|
||||
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_DarReferencia = '{2D20E4FE-0D36-4FAD-97D5-B2DB2E68DFDC}';
|
||||
RID_FacturasProveedor = '{633FE4C4-C35E-42BE-B796-5AED0E1A22BE}';
|
||||
RID_FacturasProveedor_Detalles = '{E6326236-9200-46E8-95A0-A2F8FF9CC4E2}';
|
||||
RID_DarReferencia = '{440AC6D1-9E17-40B6-9745-334B94B470ED}';
|
||||
RID_FacturasProveedor = '{92896B8F-23AC-4B75-AE17-F7C3EC6FD4AD}';
|
||||
RID_FacturasProveedor_Detalles = '{B6970553-C7DC-4FC5-B5C8-35C5B2F72F2C}';
|
||||
|
||||
{ Data table names }
|
||||
nme_DarReferencia = 'DarReferencia';
|
||||
@ -125,7 +125,7 @@ const
|
||||
type
|
||||
{ IDarReferencia }
|
||||
IDarReferencia = interface(IDAStronglyTypedDataTable)
|
||||
['{9968E89F-9FA7-4C1B-87F0-185E647FA3EF}']
|
||||
['{84AFFCF1-2652-4658-A6CE-FF7D6E77D4D5}']
|
||||
{ Property getters and setters }
|
||||
function GetVALORValue: String;
|
||||
procedure SetVALORValue(const aValue: String);
|
||||
@ -139,7 +139,7 @@ type
|
||||
end;
|
||||
|
||||
{ TDarReferenciaDataTableRules }
|
||||
TDarReferenciaDataTableRules = class(TDADataTableRules, IDarReferencia)
|
||||
TDarReferenciaDataTableRules = class(TIntfObjectDADataTableRules, IDarReferencia)
|
||||
private
|
||||
protected
|
||||
{ Property getters and setters }
|
||||
@ -160,7 +160,7 @@ type
|
||||
|
||||
{ IFacturasProveedor }
|
||||
IFacturasProveedor = interface(IDAStronglyTypedDataTable)
|
||||
['{4DA09039-4EBF-40D5-85F7-8CC58CB881A7}']
|
||||
['{5DB10010-225C-48A2-8CA8-E39EB69144AA}']
|
||||
{ Property getters and setters }
|
||||
function GetIDValue: Integer;
|
||||
procedure SetIDValue(const aValue: Integer);
|
||||
@ -353,7 +353,7 @@ type
|
||||
end;
|
||||
|
||||
{ TFacturasProveedorDataTableRules }
|
||||
TFacturasProveedorDataTableRules = class(TDADataTableRules, IFacturasProveedor)
|
||||
TFacturasProveedorDataTableRules = class(TIntfObjectDADataTableRules, IFacturasProveedor)
|
||||
private
|
||||
f_OBSERVACIONES: IROStrings;
|
||||
procedure OBSERVACIONES_OnChange(Sender: TObject);
|
||||
@ -555,7 +555,7 @@ type
|
||||
|
||||
{ IFacturasProveedor_Detalles }
|
||||
IFacturasProveedor_Detalles = interface(IDAStronglyTypedDataTable)
|
||||
['{653B610A-A413-48D5-97C4-A6BFE55F378A}']
|
||||
['{E4877BEF-E6FF-4E94-9D41-E49DC0F8E5AB}']
|
||||
{ Property getters and setters }
|
||||
function GetIDValue: Integer;
|
||||
procedure SetIDValue(const aValue: Integer);
|
||||
@ -647,7 +647,7 @@ type
|
||||
end;
|
||||
|
||||
{ TFacturasProveedor_DetallesDataTableRules }
|
||||
TFacturasProveedor_DetallesDataTableRules = class(TDADataTableRules, IFacturasProveedor_Detalles)
|
||||
TFacturasProveedor_DetallesDataTableRules = class(TIntfObjectDADataTableRules, IFacturasProveedor_Detalles)
|
||||
private
|
||||
protected
|
||||
{ Property getters and setters }
|
||||
|
||||
@ -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_DarReferenciaDelta = '{A7A756C6-B082-46D7-825F-60D9E4F96393}';
|
||||
RID_FacturasProveedorDelta = '{1EEB760A-51A9-4DF6-A426-1CC7959C83AC}';
|
||||
RID_FacturasProveedor_DetallesDelta = '{6F45C011-FBB1-4ED0-9638-F24FBCF9ECC9}';
|
||||
RID_DarReferenciaDelta = '{6B3A9554-622A-4013-B80F-46FDFF0FC88C}';
|
||||
RID_FacturasProveedorDelta = '{44B6D1A4-7B8E-4BAF-8AD7-2923A742DE92}';
|
||||
RID_FacturasProveedor_DetallesDelta = '{C0ABF642-4C9B-42DC-9D40-5A3BE656B55C}';
|
||||
|
||||
type
|
||||
{ IDarReferenciaDelta }
|
||||
IDarReferenciaDelta = interface(IDarReferencia)
|
||||
['{A7A756C6-B082-46D7-825F-60D9E4F96393}']
|
||||
['{6B3A9554-622A-4013-B80F-46FDFF0FC88C}']
|
||||
{ Property getters and setters }
|
||||
function GetOldVALORValue : String;
|
||||
|
||||
@ -50,7 +50,7 @@ type
|
||||
|
||||
{ IFacturasProveedorDelta }
|
||||
IFacturasProveedorDelta = interface(IFacturasProveedor)
|
||||
['{1EEB760A-51A9-4DF6-A426-1CC7959C83AC}']
|
||||
['{44B6D1A4-7B8E-4BAF-8AD7-2923A742DE92}']
|
||||
{ Property getters and setters }
|
||||
function GetOldIDValue : Integer;
|
||||
function GetOldID_EMPRESAValue : Integer;
|
||||
@ -445,7 +445,7 @@ type
|
||||
|
||||
{ IFacturasProveedor_DetallesDelta }
|
||||
IFacturasProveedor_DetallesDelta = interface(IFacturasProveedor_Detalles)
|
||||
['{6F45C011-FBB1-4ED0-9638-F24FBCF9ECC9}']
|
||||
['{C0ABF642-4C9B-42DC-9D40-5A3BE656B55C}']
|
||||
{ Property getters and setters }
|
||||
function GetOldIDValue : Integer;
|
||||
function GetOldID_FACTURAValue : Integer;
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
object srvFacturasProveedor: TsrvFacturasProveedor
|
||||
OldCreateOrder = True
|
||||
OnCreate = DARemoteServiceCreate
|
||||
RequiresSession = True
|
||||
SessionManager = dmServer.SessionManager
|
||||
ConnectionName = 'IBX'
|
||||
ServiceSchema = schFacturasProveedor
|
||||
@ -361,7 +360,6 @@ object srvFacturasProveedor: TsrvFacturasProveedor
|
||||
Statements = <
|
||||
item
|
||||
Connection = 'IBX'
|
||||
TargetTable = 'FACTURAS_PROVEEDOR_DETALLES'
|
||||
SQL =
|
||||
'SELECT'#10' FACTURAS_PROVEEDOR_DETALLES.ID, FACTURAS_PROVEEDOR_DE' +
|
||||
'TALLES.ID_FACTURA,'#10' FACTURAS_PROVEEDOR_DETALLES.POSICION, FAC' +
|
||||
@ -372,9 +370,9 @@ object srvFacturasProveedor: TsrvFacturasProveedor
|
||||
'FACTURAS_PROVEEDOR_DETALLES.ID_ARTICULO, FACTURAS_PROVEEDOR_DETA' +
|
||||
'LLES.DESCUENTO,'#10' FACTURAS_PROVEEDOR_DETALLES.IMPORTE_PORTE,'#10' ' +
|
||||
' ARTICULOS.REFERENCIA, ARTICULOS.REFERENCIA_PROV as REFERENCIA' +
|
||||
'_PROVEEDOR'#10#10'FROM FACTURAS_PROVEEDOR_DETALLES'#10'LEFT JOIN ARTICULOS' +
|
||||
' ON FACTURAS_PROVEEDOR_DETALLES.ID_ARTICULO = ARTICULOS.ID'#10'WHERE' +
|
||||
' {where}'#10'ORDER BY POSICION;'#10
|
||||
'_PROVEEDOR'#10'FROM FACTURAS_PROVEEDOR_DETALLES'#10'LEFT JOIN ARTICULOS ' +
|
||||
'ON FACTURAS_PROVEEDOR_DETALLES.ID_ARTICULO = ARTICULOS.ID'#10'WHERE ' +
|
||||
'{where}'#10'ORDER BY POSICION;'#10
|
||||
StatementType = stSQL
|
||||
ColumnMappings = <
|
||||
item
|
||||
@ -427,13 +425,11 @@ object srvFacturasProveedor: TsrvFacturasProveedor
|
||||
end
|
||||
item
|
||||
DatasetField = 'REFERENCIA'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'REFERENCIA'
|
||||
TableField = 'REFERENCIA'
|
||||
end
|
||||
item
|
||||
DatasetField = 'REFERENCIA_PROVEEDOR'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'REFERENCIA_PROVEEDOR'
|
||||
TableField = 'REFERENCIA_PROVEEDOR'
|
||||
end>
|
||||
end>
|
||||
Name = 'FacturasProveedor_Detalles'
|
||||
@ -703,7 +699,7 @@ object srvFacturasProveedor: TsrvFacturasProveedor
|
||||
TargetTable = 'FACTURAS_PROVEEDOR'
|
||||
SQL =
|
||||
'DELETE '#10' FROM'#10' FACTURAS_PROVEEDOR'#10' WHERE'#10' (ID = :OLD_ID)' +
|
||||
#10
|
||||
#10#10
|
||||
StatementType = stSQL
|
||||
ColumnMappings = <>
|
||||
end>
|
||||
|
||||
Binary file not shown.
@ -11,7 +11,7 @@ uses
|
||||
uCustomView, uViewBase, uViewTotales,
|
||||
StdCtrls, pngimage, AppEvnts, JvComponentBase,
|
||||
uBizFacturasProveedor, uIEditorFacturaProveedor, uFacturasProveedorController, uViewDetallesBase,
|
||||
dxLayoutLookAndFeels, JvExComCtrls, JvStatusBar,
|
||||
dxLayoutLookAndFeels, JvExComCtrls, JvStatusBar, uBizTiposIVA,
|
||||
uViewDetallesDTO, uViewDetallesArticulos, uTiposIVAController,
|
||||
uViewDetallesFacturaProveedor, uViewFacturaProveedor, uDAInterfaces;
|
||||
|
||||
@ -45,6 +45,7 @@ type
|
||||
FFactura: IBizFacturaProveedor;
|
||||
FViewFactura: IViewFacturaProveedor;
|
||||
FTiposIVAController : ITiposIVAController;
|
||||
FTiposIVA: IBizTipoIVA;
|
||||
function GetController : IFacturasProveedorController;
|
||||
procedure SetController (const Value : IFacturasProveedorController);
|
||||
function GetFactura: IBizFacturaProveedor;
|
||||
@ -74,7 +75,7 @@ implementation
|
||||
{$R *.dfm}
|
||||
|
||||
uses
|
||||
cxDBEdit, uBizContactos, uDataModuleUsuarios, cxControls, uBizTiposIVA,
|
||||
cxDBEdit, uBizContactos, uDataModuleUsuarios, cxControls,
|
||||
uDetallesFacturaProveedorController, uDialogUtils, uDataTableUtils;
|
||||
// uGenerarAlbaranesProvFacProvUtils;
|
||||
|
||||
@ -99,13 +100,15 @@ begin
|
||||
dsDataTable.DataTable := NIL;
|
||||
frViewTotales1.DADataSource.DataTable := NIL;
|
||||
|
||||
FTiposIVA := NIL;
|
||||
FTiposIVAController := Nil;
|
||||
FController := NIL;
|
||||
FViewFactura := NIL;
|
||||
FFactura := NIL;
|
||||
Factura := NIL;
|
||||
end;
|
||||
|
||||
destructor TfEditorFacturaProveedor.Destroy;
|
||||
begin
|
||||
FTiposIVAController := NIL;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
@ -164,7 +167,7 @@ end;
|
||||
procedure TfEditorFacturaProveedor.frViewTotales1bTiposIVAClick(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
FTiposIVAController.VerTodos((frViewTotales1.dsTiposIVA.DataTable) as IBizTipoIVA);
|
||||
FTiposIVAController.VerTodos(FTiposIVA);
|
||||
end;
|
||||
|
||||
procedure TfEditorFacturaProveedor.frViewTotales1cbRecargoEquivalenciaPropertiesEditValueChanged(
|
||||
@ -376,10 +379,12 @@ begin
|
||||
if Assigned(FFactura) then
|
||||
begin
|
||||
dsDataTable.DataTable := FFactura.DataTable;
|
||||
|
||||
frViewTotales1.DADataSource.DataTable := FFactura.DataTable;
|
||||
|
||||
frViewTotales1.dsTiposIVA.DataTable := FTiposIVAController.BuscarTodos.DataTable;
|
||||
frViewTotales1.dsTiposIVA.DataTable.Active := True;
|
||||
FTiposIVA := FTiposIVAController.BuscarTodos;
|
||||
frViewTotales1.dsTiposIVA.DataTable := FTiposIVA.DataTable;
|
||||
FTiposIVA.DataTable.Active := True;
|
||||
|
||||
if Assigned(FViewFactura) then
|
||||
begin
|
||||
|
||||
Loading…
Reference in New Issue
Block a user