Révision 5

Voir les différences:

UnitFeedsCharts.dfm
222 222
            'Sodium'
223 223
            'Potassium'
224 224
            'Chlorine'
225
            'Digestible phosphorus')
225
            'Digestible phosphorus'
226
            'Electrolyte balance')
226 227
        end
227 228
        object ComboBoxProximal0: TComboBox
228 229
          Left = 224
......
508 509
            'Sodium'
509 510
            'Potassium'
510 511
            'Chlorine'
511
            'Digestible phosphorus')
512
            'Digestible phosphorus'
513
            'Electrolyte balance')
512 514
        end
513 515
        object ComboBoxProximal: TComboBox
514 516
          Left = 224
......
533 535
            'Sugars')
534 536
        end
535 537
        object ComboBoxType: TComboBox
536
          Left = 16
538
          Left = 18
537 539
          Top = 16
538 540
          Width = 200
539 541
          Height = 21
......
958 960
    Left = 8
959 961
    Top = 640
960 962
    Bitmap = {
961
      494C0101020009002C0020002000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
963
      494C010102000900300020002000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
962 964
      0000000000003600000028000000800000002000000001002000000000000040
963 965
      0000000000000000000000000000000000000000000000000000000000000000
964 966
      00000000000000000000FEFEFEFFFCFCFCFFF5F5F5FFEAEAEAFFDADADAFFCBCB
UnitFeedsList.pas
42 42
    JvImgBtnView: TJvImgBtn;
43 43
    JvImgBtnEval: TJvImgBtn;
44 44
    JvImgBtnGraphs: TJvImgBtn;
45
    TabSheetBE: TTabSheet;
46
    DBGridBE: TDBGrid;
45 47
    procedure FormCreate(Sender: TObject);
46 48
    procedure DBGridFeedsDrawColumnCell(Sender: TObject; const Rect: TRect;
47 49
      DataCol: Integer; Column: TColumn; State: TGridDrawState);
......
367 369
      MineralsUnit := Format('%s %s', [ComboBoxMinerals.Items[Minerals], _('DM')]);
368 370
    end;
369 371
  with FormOptions do
370
    TabSheetMS.Caption := TabSheetMS.Caption + Format(' (%s)', [ComboBoxProximal.Items[Proximal]]);
371
  TabSheetProximal.Caption := TabSheetProximal.Caption + Format(' (%s)', [ProximalUnit]);
372
  TabSheetEnergy.Caption := TabSheetEnergy.Caption + Format(' (%s)', [EnergyUnit]);
373
  TabSheetEnergyUtilization.Caption := TabSheetEnergyUtilization.Caption + ' (%)';
374
  TabSheetAATot.Caption := TabSheetAATot.Caption + Format(' (%s)', [AAUnit]);
375
  TabSheetAADig.Caption := TabSheetAADig.Caption + Format(' (%s)', [AAUnit]);
376
  TabSheetMinerals.Caption := TabSheetMinerals.Caption + Format(' (%s)', [MineralsUnit]);
372
    TabSheetMS.Caption := Format('%s (%s)', [TabSheetMS.Caption, ComboBoxProximal.Items[Proximal]]);
373
  TabSheetProximal.Caption := Format('%s (%s)', [TabSheetProximal.Caption, ProximalUnit]);
374
  TabSheetEnergy.Caption := Format('%s (%s)', [TabSheetEnergy.Caption, EnergyUnit]);
375
  TabSheetEnergyUtilization.Caption := Format('%s (%%)', [TabSheetEnergyUtilization.Caption]);
376
  TabSheetAATot.Caption := Format('%s (%s)', [TabSheetAATot.Caption, AAUnit]);
377
  TabSheetAADig.Caption := Format('%s (%s)', [TabSheetAADig.Caption, AAUnit]);
378
  TabSheetMinerals.Caption := Format('%s (%s)', [TabSheetMinerals.Caption, MineralsUnit]);
379
  if FormOptions.Expression = 0
380
  then // sur frais
381
    TabSheetBE.Caption := Format('%s (%s)', [TabSheetBE.Caption, _('mEq/kg')])
382
  else // sur mati?re s?che
383
    TabSheetBE.Caption := Format('%s (%s %s)', [TabSheetBE.Caption, _('mEq/kg'), _('DM')]);
377 384
  // Sauvegarder la WndProc actuelle du DBGrid
378 385
  DBGridNameOldWindowProc := DBGridName.WindowProc;
379 386
  DBGridMSOldWindowProc := DBGridMS.WindowProc;
UnitMain.pas
653 653
        ClientDataSetIngredientsNa.DisplayFormat := MineralsFormat;
654 654
        ClientDataSetIngredientsK.DisplayFormat := MineralsFormat;
655 655
        ClientDataSetIngredientsCl.DisplayFormat := MineralsFormat;
656
        ClientDataSetIngredientsBE.DisplayFormat := DecimalFormat(2);
656
        ClientDataSetIngredientsBE.DisplayFormat := DecimalFormat(1);
657 657
        ClientDataSetIngredientsdP.DisplayFormat := DecimalFormat(1);
658 658
        ClientDataSetIngredientsdPphy.DisplayFormat := DecimalFormat(1);
659 659
      end;
......
903 903
        ClientDataSetFeedsNa.DisplayFormat := MineralsFormat;
904 904
        ClientDataSetFeedsK.DisplayFormat := MineralsFormat;
905 905
        ClientDataSetFeedsCl.DisplayFormat := MineralsFormat;
906
        ClientDataSetFeedsBE.DisplayFormat := DecimalFormat(2);
906
        ClientDataSetFeedsBE.DisplayFormat := DecimalFormat(1);
907 907
        ClientDataSetFeedsPd.DisplayFormat := MineralsFormat;
908
        ClientDataSetFeedsCa_Pd.DisplayFormat := DecimalFormat(1);
908
        ClientDataSetFeedsCa_Pd.DisplayFormat := DecimalFormat(2);
909 909
        ClientDataSetFeedsPd_ENc.DisplayFormat := DecimalFormat(2);
910 910
        ClientDataSetFeedsPd_ENt.DisplayFormat := DecimalFormat(2);
911 911
        ClientDataSetFeedsPhytaseConcentration.DisplayFormat := DecimalFormat(0);
UnitFeedDetail.pas
211 211
    DBEditK: TDBEdit;
212 212
    DBEditCl: TDBEdit;
213 213
    DBEditBE: TDBEdit;
214
    LabelBEUnit: TLabel;
214 215
    procedure FormCreate(Sender: TObject);
215 216
    procedure FormShow(Sender: TObject);
216 217
    procedure ActionModifyExecute(Sender: TObject);
......
317 318
                  CellData(Row, FloatToStrF(ClientDataSetFeeds.Fields[i].AsFloat, ffFixed, 15, FormOptions.EnergyDecimals, USFormatSettings), 'Number')
318 319
                else
319 320
                  CellData(Row, '', 'String');
320
              4, 5, 18, 20, 22, 24, 26, 28, 30..34, 103:
321
              4, 5, 18, 20, 22, 24, 26, 28, 30..34, 101:
321 322
                if not ClientDataSetFeeds.Fields[i].IsNull
322 323
                then
323 324
                  CellData(Row, FloatToStrF(ClientDataSetFeeds.Fields[i].AsFloat, ffFixed, 15, 1, USFormatSettings), 'Number')
......
329 330
                  CellData(Row, FloatToStrF(ClientDataSetFeeds.Fields[i].AsFloat, ffFixed, 15, FormOptions.AADecimals, USFormatSettings), 'Number')
330 331
                else
331 332
                  CellData(Row, '', 'String');
332
              75..76, 104..105:
333
              75..76, 103..105:
333 334
                if not ClientDataSetFeeds.Fields[i].IsNull
334 335
                then
335 336
                  CellData(Row, FloatToStrF(ClientDataSetFeeds.Fields[i].AsFloat, ffFixed, 15, 2, USFormatSettings), 'Number')
......
347 348
                  CellData(Row, FloatToStrF(ClientDataSetFeeds.Fields[i].AsFloat, ffFixed, 15, FormOptions.MineralsDecimals, USFormatSettings), 'Number')
348 349
                else
349 350
                  CellData(Row, '', 'String');
350
              101:
351
                if not ClientDataSetIngredients.Fields[i].IsNull
352
                then
353
                  CellData(Row, FloatToStrF(ClientDataSetIngredients.Fields[i].AsFloat, ffFixed, 15, 2, USFormatSettings), 'Number')
354
                else
355
                  CellData(Row, '', 'String');
356 351
            end;
357 352
            // Unit
358 353
            case i of
......
390 385
                  CellData(Row, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals], 'String')
391 386
                else // sur mati?re s?che
392 387
                  CellData(Row, Format('%s %s', [FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals], _('DM')]), 'String');
393
              101: // %
388
              101: // Bilan ?lectrolytique
394 389
                if FormOptions.Expression = 0
395 390
                then // sur frais
396 391
                  CellData(Row, _('mEq/kg'), 'String')
397 392
                else // sur mati?re s?che
398 393
                  CellData(Row, Format('%s %s', [_('mEq/kg'), _('DM')]), 'String');
399
              109:
394
              109: // Phytase
400 395
                CellData(Row, _('IU/kg'), 'String');
401 396
            end;
402 397
          end;
......
788 783
//  LabelCa_Pd.Caption := Format('%s (%%)', [LabelCa_Pd.Caption]);
789 784
  if FormOptions.Expression = 0
790 785
  then // sur frais
791
    LabelBE.Caption := Format('%s (%s)', [LabelBE.Caption, _('mEq/kg')])
786
    LabelBEUnit.Caption := Format('(%s)', [_('mEq/kg')])
792 787
  else // sur mati?re s?che
793
    LabelBE.Caption := Format('%s (%s %s)', [LabelBE.Caption, _('mEq/kg'), _('DM')]);
788
    LabelBEUnit.Caption := Format('(%s %s)', [_('mEq/kg'), _('DM')]);
794 789
//  GroupBoxAzote.Caption := Format('%s (%%)', [GroupBoxAzote.Caption]);
795 790
  LabeldN.Caption := Format('%s (%%)', [LabeldN.Caption]);
796 791
  if FormOptions.Energy = 0
UnitFeedCharts.dfm
107 107
            'Sodium'
108 108
            'Potassium'
109 109
            'Chlorine'
110
            'Digestible phosphorus')
110
            'Digestible phosphorus'
111
            'Electrolyte balance')
111 112
        end
112 113
        object ComboBoxProximal0: TComboBox
113 114
          Left = 224
......
398 399
              'Sodium'
399 400
              'Potassium'
400 401
              'Chlorine'
401
              'Digestible phosphorus')
402
              'Digestible phosphorus'
403
              'Electrolyte balance')
402 404
          end
403 405
          object ComboBoxProximal1: TComboBox
404 406
            Left = 224
......
523 525
              'Sodium'
524 526
              'Potassium'
525 527
              'Chlorine'
526
              'Digestible phosphorus')
528
              'Digestible phosphorus'
529
              'Electrolyte balance')
527 530
          end
528 531
          object ComboBoxProximal2: TComboBox
529 532
            Left = 224
......
716 719
              'Sodium'
717 720
              'Potassium'
718 721
              'Chlorine'
719
              'Digestible phosphorus')
722
              'Digestible phosphorus'
723
              'Electrolyte balance')
720 724
          end
721 725
          object ComboBoxProximal3: TComboBox
722 726
            Left = 224
......
909 913
              'Sodium'
910 914
              'Potassium'
911 915
              'Chlorine'
912
              'Digestible phosphorus')
916
              'Digestible phosphorus'
917
              'Electrolyte balance')
913 918
          end
914 919
          object ComboBoxProximal4: TComboBox
915 920
            Left = 224
......
1081 1086
    Left = 8
1082 1087
    Top = 640
1083 1088
    Bitmap = {
1084
      494C0101020009002C0020002000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
1089
      494C010102000900300020002000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
1085 1090
      0000000000003600000028000000800000002000000001002000000000000040
1086 1091
      0000000000000000000000000000000000000000000000000000000000000000
1087 1092
      00000000000000000000FEFEFEFFFCFCFCFFF5F5F5FFEAEAEAFFDADADAFFCBCB
UnitIngredientDetail.dfm
1609 1609
      end
1610 1610
      object LabelBE: TLabel
1611 1611
        Left = 8
1612
        Top = 136
1612
        Top = 140
1613 1613
        Width = 91
1614 1614
        Height = 13
1615 1615
        Caption = 'Electrolyte balance'
1616 1616
        Transparent = False
1617 1617
      end
1618
      object LabelBEUnit: TLabel
1619
        Left = 24
1620
        Top = 156
1621
        Width = 3
1622
        Height = 13
1623
        Transparent = False
1624
      end
1618 1625
      object DBEditCa: TDBEdit
1619 1626
        Left = 120
1620 1627
        Top = 16
......
1687 1694
      end
1688 1695
      object DBEditBE: TDBEdit
1689 1696
        Left = 120
1690
        Top = 152
1697
        Top = 144
1691 1698
        Width = 64
1692 1699
        Height = 21
1693 1700
        DataField = 'BE'
......
6258 6265
    Filter = 'XML files|*.xml'
6259 6266
    Options = [ofOverwritePrompt, ofHideReadOnly, ofNoChangeDir, ofEnableSizing]
6260 6267
    Title = 'Export data to Excel'
6261
    Left = 568
6262
    Top = 616
6268
    Left = 800
6269
    Top = 8
6263 6270
  end
6264 6271
  object ActionListButtons: TActionList
6265 6272
    Images = ImageListIcons
......
6308 6315
    Left = 8
6309 6316
    Top = 648
6310 6317
    Bitmap = {
6311
      494C010107000900400020002000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
6318
      494C010107000900500020002000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
6312 6319
      0000000000003600000028000000800000004000000001002000000000000080
6313 6320
      0000000000000000000000000000000000000000000000000000000000000000
6314 6321
      0000000000000000000000000000000000000000000000000000000000000000
UnitFeedsList.dfm
42 42
    OnChange = PageControlListsChange
43 43
    object TabSheetMS: TTabSheet
44 44
      Caption = 'Dry matter'
45
      ExplicitTop = 24
46
      ExplicitHeight = 610
45 47
      object DBGridMS: TDBGrid
46 48
        Left = 0
47 49
        Top = 0
48 50
        Width = 621
49
        Height = 610
51
        Height = 592
50 52
        Align = alClient
51 53
        Color = clBtnFace
52 54
        DataSource = DataModuleDeclaration.DataSourceFeeds
......
76 78
        Left = 0
77 79
        Top = 0
78 80
        Width = 621
79
        Height = 610
81
        Height = 592
80 82
        Align = alClient
81 83
        Color = clBtnFace
82 84
        DataSource = DataModuleDeclaration.DataSourceFeeds
......
159 161
        Left = 0
160 162
        Top = 0
161 163
        Width = 621
162
        Height = 610
164
        Height = 592
163 165
        Align = alClient
164 166
        Color = clBtnFace
165 167
        DataSource = DataModuleDeclaration.DataSourceFeeds
......
237 239
        Left = 0
238 240
        Top = 0
239 241
        Width = 621
240
        Height = 610
242
        Height = 592
241 243
        Align = alClient
242 244
        Color = clBtnFace
243 245
        DataSource = DataModuleDeclaration.DataSourceFeeds
......
303 305
        Left = 0
304 306
        Top = 0
305 307
        Width = 621
306
        Height = 610
308
        Height = 592
307 309
        Align = alClient
308 310
        Color = clBtnFace
309 311
        DataSource = DataModuleDeclaration.DataSourceFeeds
......
447 449
        Left = 0
448 450
        Top = 0
449 451
        Width = 621
450
        Height = 610
452
        Height = 592
451 453
        Align = alClient
452 454
        Color = clBtnFace
453 455
        DataSource = DataModuleDeclaration.DataSourceFeeds
......
611 613
        Left = 0
612 614
        Top = 0
613 615
        Width = 621
614
        Height = 610
616
        Height = 592
615 617
        Align = alClient
616 618
        Color = clBtnFace
617 619
        DataSource = DataModuleDeclaration.DataSourceFeeds
......
666 668
          end>
667 669
      end
668 670
    end
671
    object TabSheetBE: TTabSheet
672
      Caption = 'Electrolyte balance'
673
      ImageIndex = 7
674
      object DBGridBE: TDBGrid
675
        Left = 0
676
        Top = 0
677
        Width = 621
678
        Height = 592
679
        Align = alClient
680
        Color = clBtnFace
681
        DataSource = DataModuleDeclaration.DataSourceFeeds
682
        Options = [dgTitles, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
683
        ReadOnly = True
684
        TabOrder = 0
685
        TitleFont.Charset = DEFAULT_CHARSET
686
        TitleFont.Color = clWindowText
687
        TitleFont.Height = -11
688
        TitleFont.Name = 'Tahoma'
689
        TitleFont.Style = []
690
        OnDrawColumnCell = DBGridFeedsDrawColumnCell
691
        OnDblClick = DBGridFeedsDblClick
692
        OnTitleClick = DBGridFeedsTitleClick
693
        Columns = <
694
          item
695
            Expanded = False
696
            FieldName = 'BE'
697
            Title.Alignment = taCenter
698
            Visible = True
699
          end>
700
      end
701
    end
669 702
  end
670 703
  object PanelButtons: TPanel
671 704
    Left = 0
......
845 878
    Left = 8
846 879
    Top = 648
847 880
    Bitmap = {
848
      494C0101060009001C0020002000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
881
      494C010106000900200020002000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
849 882
      0000000000003600000028000000800000004000000001002000000000000080
850 883
      0000000000000000000000000000000000000000000000000000000000000000
851 884
      00000000000000000000FEFEFEFFFCFCFCFFF5F5F5FFEAEAEAFFDADADAFFCBCB
UnitIngredientsList.pas
559 559
      MineralsUnit := Format('%s %s', [ComboBoxMinerals.Items[Minerals], _('DM')]);
560 560
    end;
561 561
  with FormOptions do
562
    TabSheetMS.Caption := TabSheetMS.Caption + Format(' (%s)', [ComboBoxProximal.Items[Proximal]]);
563
  TabSheetProximal.Caption := TabSheetProximal.Caption + Format(' (%s)', [ProximalUnit]);
564
  TabSheetEnergy.Caption := TabSheetEnergy.Caption + Format(' (%s)', [EnergyUnit]);
565
  TabSheetEnergyUtilization.Caption := TabSheetEnergyUtilization.Caption + ' (%)';
566
  TabSheetAATot.Caption := TabSheetAATot.Caption + Format(' (%s)', [AAUnit]);
567
  TabSheetAA_MAT.Caption := TabSheetAA_MAT.Caption + ' (%)';
568
  TabSheetdAA.Caption := TabSheetdAA.Caption + ' (%)';
569
  TabSheetAADig.Caption := TabSheetAADig.Caption + Format(' (%s)', [AAUnit]);
570
  TabSheetMinerals.Caption := TabSheetMinerals.Caption + Format(' (%s)', [MineralsUnit]);
571
  TabSheetdP.Caption := TabSheetdP.Caption + ' (%)';
562
    TabSheetMS.Caption := Format('%s (%s)', [TabSheetMS.Caption, ComboBoxProximal.Items[Proximal]]);
563
  TabSheetProximal.Caption := Format('%s (%s)', [TabSheetProximal.Caption, ProximalUnit]);
564
  TabSheetEnergy.Caption := Format('%s (%s)', [TabSheetEnergy.Caption, EnergyUnit]);
565
  TabSheetEnergyUtilization.Caption := Format('%s (%%)', [TabSheetEnergyUtilization.Caption]);
566
  TabSheetAATot.Caption := Format('%s (%s)', [TabSheetAATot.Caption, AAUnit]);
567
  TabSheetAA_MAT.Caption := Format('%s (%%)', [TabSheetAA_MAT.Caption]);
568
  TabSheetdAA.Caption := Format('%s (%%)', [TabSheetdAA.Caption]);
569
  TabSheetAADig.Caption := Format('%s (%s)', [TabSheetAADig.Caption, AAUnit]);
570
  TabSheetMinerals.Caption := Format('%s (%s)', [TabSheetMinerals.Caption, MineralsUnit]);
571
  TabSheetdP.Caption := Format('%s (%%)', [TabSheetdP.Caption]);
572 572
  with DataModuleDeclaration do
573 573
  begin
574 574
    // Classes
UnitFeedDetail.dfm
1345 1345
      end
1346 1346
      object LabelCa_Pd: TLabel
1347 1347
        Left = 8
1348
        Top = 204
1348
        Top = 212
1349 1349
        Width = 35
1350 1350
        Height = 13
1351 1351
        Caption = 'Ca / dP'
......
1377 1377
      end
1378 1378
      object LabelBE: TLabel
1379 1379
        Left = 8
1380
        Top = 136
1380
        Top = 140
1381 1381
        Width = 91
1382 1382
        Height = 13
1383 1383
        Caption = 'Electrolyte balance'
1384 1384
        Transparent = False
1385 1385
      end
1386
      object LabelBEUnit: TLabel
1387
        Left = 24
1388
        Top = 156
1389
        Width = 3
1390
        Height = 13
1391
        Transparent = False
1392
      end
1386 1393
      object DBEditCa: TDBEdit
1387 1394
        Left = 120
1388 1395
        Top = 16
......
1415 1422
      end
1416 1423
      object DBEditCa_Pd: TDBEdit
1417 1424
        Left = 120
1418
        Top = 200
1425
        Top = 208
1419 1426
        Width = 64
1420 1427
        Height = 21
1421 1428
        DataField = 'Ca/Pd'
......
1445 1452
      end
1446 1453
      object DBEditCl: TDBEdit
1447 1454
        Left = 120
1448
        Top = 115
1455
        Top = 112
1449 1456
        Width = 64
1450 1457
        Height = 21
1451 1458
        DataField = 'Cl'
......
1455 1462
      end
1456 1463
      object DBEditBE: TDBEdit
1457 1464
        Left = 120
1458
        Top = 152
1465
        Top = 144
1459 1466
        Width = 64
1460 1467
        Height = 21
1461 1468
        DataField = 'BE'
......
1975 1982
    Filter = 'XML files|*.xml'
1976 1983
    Options = [ofOverwritePrompt, ofHideReadOnly, ofNoChangeDir, ofEnableSizing]
1977 1984
    Title = 'Export data to Excel'
1978
    Left = 608
1979
    Top = 616
1985
    Left = 800
1986
    Top = 8
1980 1987
  end
1981 1988
  object RvDataSetConnectionComposition: TRvDataSetConnection
1982 1989
    RuntimeVisibility = rtDeveloper
......
7040 7047
    Left = 8
7041 7048
    Top = 648
7042 7049
    Bitmap = {
7043
      494C0101080009004C0020002000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
7050
      494C010108000900500020002000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
7044 7051
      00000000000036000000280000008000000060000000010020000000000000C0
7045 7052
      0000000000000000000000000000000000000000000000000000000000000000
7046 7053
      0000000000000000000000000000000000000000000000000000000000000000
UnitDeclaration.pas
622 622
      + 'dPro REAL, '
623 623
      + 'Ca REAL, '
624 624
      + 'P REAL, '
625
      + 'Na REAL, '
626
      + 'K REAL, '
627
      + 'Cl REAL, '
625 628
      + 'dP REAL, '
626 629
      + 'dPphy REAL)');
627 630
    DBUser.ExecSQL('CREATE INDEX IdxClasses ON Ingredients (Class)');
......
3515 3518
    ClientDataSetFeedsNa.Clear;
3516 3519
    ClientDataSetFeedsK.Clear;
3517 3520
    ClientDataSetFeedsCl.Clear;
3521
    ClientDataSetFeedsBE.Clear;
3518 3522
    ClientDataSetFeedsPd.Clear;
3519 3523
  end
3520 3524
  else
......
4023 4027
          ClientDataSetFeedsCl.Clear
4024 4028
        else
4025 4029
          ClientDataSetFeedsCl.Value := ClientDataSetFeedsCl.Value + ClientDataSetIngredientsCl.Value * Ratio;
4030
      if ClientDataSetFeedsNa.IsNull or ClientDataSetFeedsK.IsNull or ClientDataSetFeedsCl.IsNull
4031
      then
4032
        ClientDataSetFeedsBE.Clear
4033
      else
4034
        ClientDataSetFeedsBE.Value := CalcBilanElectrolytique(InputMinerals(ClientDataSetFeedsNa.Value, RapMS, FormOptions.Expression, FormOptions.Minerals), InputMinerals(ClientDataSetFeedsK.Value, RapMS, FormOptions.Expression, FormOptions.Minerals), InputMinerals(ClientDataSetFeedsCl.Value, RapMS, FormOptions.Expression, FormOptions.Minerals));
4026 4035
      if not ClientDataSetFeedsPd.IsNull
4027 4036
      then
4028 4037
        if ClientDataSetFeedsPresentation.Value = 0
......
4264 4273
      if not ClientDataSetFeedsCl.IsNull
4265 4274
      then
4266 4275
        ClientDataSetFeedsCl.Value := ClientDataSetFeedsCl.Value / RapMS;
4276
      if not ClientDataSetFeedsEB.IsNull
4277
      then
4278
        ClientDataSetFeedsEB.Value := ClientDataSetFeedsEB.Value / RapMS;
4267 4279
      if not ClientDataSetFeedsPd.IsNull
4268 4280
      then
4269 4281
        ClientDataSetFeedsPd.Value := ClientDataSetFeedsPd.Value / RapMS;
UnitIngredientsList.dfm
85 85
    end
86 86
    object TabSheetProximal: TTabSheet
87 87
      Caption = 'Proximate analysis'
88
      ExplicitLeft = 0
89
      ExplicitTop = 0
90
      ExplicitWidth = 0
91
      ExplicitHeight = 0
88 92
      object DBGridProximal: TDBGrid
89 93
        Left = 0
90 94
        Top = 0
......
168 172
    end
169 173
    object TabSheetEnergyUtilization: TTabSheet
170 174
      Caption = 'Energy utilization'
175
      ExplicitLeft = 0
176
      ExplicitTop = 0
177
      ExplicitWidth = 0
178
      ExplicitHeight = 0
171 179
      object DBGridRatios: TDBGrid
172 180
        Left = 0
173 181
        Top = 0
......
246 254
    end
247 255
    object TabSheetEnergy: TTabSheet
248 256
      Caption = 'Energy values'
257
      ExplicitLeft = 0
258
      ExplicitTop = 0
259
      ExplicitWidth = 0
260
      ExplicitHeight = 0
249 261
      object DBGridEnergy: TDBGrid
250 262
        Left = 0
251 263
        Top = 0
......
312 324
    end
313 325
    object TabSheetAATot: TTabSheet
314 326
      Caption = 'Total amino acids'
327
      ExplicitLeft = 0
328
      ExplicitTop = 0
329
      ExplicitWidth = 0
330
      ExplicitHeight = 0
315 331
      object DBGridAATot: TDBGrid
316 332
        Left = 0
317 333
        Top = 0
......
456 472
    end
457 473
    object TabSheetAA_MAT: TTabSheet
458 474
      Caption = 'Total amino acids / crude protein'
475
      ExplicitLeft = 0
476
      ExplicitTop = 0
477
      ExplicitWidth = 0
478
      ExplicitHeight = 0
459 479
      object DBGridAA_MAT: TDBGrid
460 480
        Left = 0
461 481
        Top = 0
......
620 640
    end
621 641
    object TabSheetdAA: TTabSheet
622 642
      Caption = 'Digestibility of amino acids'
643
      ExplicitLeft = 0
644
      ExplicitTop = 0
645
      ExplicitWidth = 0
646
      ExplicitHeight = 0
623 647
      object DBGriddAA: TDBGrid
624 648
        Left = 0
625 649
        Top = 0
......
784 808
    end
785 809
    object TabSheetAADig: TTabSheet
786 810
      Caption = 'Digestible amino acids'
811
      ExplicitLeft = 0
812
      ExplicitTop = 0
813
      ExplicitWidth = 0
814
      ExplicitHeight = 0
787 815
      object DBGridAADig: TDBGrid
788 816
        Left = 0
789 817
        Top = 0
......
948 976
    end
949 977
    object TabSheetMinerals: TTabSheet
950 978
      Caption = 'Minerals'
979
      ExplicitLeft = 0
980
      ExplicitTop = 0
981
      ExplicitWidth = 0
982
      ExplicitHeight = 0
951 983
      object DBGridMinerals: TDBGrid
952 984
        Left = 0
953 985
        Top = 0
......
1002 1034
    end
1003 1035
    object TabSheetdP: TTabSheet
1004 1036
      Caption = 'Phosphorus digestibility'
1037
      ExplicitLeft = 0
1038
      ExplicitTop = 0
1039
      ExplicitWidth = 0
1040
      ExplicitHeight = 0
1005 1041
      object DBGriddP: TDBGrid
1006 1042
        Left = 0
1007 1043
        Top = 0
......
1271 1307
    Left = 8
1272 1308
    Top = 648
1273 1309
    Bitmap = {
1274
      494C0101040009002C0020002000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
1310
      494C010104000900300020002000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
1275 1311
      0000000000003600000028000000800000004000000001002000000000000080
1276 1312
      0000000000000000000000000000000000000000000000000000000000000000
1277 1313
      0000000000000000000000000000000000000000000000000000000000000000
UnitFeedsCharts.pas
130 130
  procedure AddBarValue;
131 131
  begin
132 132
    with DataModuleDeclaration do
133
    begin
133 134
      case ComboBoxType0.ItemIndex of
134 135
        0: // Analyse proximale
135 136
          case ComboBoxProximal0.ItemIndex of
......
499 500
              if not ClientDataSetFeedsPd.IsNull
500 501
              then SeriesBar.AddBar(ClientDataSetFeedsPd.Value, s, clTeeColor)
501 502
              else SeriesBar.AddNull(s);
503
            6: // Bilan ?lectrolytique
504
              if not ClientDataSetFeedsBE.IsNull
505
              then SeriesBar.AddBar(ClientDataSetFeedsBE.Value, s, clTeeColor)
506
              else SeriesBar.AddNull(s);
502 507
          end;
503 508
      end;
509
    end;
504 510
  end;
505 511

  
506 512
begin
......
551 557
    5: // Profils acides amin?s
552 558
      Chart0.SubTitle.Text.Add('%');
553 559
    6: // Min?raux
554
      with FormOptions do
555
        if Expression = 0
556
        then // sur frais
557
          Chart0.SubTitle.Text.Add(ComboBoxMinerals.Items[Minerals])
558
        else // sur mati?re s?che
559
          Chart0.SubTitle.Text.Add(Format('%s %s', [ComboBoxMinerals.Items[Minerals], _('DM')]));
560
      if ComboBoxMinerals0.ItemIndex = 6
561
      then // Bilan ?lectrolytique
562
        with FormOptions do
563
          if Expression = 0
564
          then // sur frais
565
            Chart0.SubTitle.Text.Add(_('mEq/kg'))
566
          else // sur mati?re s?che
567
            Chart0.SubTitle.Text.Add(Format('%s %s', [_('mEq/kg'), _('DM')]))
568
      else
569
        with FormOptions do
570
          if Expression = 0
571
          then // sur frais
572
            Chart0.SubTitle.Text.Add(ComboBoxMinerals.Items[Minerals])
573
          else // sur mati?re s?che
574
            Chart0.SubTitle.Text.Add(Format('%s %s', [ComboBoxMinerals.Items[Minerals], _('DM')]));
560 575
  end;
561 576
  case ComboBoxType0.ItemIndex of
562 577
    0: // Analyse proximale
......
570 585
    5: // Profils acides amin?s
571 586
      Chart0.LeftAxis.AxisValuesFormat := FormOptions.DecimalFormat(0);
572 587
    6: // Min?raux
573
      Chart0.LeftAxis.AxisValuesFormat := FormOptions.MineralsFormat;
588
      if ComboBoxMinerals0.ItemIndex = 6
589
      then // Bilan ?lectrolytique
590
        Chart0.LeftAxis.AxisValuesFormat := FormOptions.DecimalFormat(1)
591
      else
592
        Chart0.LeftAxis.AxisValuesFormat := FormOptions.MineralsFormat;
574 593
  end;
575 594
  SeriesBar.Clear;
576 595
  SeriesBar.ValueFormat := Chart0.LeftAxis.AxisValuesFormat;
......
811 830
              Cumul := ClientDataSetFeedsCl.Value;
812 831
            5: // Phosphore digestible
813 832
              Cumul := ClientDataSetFeedsPd.Value;
833
            6: // Bilan ?lectrolytique
834
              Cumul := ClientDataSetFeedsBE.Value;
814 835
            else
815 836
              Cumul := 0;
816 837
          end;
......
997 1018
                  Value := ClientDataSetIngredientsdPphy.Value / 100 * ClientDataSetIngredientsP.Value * Ratio
998 1019
                else // Granul?s (dP)
999 1020
                  Value := ClientDataSetIngredientsdP.Value / 100 * ClientDataSetIngredientsP.Value * Ratio;
1021
              6: // Bilan ?lectrolytique
1022
                Value := ClientDataSetIngredientsBE.Value * Ratio;
1000 1023
              else
1001 1024
                Value := 0;
1002 1025
            end;
......
1127 1150
          else // sur mati?re s?che
1128 1151
            ChartFeed1.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.AADecimals, Total, FormOptions.ComboBoxAA.Items[FormOptions.AA], _('DM')]));
1129 1152
        4: // Min?raux
1130
          if FormOptions.Expression = 0
1131
          then // sur frais
1132
            ChartFeed1.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals]]))
1133
          else // sur mati?re s?che
1134
            ChartFeed1.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals], _('DM')]));
1153
          if ComboBoxMinerals.ItemIndex = 6
1154
          then // Bilan ?lectrolytique
1155
            if FormOptions.Expression = 0
1156
            then // sur frais
1157
              ChartFeed1.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), 1, Total, _('mEq/kg')]))
1158
            else // sur mati?re s?che
1159
              ChartFeed1.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), 1, Total, _('mEq/kg'), _('DM')]));
1160
          else
1161
            if FormOptions.Expression = 0
1162
            then // sur frais
1163
              ChartFeed1.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals]]))
1164
            else // sur mati?re s?che
1165
              ChartFeed1.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals], _('DM')]));
1135 1166
      end;
1136 1167
      ClientDataSetComposition.Filtered := False;
1137 1168
      ClientDataSetComposition.Filter := '';
......
1319 1350
              Cumul := ClientDataSetFeedsCl.Value;
1320 1351
            5: // Phosphore digestible
1321 1352
              Cumul := ClientDataSetFeedsPd.Value;
1353
            6: // Bilan ?lectrolytique
1354
              Cumul := ClientDataSetFeedsBE.Value;
1322 1355
            else
1323 1356
              Cumul := 0;
1324 1357
          end;
......
1505 1538
                  Value := ClientDataSetIngredientsdPphy.Value / 100 * ClientDataSetIngredientsP.Value * Ratio
1506 1539
                else // Granul?s (dP)
1507 1540
                  Value := ClientDataSetIngredientsdP.Value / 100 * ClientDataSetIngredientsP.Value * Ratio;
1541
              6: // Bilan ?lectrolytique
1542
                Value := ClientDataSetIngredientsBE.Value * Ratio;
1508 1543
              else
1509 1544
                Value := 0;
1510 1545
            end;
......
1635 1670
          else // sur mati?re s?che
1636 1671
            ChartFeed2.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.AADecimals, Total, FormOptions.ComboBoxAA.Items[FormOptions.AA], _('DM')]));
1637 1672
        4: // Min?raux
1638
          if FormOptions.Expression = 0
1639
          then // sur frais
1640
            ChartFeed2.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals]]))
1641
          else // sur mati?re s?che
1642
            ChartFeed2.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals], _('DM')]));
1673
          if ComboBoxMinerals.ItemIndex = 6
1674
          then // Bilan ?lectrolytique
1675
            if FormOptions.Expression = 0
1676
            then // sur frais
1677
              ChartFeed2.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), 1, Total, _('mEq/kg')]))
1678
            else // sur mati?re s?che
1679
              ChartFeed2.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), 1, Total, _('mEq/kg'), _('DM')]));
1680
          else
1681
            if FormOptions.Expression = 0
1682
            then // sur frais
1683
              ChartFeed2.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals]]))
1684
            else // sur mati?re s?che
1685
              ChartFeed2.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals], _('DM')]));
1643 1686
      end;
1644 1687
      ClientDataSetComposition.Filtered := False;
1645 1688
      ClientDataSetComposition.Filter := '';
......
1827 1870
              Cumul := ClientDataSetFeedsCl.Value;
1828 1871
            5: // Phosphore digestible
1829 1872
              Cumul := ClientDataSetFeedsPd.Value;
1873
            6: // Bilan ?lectrolytique
1874
              Cumul := ClientDataSetFeedsBE.Value;
1830 1875
            else
1831 1876
              Cumul := 0;
1832 1877
          end;
......
2013 2058
                  Value := ClientDataSetIngredientsdPphy.Value / 100 * ClientDataSetIngredientsP.Value * Ratio
2014 2059
                else // Granul?s (dP)
2015 2060
                  Value := ClientDataSetIngredientsdP.Value / 100 * ClientDataSetIngredientsP.Value * Ratio;
2061
              6: // Bilan ?lectrolytique
2062
                Value := ClientDataSetIngredientsBE.Value * Ratio;
2016 2063
              else
2017 2064
                Value := 0;
2018 2065
            end;
......
2143 2190
          else // sur mati?re s?che
2144 2191
            ChartFeed3.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.AADecimals, Total, FormOptions.ComboBoxAA.Items[FormOptions.AA], _('DM')]));
2145 2192
        4: // Min?raux
2146
          if FormOptions.Expression = 0
2147
          then // sur frais
2148
            ChartFeed3.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals]]))
2149
          else // sur mati?re s?che
2150
            ChartFeed3.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals], _('DM')]));
2193
          if ComboBoxMinerals.ItemIndex = 6
2194
          then // Bilan ?lectrolytique
2195
            if FormOptions.Expression = 0
2196
            then // sur frais
2197
              ChartFeed3.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), 1, Total, _('mEq/kg')]))
2198
            else // sur mati?re s?che
2199
              ChartFeed3.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), 1, Total, _('mEq/kg'), _('DM')]));
2200
          else
2201
            if FormOptions.Expression = 0
2202
            then // sur frais
2203
              ChartFeed3.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals]]))
2204
            else // sur mati?re s?che
2205
              ChartFeed3.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals], _('DM')]));
2151 2206
      end;
2152 2207
      ClientDataSetComposition.Filtered := False;
2153 2208
      ClientDataSetComposition.Filter := '';
......
2335 2390
              Cumul := ClientDataSetFeedsCl.Value;
2336 2391
            5: // Phosphore digestible
2337 2392
              Cumul := ClientDataSetFeedsPd.Value;
2393
            6: // Bilan ?lectrolytique
2394
              Cumul := ClientDataSetFeedsBE.Value;
2338 2395
            else
2339 2396
              Cumul := 0;
2340 2397
          end;
......
2521 2578
                  Value := ClientDataSetIngredientsdPphy.Value / 100 * ClientDataSetIngredientsP.Value * Ratio
2522 2579
                else // Granul?s (dP)
2523 2580
                  Value := ClientDataSetIngredientsdP.Value / 100 * ClientDataSetIngredientsP.Value * Ratio;
2581
              6: // Bilan ?lectrolytique
2582
                Value := ClientDataSetIngredientsBE.Value * Ratio;
2524 2583
              else
2525 2584
                Value := 0;
2526 2585
            end;
......
2651 2710
          else // sur mati?re s?che
2652 2711
            ChartFeed4.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.AADecimals, Total, FormOptions.ComboBoxAA.Items[FormOptions.AA], _('DM')]));
2653 2712
        4: // Min?raux
2654
          if FormOptions.Expression = 0
2655
          then // sur frais
2656
            ChartFeed4.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals]]))
2657
          else // sur mati?re s?che
2658
            ChartFeed4.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals], _('DM')]));
2713
          if ComboBoxMinerals.ItemIndex = 6
2714
          then // Bilan ?lectrolytique
2715
            if FormOptions.Expression = 0
2716
            then // sur frais
2717
              ChartFeed4.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), 1, Total, _('mEq/kg')]))
2718
            else // sur mati?re s?che
2719
              ChartFeed4.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), 1, Total, _('mEq/kg'), _('DM')]));
2720
          else
2721
            if FormOptions.Expression = 0
2722
            then // sur frais
2723
              ChartFeed4.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals]]))
2724
            else // sur mati?re s?che
2725
              ChartFeed4.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals], _('DM')]));
2659 2726
      end;
2660 2727
      ClientDataSetComposition.Filtered := False;
2661 2728
      ClientDataSetComposition.Filter := '';
UnitFeedCharts.pas
318 318
                Value := ClientDataSetIngredientsdPphy.Value / 100 * ClientDataSetIngredientsP.Value * Ratio
319 319
              else // Granul?s (dP)
320 320
                Value := ClientDataSetIngredientsdP.Value / 100 * ClientDataSetIngredientsP.Value * Ratio;
321
            6: // Bilan ?lectrolytique
322
              Value := ClientDataSetIngredientsBE.Value * Ratio;
321 323
            else
322 324
              Value := 0;
323 325
          end;
......
414 416
      else // sur mati?re s?che
415 417
        Chart0.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.AADecimals, Total, FormOptions.ComboBoxAA.Items[FormOptions.AA], _('DM')]));
416 418
    4: // Min?raux
417
      if FormOptions.Expression = 0
418
      then // sur frais
419
        Chart0.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals]]))
420
      else // sur mati?re s?che
421
        Chart0.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals], _('DM')]));
419
      if ComboBoxMinerals0.ItemIndex = 6
420
      then // Bilan ?lectrolytique
421
        if FormOptions.Expression = 0
422
        then // sur frais
423
          Chart0.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), 1, Total, _('mEq/kg')]))
424
        else // sur mati?re s?che
425
          Chart0.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), 1, Total, _('mEq/kg'), _('DM')]))
426
      else
427
        if FormOptions.Expression = 0
428
        then // sur frais
429
          Chart0.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals]]))
430
        else // sur mati?re s?che
431
          Chart0.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals], _('DM')]));
422 432
  end;
423 433
end;
424 434

  
......
597 607
            Cumul := ClientDataSetFeedsCl.Value;
598 608
          5: // Phosphore digestible
599 609
            Cumul := ClientDataSetFeedsPd.Value;
610
          6: // Bilan ?lectrolytique
611
            Cumul := ClientDataSetFeedsBE.Value;
600 612
          else
601 613
            Cumul := 0;
602 614
        end;
......
781 793
                Value := ClientDataSetIngredientsdPphy.Value / 100 * ClientDataSetIngredientsP.Value * Ratio
782 794
              else // Granul?s (dP)
783 795
                Value := ClientDataSetIngredientsdP.Value / 100 * ClientDataSetIngredientsP.Value * Ratio;
796
            6: // Bilan ?lectrolytique
797
              Value := ClientDataSetIngredientsBE.Value * Ratio;
784 798
            else
785 799
              Value := 0;
786 800
          end;
......
911 925
        else // sur mati?re s?che
912 926
          Chart1.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.AADecimals, Total, FormOptions.ComboBoxAA.Items[FormOptions.AA], _('DM')]));
913 927
      4: // Min?raux
914
        if FormOptions.Expression = 0
915
        then // sur frais
916
          Chart1.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals]]))
917
        else // sur mati?re s?che
918
          Chart1.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals], _('DM')]));
928
        if ComboBoxMinerals1.ItemIndex = 6
929
        then // Bilan ?lectrolytique
930
          if FormOptions.Expression = 0
931
          then // sur frais
932
            Chart1.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), 1, Total, _('mEq/kg')]))
933
          else // sur mati?re s?che
934
            Chart1.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), 1, Total, _('mEq/kg'), _('DM')]))
935
        else
936
          if FormOptions.Expression = 0
937
          then // sur frais
938
            Chart1.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals]]))
939
          else // sur mati?re s?che
940
            Chart1.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals], _('DM')]));
919 941
    end;
920 942
  end;
921 943
end;
......
1095 1117
            Cumul := ClientDataSetFeedsCl.Value;
1096 1118
          5: // Phosphore digestible
1097 1119
            Cumul := ClientDataSetFeedsPd.Value;
1120
          6: // Bilan ?lectrolytique
1121
            Cumul := ClientDataSetFeedsBE.Value;
1098 1122
          else
1099 1123
            Cumul := 0;
1100 1124
        end;
......
1279 1303
                Value := ClientDataSetIngredientsdPphy.Value / 100 * ClientDataSetIngredientsP.Value * Ratio
1280 1304
              else // Granul?s (dP)
1281 1305
                Value := ClientDataSetIngredientsdP.Value / 100 * ClientDataSetIngredientsP.Value * Ratio;
1306
            6: // Bilan ?lectrolytique
1307
              Value := ClientDataSetIngredientsBE.Value * Ratio;
1282 1308
            else
1283 1309
              Value := 0;
1284 1310
          end;
......
1409 1435
        else // sur mati?re s?che
1410 1436
          Chart2.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.AADecimals, Total, FormOptions.ComboBoxAA.Items[FormOptions.AA], _('DM')]));
1411 1437
      4: // Min?raux
1412
        if FormOptions.Expression = 0
1413
        then // sur frais
1414
          Chart2.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals]]))
1415
        else // sur mati?re s?che
1416
          Chart2.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals], _('DM')]));
1438
        if ComboBoxMinerals2.ItemIndex = 6
1439
        then // Bilan ?lectrolytique
1440
          if FormOptions.Expression = 0
1441
          then // sur frais
1442
            Chart2.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), 1, Total, _('mEq/kg')]))
1443
          else // sur mati?re s?che
1444
            Chart2.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), 1, Total, _('mEq/kg'), _('DM')]))
1445
        else
1446
          if FormOptions.Expression = 0
1447
          then // sur frais
1448
            Chart2.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals]]))
1449
          else // sur mati?re s?che
1450
            Chart2.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals], _('DM')]));
1417 1451
    end;
1418 1452
  end;
1419 1453
end;
......
1593 1627
            Cumul := ClientDataSetFeedsCl.Value;
1594 1628
          5: // Phosphore digestible
1595 1629
            Cumul := ClientDataSetFeedsPd.Value;
1630
          6: // Bilan ?lectrolytique
1631
            Cumul := ClientDataSetFeedsBE.Value;
1596 1632
          else
1597 1633
            Cumul := 0;
1598 1634
        end;
......
1777 1813
                Value := ClientDataSetIngredientsdPphy.Value / 100 * ClientDataSetIngredientsP.Value * Ratio
1778 1814
              else // Granul?s (dP)
1779 1815
                Value := ClientDataSetIngredientsdP.Value / 100 * ClientDataSetIngredientsP.Value * Ratio;
1816
            6: // Bilan ?lectrolytique
1817
              Value := ClientDataSetIngredientsBE.Value * Ratio;
1780 1818
            else
1781 1819
              Value := 0;
1782 1820
          end;
......
1907 1945
        else // sur mati?re s?che
1908 1946
          Chart3.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.AADecimals, Total, FormOptions.ComboBoxAA.Items[FormOptions.AA], _('DM')]));
1909 1947
      4: // Min?raux
1910
        if FormOptions.Expression = 0
1911
        then // sur frais
1912
          Chart3.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals]]))
1913
        else // sur mati?re s?che
1914
          Chart3.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals], _('DM')]));
1948
        if ComboBoxMinerals3.ItemIndex = 6
1949
        then // Bilan ?lectrolytique
1950
          if FormOptions.Expression = 0
1951
          then // sur frais
1952
            Chart3.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), 1, Total, _('mEq/kg')]))
1953
          else // sur mati?re s?che
1954
            Chart3.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), 1, Total, _('mEq/kg'), _('DM')]))
1955
        else
1956
          if FormOptions.Expression = 0
1957
          then // sur frais
1958
            Chart3.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals]]))
1959
          else // sur mati?re s?che
1960
            Chart3.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals], _('DM')]));
1915 1961
    end;
1916 1962
  end;
1917 1963
end;
......
2091 2137
            Cumul := ClientDataSetFeedsCl.Value;
2092 2138
          5: // Phosphore digestible
2093 2139
            Cumul := ClientDataSetFeedsPd.Value;
2140
          6: // Bilan ?lectrolytique
2141
            Cumul := ClientDataSetFeedsBE.Value;
2094 2142
          else
2095 2143
            Cumul := 0;
2096 2144
        end;
......
2275 2323
                Value := ClientDataSetIngredientsdPphy.Value / 100 * ClientDataSetIngredientsP.Value * Ratio
2276 2324
              else // Granul?s (dP)
2277 2325
                Value := ClientDataSetIngredientsdP.Value / 100 * ClientDataSetIngredientsP.Value * Ratio;
2326
            6: // Bilan ?lectrolytique
2327
              Value := ClientDataSetIngredientsBE.Value * Ratio;
2278 2328
            else
2279 2329
              Value := 0;
2280 2330
          end;
......
2405 2455
        else // sur mati?re s?che
2406 2456
          Chart4.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.AADecimals, Total, FormOptions.ComboBoxAA.Items[FormOptions.AA], _('DM')]));
2407 2457
      4: // Min?raux
2408
        if FormOptions.Expression = 0
2409
        then // sur frais
2410
          Chart4.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals]]))
2411
        else // sur mati?re s?che
2412
          Chart4.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals], _('DM')]));
2458
        if ComboBoxMinerals4.ItemIndex = 6
2459
        then // Bilan ?lectrolytique
2460
          if FormOptions.Expression = 0
2461
          then // sur frais
2462
            Chart4.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), 1, Total, _('mEq/kg')]))
2463
          else // sur mati?re s?che
2464
            Chart4.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), 1, Total, _('mEq/kg'), _('DM')]))
2465
        else
2466
          if FormOptions.Expression = 0
2467
          then // sur frais
2468
            Chart4.SubTitle.Text.Add(Format('%s %1.*f %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals]]))
2469
          else // sur mati?re s?che
2470
            Chart4.SubTitle.Text.Add(Format('%s %1.*f %s %s', [_('Total:'), FormOptions.MineralsDecimals, Total, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals], _('DM')]));
2413 2471
    end;
2414 2472
  end;
2415 2473
end;
UnitIngredientDetail.pas
209 209
    LabelCl: TLabel;
210 210
    DBEditBE: TDBEdit;
211 211
    LabelBE: TLabel;
212
    LabelBEUnit: TLabel;
212 213
    procedure FormCreate(Sender: TObject);
213 214
    procedure FormShow(Sender: TObject);
214 215
    procedure ActionModifyExecute(Sender: TObject);
......
333 334
                  CellData(Row, FloatToStrF(ClientDataSetIngredients.Fields[i].AsFloat, ffFixed, 15, FormOptions.MineralsDecimals, USFormatSettings), 'Number')
334 335
                else
335 336
                  CellData(Row, '', 'String');
336
              125:
337
              125..127:
337 338
                if not ClientDataSetIngredients.Fields[i].IsNull
338 339
                then
339
                  CellData(Row, FloatToStrF(ClientDataSetIngredients.Fields[i].AsFloat, ffFixed, 15, 2, USFormatSettings), 'Number')
340
                else
341
                  CellData(Row, '', 'String');
342
              126..127:
343
                if not ClientDataSetIngredients.Fields[i].IsNull
344
                then
345 340
                  CellData(Row, FloatToStrF(ClientDataSetIngredients.Fields[i].AsFloat, ffFixed, 15, 1, USFormatSettings), 'Number')
346 341
                else
347 342
                  CellData(Row, '', 'String');
......
382 377
                  CellData(Row, FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals], 'String')
383 378
                else // sur mati?re s?che
384 379
                  CellData(Row, Format('%s %s', [FormOptions.ComboBoxMinerals.Items[FormOptions.Minerals], _('DM')]), 'String');
385
              125: // %
380
              125: // Bilan ?lectrolytique
386 381
                if FormOptions.Expression = 0
387 382
                then // sur frais
388 383
                  CellData(Row, _('mEq/kg'), 'String')
......
848 843
  GroupBoxMinerals.Caption := Format('%s (%s)', [GroupBoxMinerals.Caption, MineralsUnit]);
849 844
  if FormOptions.Expression = 0
850 845
  then // sur frais
851
    LabelBE.Caption := Format('%s (%s)', [LabelBE.Caption, _('mEq/kg')])
846
    LabelBEUnit.Caption := Format('(%s)', [_('mEq/kg')])
852 847
  else // sur mati?re s?che
853
    LabelBE.Caption := Format('%s (%s %s)', [LabelBE.Caption, _('mEq/kg'), _('DM')]);
848
    LabelBEUnit.Caption := Format('(%s %s)', [_('mEq/kg'), _('DM')]);
854 849
  LabelDigP.Caption := Format('%s (%%)', [LabelDigP.Caption]);
855 850
  GroupBoxEnergy.Caption := Format('%s (%s)', [GroupBoxEnergy.Caption, EnergyUnit]);
856 851
  LabelRatio.Caption := Format('%s (%%)', [LabelRatio.Caption]);

Formats disponibles : Unified diff