|
@@ -76,14 +76,14 @@ func (sql Unit) ConsiderPersNumbers() *UnitScope {
|
|
|
return sql.Scope().ConsiderPersNumbers()
|
|
|
}
|
|
|
func (sql *UnitScope) ConsiderPersNumbers() *UnitScope {
|
|
|
- return sql.Group("PersNumber").Order("CreateOrderDate", "DESC")
|
|
|
+ return sql.Group("PersNumber DESC").Order("CreateOrderDate", "DESC")
|
|
|
}
|
|
|
|
|
|
func (sql Unit) ConsiderUniqueCodes() *UnitScope {
|
|
|
return sql.Scope().ConsiderUniqueCodes()
|
|
|
}
|
|
|
func (sql *UnitScope) ConsiderUniqueCodes() *UnitScope {
|
|
|
- return sql.Group("Code").Order("id", "DESC")
|
|
|
+ return sql.Group("Code DESC").Order("id", "DESC")
|
|
|
}
|
|
|
|
|
|
func (sql Unit) RealOnly() *UnitScope {
|