Changeset 887 for trunk/Modules/Stock/Stock.php
- Timestamp:
- Nov 20, 2020, 12:08:12 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Stock/Stock.php
r874 r887 3 3 class ModuleStock extends AppModule 4 4 { 5 function __construct( $System)5 function __construct(System $System) 6 6 { 7 7 parent::__construct($System); … … 14 14 } 15 15 16 function DoStart() 16 function DoStart(): void 17 17 { 18 18 global $Config; … … 246 246 } 247 247 248 function BeforeInsertStockMove( $Form)248 function BeforeInsertStockMove(Form $Form): array 249 249 { 250 $Finance = &ModuleFinance::Cast($this->System->GetModule('Finance'))->Finance; 250 251 if (array_key_exists('Time', $Form->Values)) $Year = date("Y", $Form->Values['Time']); 251 252 else $Year = date("Y", $Form->Values['ValidFrom']); 252 $Group = $ this->System->Modules['Finance']->GetFinanceGroupById($Form->Values['Group'], 'StockMoveGroup');253 $Form->Values['BillCode'] = $ this->System->Modules['Finance']->GetNextDocumentLineNumberId($Group['DocumentLine'], $Year);253 $Group = $Finance->GetFinanceGroupById($Form->Values['Group'], 'StockMoveGroup'); 254 $Form->Values['BillCode'] = $Finance->GetNextDocumentLineNumberId($Group['DocumentLine'], $Year); 254 255 return $Form->Values; 255 256 }
Note:
See TracChangeset
for help on using the changeset viewer.