Arreglo de ordenes de devolución para que se tenga en cuenta el campo tipo y no el importe total del albaran de devolucion

git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@408 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
roberto 2008-06-02 16:05:14 +00:00
parent 5190059f9c
commit d0da2294af
13 changed files with 224 additions and 251 deletions

View File

@ -53,57 +53,57 @@
<DelphiCompile Include="Base.dpk">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\Modulos\Presupuestos de cliente\adortl.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\cxDataD11.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\cxEditorsD11.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\cxExportD11.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\cxExtEditorsD11.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\cxGridD11.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\cxIntl6D11.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\cxIntlPrintSys3D11.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\cxLibraryD11.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\cxPageControlD11.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\DataAbstract_Core_D11.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\dbrtl.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\dclIndyCore.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\designide.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\dsnap.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\dxGDIPlusD11.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\dxPSCoreD11.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\dxThemeD11.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\GUISDK_D11.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\IndyCore.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\IndyProtocols.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\IndySystem.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\Jcl.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\JclVcl.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\JSDialog100.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\JvCmpD11R.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\JvCoreD11R.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\JvCtrlsD11R.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\JvDlgsD11R.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\JvMMD11R.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\JvNetD11R.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\JvPageCompsD11R.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\JvStdCtrlsD11R.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\JvSystemD11R.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\pckMD5.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\pckUCDataConnector.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\pckUserControl_RT.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\PngComponentsD10.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\PNG_D10.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\RemObjects_Core_D11.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\RemObjects_Indy_D11.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\rtl.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\TB2k_D10.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\tbx_d10.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\vcl.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\vclactnband.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\vcldb.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\vcljpg.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\VclSmp.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\vclx.dcp" />
<DCCReference Include="..\Modulos\Presupuestos de cliente\xmlrtl.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\adortl.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\cxDataD11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\cxEditorsD11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\cxExportD11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\cxExtEditorsD11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\cxGridD11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\cxIntl6D11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\cxIntlPrintSys3D11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\cxLibraryD11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\cxPageControlD11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\DataAbstract_Core_D11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\dbrtl.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\dclIndyCore.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\designide.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\dsnap.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\dxGDIPlusD11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\dxPSCoreD11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\dxThemeD11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\GUISDK_D11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\IndyCore.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\IndyProtocols.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\IndySystem.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\Jcl.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\JclVcl.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\JSDialog100.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\JvCmpD11R.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\JvCoreD11R.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\JvCtrlsD11R.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\JvDlgsD11R.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\JvMMD11R.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\JvNetD11R.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\JvPageCompsD11R.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\JvStdCtrlsD11R.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\JvSystemD11R.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\pckMD5.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\pckUCDataConnector.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\pckUserControl_RT.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\PngComponentsD10.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\PNG_D10.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\RemObjects_Core_D11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\RemObjects_Indy_D11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\rtl.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\TB2k_D10.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\tbx_d10.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\vcl.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\vclactnband.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\vcldb.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\vcljpg.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\VclSmp.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\vclx.dcp" />
<DCCReference Include="..\Modulos\Albaranes de proveedor\xmlrtl.dcp" />
<DCCReference Include="..\Servicios\FactuGES_Intf.pas" />
<DCCReference Include="Conexion\uConfigurarConexion.pas">
<Form>fConfigurarConexion</Form>

View File

@ -197,8 +197,8 @@ begin
with Result.DataTable.DynamicWhere do
begin
// (IMPORTE_TOTAL < 0)
Condicion := NewBinaryExpression(NewField('', fld_AlbaranesClienteIMPORTE_TOTAL), NewConstant(0, datCurrency), dboLess);
// (TIPO = Devolucion)
Condicion := NewBinaryExpression(NewField('', fld_AlbaranesClienteTIPO), NewConstant(CTE_TIPO_ALBARAN_DEV, datString), dboEqual);
if IsEmpty then
Expression := Condicion
@ -221,8 +221,8 @@ begin
with Result.DataTable.DynamicWhere do
begin
// (IMPORTE_TOTAL >= 0)
Condicion := NewBinaryExpression(NewField('', fld_AlbaranesClienteIMPORTE_TOTAL), NewConstant(0, datCurrency), dboGreaterOrEqual);
// (TIPO >= ALBARAN)
Condicion := NewBinaryExpression(NewField('', fld_AlbaranesClienteTIPO), NewConstant(CTE_TIPO_ALBARAN, datString), dboEqual);
if IsEmpty then
Expression := Condicion

View File

@ -160,6 +160,10 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente
object pagContenido: TTabSheet
Caption = 'Contenido'
ImageIndex = 1
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
inline frViewDetallesAlbaranCliente1: TfrViewDetallesAlbaranCliente
Left = 0
Top = 0
@ -192,14 +196,13 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente
ExplicitLeft = 278
ExplicitTop = 0
end
inherited ToolButton14: TToolButton
inherited ToolButton14: TToolButton [4]
Left = 334
Top = 0
Wrap = False
ExplicitLeft = 334
ExplicitTop = 0
end
inherited FontName: TJvFontComboBox
inherited FontName: TJvFontComboBox [5]
Left = 399
Top = 0
ExplicitLeft = 399
@ -211,61 +214,62 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente
ExplicitLeft = 544
ExplicitTop = 0
end
inherited ToolButton13: TToolButton [7]
inherited UpDown1: TUpDown
Left = 586
Top = 0
ExplicitLeft = 586
ExplicitTop = 0
end
inherited ToolButton13: TToolButton
Left = 0
Top = 0
Wrap = True
ExplicitLeft = 0
ExplicitTop = 0
ExplicitHeight = 30
ExplicitHeight = 27
end
inherited UpDown1: TUpDown [8]
inherited ToolButton6: TToolButton [9]
Left = 0
Top = 30
Top = 27
ExplicitLeft = 0
ExplicitTop = 30
ExplicitTop = 27
end
inherited ToolButton6: TToolButton
Left = 17
Top = 30
ExplicitLeft = 17
ExplicitTop = 30
inherited ToolButton7: TToolButton [10]
Left = 66
Top = 27
ExplicitLeft = 66
ExplicitTop = 27
end
inherited ToolButton7: TToolButton
Left = 83
Top = 30
ExplicitLeft = 83
ExplicitTop = 30
inherited ToolButton8: TToolButton [11]
Left = 133
Top = 27
ExplicitLeft = 133
ExplicitTop = 27
end
inherited ToolButton8: TToolButton
Left = 150
Top = 30
ExplicitLeft = 150
ExplicitTop = 30
inherited ToolButton12: TToolButton [12]
Left = 216
Top = 27
ExplicitLeft = 216
ExplicitTop = 27
ExplicitHeight = 22
end
inherited ToolButton12: TToolButton
Left = 233
Top = 30
ExplicitLeft = 233
ExplicitTop = 30
inherited ToolButton9: TToolButton [13]
Left = 224
Top = 27
ExplicitLeft = 224
ExplicitTop = 27
end
inherited ToolButton9: TToolButton
Left = 241
Top = 30
ExplicitLeft = 241
ExplicitTop = 30
inherited ToolButton10: TToolButton [14]
Left = 369
Top = 27
ExplicitLeft = 369
ExplicitTop = 27
end
inherited ToolButton10: TToolButton
Left = 386
Top = 30
ExplicitLeft = 386
ExplicitTop = 30
end
inherited ToolButton11: TToolButton
Left = 511
Top = 30
ExplicitLeft = 511
ExplicitTop = 30
inherited ToolButton11: TToolButton [15]
Left = 494
Top = 27
ExplicitLeft = 494
ExplicitTop = 27
end
end
inherited cxGrid: TcxGrid
@ -285,11 +289,24 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente
ExplicitWidth = 626
end
end
inherited cxGridPopupMenu: TcxGridPopupMenu
PopupMenus = <
item
GridView = frViewDetallesAlbaranCliente1.cxGridView
HitTypes = [gvhtNone, gvhtCell, gvhtRecord, gvhtRowIndicator]
Index = 0
PopupMenu = frViewDetallesAlbaranCliente1.GridGeneralPopupMenu
end>
end
end
end
object pagInicidencias: TTabSheet
Caption = 'Incidencias'
ImageIndex = 2
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
inline frViewIncidenciasCli: TfrViewIncidencias
Left = 0
Top = 0
@ -548,6 +565,7 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente
ExplicitLeft = 93
ExplicitTop = 65
ExplicitWidth = 259
ExplicitHeight = 0
Width = 259
end
inherited dxLayoutControl1Group_Root: TdxLayoutGroup

View File

@ -43,97 +43,51 @@ inherited fEditorAlbaranDevCliente: TfEditorAlbaranDevCliente
ExplicitHeight = 378
inherited frViewDetallesAlbaranCliente1: TfrViewDetallesAlbaranCliente
inherited ToolBar1: TToolBar
Height = 51
ExplicitHeight = 51
inherited ToolButton4: TToolButton
Wrap = False
end
inherited ToolButton14: TToolButton
Left = 334
Top = 0
ExplicitLeft = 334
ExplicitTop = 0
end
inherited FontName: TJvFontComboBox
Left = 399
Top = 0
ExplicitLeft = 399
ExplicitTop = 0
end
inherited FontSize: TEdit
Left = 544
Top = 0
Width = 58
ExplicitLeft = 544
ExplicitTop = 0
ExplicitWidth = 58
end
inherited ToolButton13: TToolButton [7]
inherited UpDown1: TUpDown
Left = 602
ExplicitLeft = 602
end
inherited ToolButton9: TToolButton [9]
Left = 0
Top = 0
Wrap = True
ExplicitLeft = 0
ExplicitTop = 0
ExplicitHeight = 30
end
inherited UpDown1: TUpDown [8]
Left = 0
Top = 30
ExplicitLeft = 0
ExplicitTop = 30
inherited ToolButton12: TToolButton [10]
Left = 145
ExplicitLeft = 145
end
inherited ToolButton6: TToolButton
Left = 17
Top = 30
ExplicitLeft = 17
ExplicitTop = 30
inherited ToolButton6: TToolButton [11]
Left = 153
ExplicitLeft = 153
end
inherited ToolButton7: TToolButton
Left = 83
Top = 30
ExplicitLeft = 83
ExplicitTop = 30
inherited ToolButton8: TToolButton [12]
Left = 219
ExplicitLeft = 219
end
inherited ToolButton8: TToolButton
Left = 150
Top = 30
ExplicitLeft = 150
ExplicitTop = 30
inherited ToolButton10: TToolButton [13]
Left = 302
ExplicitLeft = 302
end
inherited ToolButton12: TToolButton
Left = 233
Top = 30
ExplicitLeft = 233
ExplicitTop = 30
inherited ToolButton11: TToolButton [14]
Left = 427
ExplicitLeft = 427
end
inherited ToolButton9: TToolButton
Left = 241
Top = 30
ExplicitLeft = 241
ExplicitTop = 30
end
inherited ToolButton10: TToolButton
Left = 386
Top = 30
ExplicitLeft = 386
ExplicitTop = 30
end
inherited ToolButton11: TToolButton
Left = 511
Top = 30
ExplicitLeft = 511
ExplicitTop = 30
inherited ToolButton7: TToolButton [15]
Left = 568
ExplicitLeft = 568
end
end
inherited cxGrid: TcxGrid
Top = 77
Height = 301
ExplicitTop = 77
ExplicitHeight = 301
end
inherited TBXDock1: TTBXDock
Top = 51
ExplicitWidth = 751
inherited cxGridPopupMenu: TcxGridPopupMenu
PopupMenus = <
item
GridView = frViewDetallesAlbaranCliente1.cxGridView
HitTypes = [gvhtNone, gvhtCell, gvhtRecord, gvhtRowIndicator]
Index = 0
PopupMenu = frViewDetallesAlbaranCliente1.GridGeneralPopupMenu
end>
end
end
end
@ -143,9 +97,6 @@ inherited fEditorAlbaranDevCliente: TfEditorAlbaranDevCliente
ExplicitWidth = 751
ExplicitHeight = 378
inherited frViewIncidenciasCli: TfrViewIncidencias
inherited pnlSup: TPanel
ExplicitWidth = 751
end
inherited GroupBox1: TGroupBox
inherited eIncidencias: TcxDBMemo
ExplicitWidth = 726
@ -160,20 +111,14 @@ inherited fEditorAlbaranDevCliente: TfEditorAlbaranDevCliente
inherited frViewTotales1: TfrViewTotales
inherited dxLayoutControl1: TdxLayoutControl
LookAndFeel = dxLayoutOfficeLookAndFeel1
inherited Bevel1: TBevel
Width = 73
ExplicitWidth = 73
end
inherited Bevel3: TBevel
Left = 331
Height = 54
ExplicitLeft = 331
ExplicitHeight = 54
Left = 351
ExplicitLeft = 351
end
inherited Bevel4: TBevel
Left = 447
Left = 467
Width = 285
ExplicitLeft = 447
ExplicitLeft = 467
ExplicitWidth = 285
end
inherited ImporteDto: TcxDBCurrencyEdit
@ -186,24 +131,24 @@ inherited fEditorAlbaranDevCliente: TfEditorAlbaranDevCliente
Width = 151
end
inherited ImporteIVA: TcxDBCurrencyEdit
Left = 518
Left = 538
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 518
ExplicitLeft = 538
ExplicitWidth = 219
Width = 219
end
inherited ImporteTotal: TcxDBCurrencyEdit
Left = 448
Left = 468
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 448
ExplicitLeft = 468
ExplicitWidth = 289
Width = 289
end
@ -215,42 +160,42 @@ inherited fEditorAlbaranDevCliente: TfEditorAlbaranDevCliente
StyleHot.LookAndFeel.SkinName = ''
end
inherited edtIVA: TcxDBSpinEdit
Left = 447
Left = 467
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 447
ExplicitLeft = 467
end
inherited ImporteBase: TcxDBCurrencyEdit
Left = 447
Left = 467
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 447
ExplicitLeft = 467
ExplicitWidth = 290
Width = 290
end
inherited edtRE: TcxDBSpinEdit
Left = 447
Left = 467
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 447
ExplicitLeft = 467
end
inherited ImporteRE: TcxDBCurrencyEdit
Left = 518
Left = 538
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 518
ExplicitLeft = 538
ExplicitWidth = 219
Width = 219
end
@ -281,8 +226,8 @@ inherited fEditorAlbaranDevCliente: TfEditorAlbaranDevCliente
Width = 84
end
inherited bTiposIVA: TButton
Left = 183
ExplicitLeft = 183
Left = 203
ExplicitLeft = 203
end
inherited cbRecargoEquivalencia: TcxDBCheckBox
Style.LookAndFeel.SkinName = ''
@ -290,6 +235,7 @@ inherited fEditorAlbaranDevCliente: TfEditorAlbaranDevCliente
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 222
ExplicitHeight = 21
Width = 222
end
inherited dxLayoutControl1Group_Root: TdxLayoutGroup

View File

@ -377,8 +377,8 @@ begin
with Result.DataTable.DynamicWhere do
begin
// (IMPORTE_TOTAL < 0)
Condicion := NewBinaryExpression(NewField('', fld_AlbaranesProveedorIMPORTE_TOTAL), NewConstant(0, datCurrency), dboLess);
// (TIPO = DEVOLUCION)
Condicion := NewBinaryExpression(NewField('', fld_AlbaranesProveedorTIPO), NewConstant(CTE_TIPO_ALBARAN_DEV, datString), dboEqual);
if IsEmpty then
Expression := Condicion
@ -400,8 +400,8 @@ begin
with Result.DataTable.DynamicWhere do
begin
// (IMPORTE_TOTAL >= 0)
Condicion := NewBinaryExpression(NewField('', fld_AlbaranesProveedorIMPORTE_TOTAL), NewConstant(0, datCurrency), dboGreaterOrEqual);
// (TIPO = ALBARAN)
Condicion := NewBinaryExpression(NewField('', fld_AlbaranesProveedorTIPO), NewConstant(CTE_TIPO_ALBARAN, datString), dboEqual);
if IsEmpty then
Expression := Condicion
@ -585,7 +585,7 @@ begin
//En caso de ser una orden de devolución no podra tener un importe total positivo
if (AAlbaran.TIPO = CTE_TIPO_ALBARAN_DEV) then
begin
if (AAlbaran.IMPORTE_TOTAL >= 0) then
if (AAlbaran.IMPORTE_TOTAL > 0) then
raise Exception.Create('Una orden de devolución no puede tener un importe total positivo');
//Una orden de devolución debe tener relleno el almacén de salida de material

View File

@ -9,8 +9,8 @@ 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_AlbaranesProveedor = '{FC61975A-BCE3-485D-9533-C8B3CAA1270B}';
RID_AlbaranesProveedor_Detalles = '{B073AED4-CFD3-4196-9729-E76F535E4DAA}';
RID_AlbaranesProveedor = '{9D3B6136-5028-420C-9E17-EA1818B7411C}';
RID_AlbaranesProveedor_Detalles = '{1D79C6CB-2A51-466F-A598-25DC32A87422}';
{ Data table names }
nme_AlbaranesProveedor = 'AlbaranesProveedor';
@ -129,7 +129,7 @@ const
type
{ IAlbaranesProveedor }
IAlbaranesProveedor = interface(IDAStronglyTypedDataTable)
['{3C2C70AF-29CE-4225-96F2-6D3307841C22}']
['{5D42B721-F52B-45FB-B58C-0D40EE691467}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -584,7 +584,7 @@ type
{ IAlbaranesProveedor_Detalles }
IAlbaranesProveedor_Detalles = interface(IDAStronglyTypedDataTable)
['{C0CA4C98-111E-4203-BC3F-5FEE1E48BDF3}']
['{DE37354A-12D5-4AA5-ACB5-02F30BE8C537}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);

View File

@ -9,13 +9,13 @@ 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_AlbaranesProveedorDelta = '{690BA5DB-9CB6-489D-9982-B1AE06408FB1}';
RID_AlbaranesProveedor_DetallesDelta = '{5432057E-0CF5-4D80-8595-C14DA2C23AD7}';
RID_AlbaranesProveedorDelta = '{6144F95B-9D3E-4D8A-983B-515B64FC9E55}';
RID_AlbaranesProveedor_DetallesDelta = '{26F798F2-F1D8-4FB0-9302-1AEDC4F8D7A0}';
type
{ IAlbaranesProveedorDelta }
IAlbaranesProveedorDelta = interface(IAlbaranesProveedor)
['{690BA5DB-9CB6-489D-9982-B1AE06408FB1}']
['{6144F95B-9D3E-4D8A-983B-515B64FC9E55}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@ -471,7 +471,7 @@ type
{ IAlbaranesProveedor_DetallesDelta }
IAlbaranesProveedor_DetallesDelta = interface(IAlbaranesProveedor_Detalles)
['{5432057E-0CF5-4D80-8595-C14DA2C23AD7}']
['{26F798F2-F1D8-4FB0-9302-1AEDC4F8D7A0}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_ALBARANValue : Integer;

View File

@ -568,6 +568,10 @@ object srvAlbaranesProveedor: TsrvAlbaranesProveedor
Name = 'ID_FACTURA'
Value = ''
end
item
Name = 'TIPO'
Value = ''
end
item
Name = 'REFERENCIA'
Value = ''
@ -675,23 +679,23 @@ object srvAlbaranesProveedor: TsrvAlbaranesProveedor
SQL =
'INSERT INTO ALBARANES_PROVEEDOR ('#10' ID,'#10' ID_EMPRESA,'#10' ID' +
'_PROVEEDOR,'#10' FECHA_ALBARAN,'#10' ID_PEDIDO,'#10' ID_FACTURA,'#10' ' +
' REFERENCIA,'#10' REFERENCIA_PROVEEDOR,'#10' REF_FACTURA_PROV,'#10' ' +
' CALLE,'#10' CODIGO_POSTAL,'#10' POBLACION,'#10' PROVINCIA,'#10' PE' +
'RSONA_CONTACTO,'#10' TELEFONO,'#10' BASE_IMPONIBLE,'#10' DESCUENTO,' +
#10' IMPORTE_DESCUENTO,'#10' IVA,'#10' IMPORTE_IVA,'#10' IMPORTE_TO' +
'TAL,'#10' OBSERVACIONES,'#10' INCIDENCIAS,'#10' INCIDENCIAS_ACTIVAS' +
','#10' FECHA_ALTA,'#10' FECHA_MODIFICACION,'#10' USUARIO,'#10' ID_AL' +
'MACEN,'#10' ID_FORMA_PAGO,'#10' IMPORTE_NETO,'#10' IMPORTE_PORTE)'#10' ' +
' VALUES ('#10' :ID,'#10' :ID_EMPRESA,'#10' :ID_PROVEEDOR,'#10' :FECH' +
'A_ALBARAN,'#10' :ID_PEDIDO,'#10' :ID_FACTURA,'#10' :REFERENCIA,'#10' ' +
' :REFERENCIA_PROVEEDOR,'#10' :REF_FACTURA_PROV,'#10' :CALLE,'#10' :' +
'CODIGO_POSTAL,'#10' :POBLACION,'#10' :PROVINCIA,'#10' :PERSONA_CONT' +
'ACTO,'#10' :TELEFONO,'#10' :BASE_IMPONIBLE,'#10' :DESCUENTO,'#10' :I' +
'MPORTE_DESCUENTO,'#10' :IVA,'#10' :IMPORTE_IVA,'#10' :IMPORTE_TOTAL' +
','#10' :OBSERVACIONES,'#10' :INCIDENCIAS,'#10' :INCIDENCIAS_ACTIVAS' +
','#10' :FECHA_ALTA,'#10' :FECHA_MODIFICACION,'#10' :USUARIO,'#10' :I' +
'D_ALMACEN,'#10' :ID_FORMA_PAGO,'#10' :IMPORTE_NETO,'#10' :IMPORTE_P' +
'ORTE);'
' TIPO,'#10' REFERENCIA,'#10' REFERENCIA_PROVEEDOR,'#10' REF_FACTUR' +
'A_PROV,'#10' CALLE,'#10' CODIGO_POSTAL,'#10' POBLACION,'#10' PROVINC' +
'IA,'#10' PERSONA_CONTACTO,'#10' TELEFONO,'#10' BASE_IMPONIBLE,'#10' ' +
'DESCUENTO,'#10' IMPORTE_DESCUENTO,'#10' IVA,'#10' IMPORTE_IVA,'#10' ' +
'IMPORTE_TOTAL,'#10' OBSERVACIONES,'#10' INCIDENCIAS,'#10' INCIDENCI' +
'AS_ACTIVAS,'#10' FECHA_ALTA,'#10' FECHA_MODIFICACION,'#10' USUARIO,' +
#10' ID_ALMACEN,'#10' ID_FORMA_PAGO,'#10' IMPORTE_NETO,'#10' IMPORT' +
'E_PORTE)'#10' VALUES ('#10' :ID,'#10' :ID_EMPRESA,'#10' :ID_PROVEEDOR,' +
#10' :FECHA_ALBARAN,'#10' :ID_PEDIDO,'#10' :ID_FACTURA,'#10' :TIPO,' +
#10' :REFERENCIA,'#10' :REFERENCIA_PROVEEDOR,'#10' :REF_FACTURA_PR' +
'OV,'#10' :CALLE,'#10' :CODIGO_POSTAL,'#10' :POBLACION,'#10' :PROVINC' +
'IA,'#10' :PERSONA_CONTACTO,'#10' :TELEFONO,'#10' :BASE_IMPONIBLE,'#10' ' +
' :DESCUENTO,'#10' :IMPORTE_DESCUENTO,'#10' :IVA,'#10' :IMPORTE_IV' +
'A,'#10' :IMPORTE_TOTAL,'#10' :OBSERVACIONES,'#10' :INCIDENCIAS,'#10' ' +
' :INCIDENCIAS_ACTIVAS,'#10' :FECHA_ALTA,'#10' :FECHA_MODIFICACION,' +
#10' :USUARIO,'#10' :ID_ALMACEN,'#10' :ID_FORMA_PAGO,'#10' :IMPORTE' +
'_NETO,'#10' :IMPORTE_PORTE);'#10
StatementType = stSQL
ColumnMappings = <>
end>
@ -741,6 +745,10 @@ object srvAlbaranesProveedor: TsrvAlbaranesProveedor
Name = 'ID_FACTURA'
Value = ''
end
item
Name = 'TIPO'
Value = ''
end
item
Name = 'REFERENCIA'
Value = ''
@ -853,20 +861,21 @@ object srvAlbaranesProveedor: TsrvAlbaranesProveedor
'UPDATE ALBARANES_PROVEEDOR'#10' SET'#10' ID = :ID,'#10' ID_EMPRESA = ' +
':ID_EMPRESA,'#10' ID_PROVEEDOR = :ID_PROVEEDOR,'#10' FECHA_ALBARAN' +
' = :FECHA_ALBARAN,'#10' ID_PEDIDO = :ID_PEDIDO,'#10' ID_FACTURA = ' +
':ID_FACTURA,'#10' REFERENCIA = :REFERENCIA,'#10' REFERENCIA_PROVEE' +
'DOR = :REFERENCIA_PROVEEDOR,'#10' REF_FACTURA_PROV = :REF_FACTURA' +
'_PROV,'#10' CALLE = :CALLE,'#10' CODIGO_POSTAL = :CODIGO_POSTAL,'#10' ' +
' POBLACION = :POBLACION,'#10' PROVINCIA = :PROVINCIA,'#10' PERSO' +
'NA_CONTACTO = :PERSONA_CONTACTO,'#10' TELEFONO = :TELEFONO,'#10' B' +
'ASE_IMPONIBLE = :BASE_IMPONIBLE,'#10' DESCUENTO = :DESCUENTO,'#10' ' +
' IMPORTE_DESCUENTO = :IMPORTE_DESCUENTO,'#10' IVA = :IVA,'#10' IMP' +
'ORTE_IVA = :IMPORTE_IVA,'#10' IMPORTE_TOTAL = :IMPORTE_TOTAL,'#10' ' +
' OBSERVACIONES = :OBSERVACIONES,'#10' INCIDENCIAS = :INCIDENCIAS,' +
#10' INCIDENCIAS_ACTIVAS = :INCIDENCIAS_ACTIVAS,'#10' FECHA_ALTA ' +
'= :FECHA_ALTA,'#10' FECHA_MODIFICACION = :FECHA_MODIFICACION,'#10' ' +
' USUARIO = :USUARIO,'#10' ID_ALMACEN = :ID_ALMACEN,'#10' ID_FORMA_' +
'PAGO = :ID_FORMA_PAGO,'#10' IMPORTE_NETO = :IMPORTE_NETO,'#10' IMP' +
'ORTE_PORTE = :IMPORTE_PORTE'#10' WHERE'#10' (ID = :OLD_ID);'#10
':ID_FACTURA,'#10' TIPO = :TIPO,'#10' REFERENCIA = :REFERENCIA,'#10' ' +
' REFERENCIA_PROVEEDOR = :REFERENCIA_PROVEEDOR,'#10' REF_FACTURA_P' +
'ROV = :REF_FACTURA_PROV,'#10' CALLE = :CALLE,'#10' CODIGO_POSTAL =' +
' :CODIGO_POSTAL,'#10' POBLACION = :POBLACION,'#10' PROVINCIA = :PR' +
'OVINCIA,'#10' PERSONA_CONTACTO = :PERSONA_CONTACTO,'#10' TELEFONO ' +
'= :TELEFONO,'#10' BASE_IMPONIBLE = :BASE_IMPONIBLE,'#10' DESCUENTO' +
' = :DESCUENTO,'#10' IMPORTE_DESCUENTO = :IMPORTE_DESCUENTO,'#10' I' +
'VA = :IVA,'#10' IMPORTE_IVA = :IMPORTE_IVA,'#10' IMPORTE_TOTAL = :' +
'IMPORTE_TOTAL,'#10' OBSERVACIONES = :OBSERVACIONES,'#10' INCIDENCI' +
'AS = :INCIDENCIAS,'#10' INCIDENCIAS_ACTIVAS = :INCIDENCIAS_ACTIVA' +
'S,'#10' FECHA_ALTA = :FECHA_ALTA,'#10' FECHA_MODIFICACION = :FECHA' +
'_MODIFICACION,'#10' USUARIO = :USUARIO,'#10' ID_ALMACEN = :ID_ALMA' +
'CEN,'#10' ID_FORMA_PAGO = :ID_FORMA_PAGO,'#10' IMPORTE_NETO = :IMP' +
'ORTE_NETO,'#10' IMPORTE_PORTE = :IMPORTE_PORTE'#10' WHERE'#10' (ID = :O' +
'LD_ID);'#10
StatementType = stSQL
ColumnMappings = <>
end>

Binary file not shown.

View File

@ -110,8 +110,6 @@ uses
schEmpresasClient_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasClient_Intf.pas',
schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas',
uBizObrasServer in '..\Modulos\Obras\Model\uBizObrasServer.pas',
schAlbaranesProveedorClient_Intf in '..\Modulos\Albaranes de proveedor\Model\schAlbaranesProveedorClient_Intf.pas',
schAlbaranesProveedorServer_Intf in '..\Modulos\Albaranes de proveedor\Model\schAlbaranesProveedorServer_Intf.pas',
schAlbaranesClienteClient_Intf in '..\Modulos\Albaranes de cliente\Model\schAlbaranesClienteClient_Intf.pas',
schAlbaranesClienteServer_Intf in '..\Modulos\Albaranes de cliente\Model\schAlbaranesClienteServer_Intf.pas',
schAlmacenesClient_Intf in '..\Modulos\Almacenes\Model\schAlmacenesClient_Intf.pas',
@ -123,7 +121,9 @@ uses
schUsuariosClient_Intf in '..\ApplicationBase\Usuarios\Model\schUsuariosClient_Intf.pas',
schUsuariosServer_Intf in '..\ApplicationBase\Usuarios\Model\schUsuariosServer_Intf.pas',
schPresupuestosClienteClient_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteClient_Intf.pas',
schPresupuestosClienteServer_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteServer_Intf.pas';
schPresupuestosClienteServer_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteServer_Intf.pas',
schAlbaranesProveedorClient_Intf in '..\Modulos\Albaranes de proveedor\Model\schAlbaranesProveedorClient_Intf.pas',
schAlbaranesProveedorServer_Intf in '..\Modulos\Albaranes de proveedor\Model\schAlbaranesProveedorServer_Intf.pas';
{$R *.res}
{$R ..\Servicios\RODLFile.res}

View File

@ -14,7 +14,7 @@ BEGIN
BEGIN
VALUE "FileVersion", "1.0.4.0\0"
VALUE "ProductVersion", "1.0.4.0\0"
VALUE "CompileDate", "lunes, 02 de junio de 2008 13:23\0"
VALUE "CompileDate", "lunes, 02 de junio de 2008 17:48\0"
END
END
BLOCK "VarFileInfo"