Changeset 894 for trunk/Modules/Stock/Stock.php
- Timestamp:
- Jan 5, 2021, 10:30:31 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Stock/Stock.php
r893 r894 16 16 function GetModels(): array 17 17 { 18 return array('Product', 'StockSerialNumber', 'Stock', 'StockMoveGroup', 'StockMove', 'StockMoveItem', 19 'StockItemHistory', 'StockMoveItemSerialRel'); 18 return array(Product::GetClassName(), StockSerialNumber::GetClassName(), Stock::GetClassName(), 19 StockMoveGroup::GetClassName(), StockMove::GetClassName(), StockMoveItem::GetClassName(), 20 StockItemHistory::GetClassName(), StockMoveItemSerialRel::GetClassName()); 20 21 } 21 22 … … 267 268 static function GetDesc(): ModelDesc 268 269 { 269 $Desc = new ModelDesc( 'Product');270 $Desc->AddReference('Manufacturer', 'Subject');270 $Desc = new ModelDesc(self::GetClassName()); 271 $Desc->AddReference('Manufacturer', Subject::GetClassName()); 271 272 $Desc->AddString('Code'); 272 273 $Desc->AddString('Name'); … … 275 276 $Desc->AddInteger('VAT'); 276 277 $Desc->AddInteger('Consumption'); 277 $Desc->AddReference('Supplier', 'Subject');278 $Desc->AddReference('UnitOfMeasure', 'UnitOfMeasure');278 $Desc->AddReference('Supplier', Subject::GetClassName()); 279 $Desc->AddReference('UnitOfMeasure', UnitOfMeasure::GetClassName()); 279 280 $Desc->AddInteger('StockMinCount'); 280 281 return $Desc; … … 286 287 static function GetDesc(): ModelDesc 287 288 { 288 $Desc = new ModelDesc( 'StockSerialNumber');289 $Desc->AddReference('Stock', 'Stock');290 $Desc->AddReference('Product', 'Product');289 $Desc = new ModelDesc(self::GetClassName()); 290 $Desc->AddReference('Stock', Stock::GetClassName()); 291 $Desc->AddReference('Product', Product::GetClassName()); 291 292 $Desc->AddDate('TimeEnlistment'); 292 293 $Desc->AddDate('TimeElimination'); … … 296 297 $Desc->AddString('SerialNumber'); 297 298 $Desc->AddString('RegNumber'); 298 $Desc->AddReference('Location', 'Member');299 $Desc->AddReference('Esemble', 'StockSerialNumber');299 $Desc->AddReference('Location', Member::GetClassName()); 300 $Desc->AddReference('Esemble', StockSerialNumber::GetClassName()); 300 301 return $Desc; 301 302 } … … 306 307 static function GetDesc(): ModelDesc 307 308 { 308 $Desc = new ModelDesc( 'Stock');309 $Desc->AddReference('Location', 'Member');309 $Desc = new ModelDesc(self::GetClassName()); 310 $Desc->AddReference('Location', Member::GetClassName()); 310 311 return $Desc; 311 312 } … … 316 317 static function GetDesc(): ModelDesc 317 318 { 318 $Desc = new ModelDesc( 'StockMove');319 $Desc->AddReference('Group', 'StockMoveGroup');319 $Desc = new ModelDesc(self::GetClassName()); 320 $Desc->AddReference('Group', StockMoveGroup::GetClassName()); 320 321 $Desc->AddDateTime('Time'); 321 $Desc->AddReference('Stock', 'Stock');322 $Desc->AddReference('File', 'File');322 $Desc->AddReference('Stock', Stock::GetClassName()); 323 $Desc->AddReference('File', File::GetClassName()); 323 324 return $Desc; 324 325 } … … 329 330 static function GetDesc(): ModelDesc 330 331 { 331 $Desc = new ModelDesc( 'StockMoveItem');332 $Desc->AddReference('StockMove', 'StockMove');333 $Desc->AddReference('Product', 'Product');332 $Desc = new ModelDesc(self::GetClassName()); 333 $Desc->AddReference('StockMove', StockMove::GetClassName()); 334 $Desc->AddReference('Product', Product::GetClassName()); 334 335 $Desc->AddInteger('UnitPrice'); 335 336 $Desc->AddInteger('Amount'); … … 342 343 static function GetDesc(): ModelDesc 343 344 { 344 $Desc = new ModelDesc( 'StockMoveGroup');345 $Desc = new ModelDesc(self::GetClassName()); 345 346 $Desc->AddString('Name'); 346 $Desc->AddReference('DocumentLine', 'DocumentLine');347 $Desc->AddReference('DocumentLine', DocumentLine::GetClassName()); 347 348 $Desc->AddInteger('ValueSign'); 348 349 $Desc->AddInteger('Direction'); … … 355 356 static function GetDesc(): ModelDesc 356 357 { 357 $Desc = new ModelDesc( 'StockItemHistory');358 $Desc = new ModelDesc(self::GetClassName()); 358 359 $Desc->AddDateTime('Time'); 359 $Desc->AddReference('StockSerialNumber', 'StockSerialNumber');360 $Desc->AddReference('StockSerialNumber', StockSerialNumber::GetClassName()); 360 361 $Desc->AddText('Text'); 361 362 return $Desc; … … 367 368 static function GetDesc(): ModelDesc 368 369 { 369 $Desc = new ModelDesc( 'StockMoveItemSerialRel');370 $Desc->AddReference('StockMoveItem', 'StockMoveItem');371 $Desc->AddReference('StockSerialNumber', 'StockSerialNumber');372 return $Desc; 373 } 374 } 370 $Desc = new ModelDesc(self::GetClassName()); 371 $Desc->AddReference('StockMoveItem', StockMoveItem::GetClassName()); 372 $Desc->AddReference('StockSerialNumber', StockSerialNumber::GetClassName()); 373 return $Desc; 374 } 375 }
Note:
See TracChangeset
for help on using the changeset viewer.