16 lines
690 B
Plaintext
16 lines
690 B
Plaintext
@AccessControl.authorizationCheck: #NOT_REQUIRED
|
|
@EndUserText.label: 'Repair charge per customer'
|
|
define view entity {{P}}I_REPAIR_CHARGE
|
|
as select from {{p}}job as job
|
|
inner join {{p}}rate as rate on rate.shoe_type = job.shoe_type
|
|
or rate.repair_type = job.repair_type
|
|
{
|
|
key job.customer as customer,
|
|
count( * ) as job_count,
|
|
sum( job.pairs ) as total_pairs,
|
|
sum( cast( job.pairs as abap.dec( 10, 0 ) ) * rate.price ) as total_charge
|
|
}
|
|
where job.job_state = 'D'
|
|
group by
|
|
job.customer
|