forked from CCI-MOC/invoicing
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request CCI-MOC#107 from QuanMPhm/103/proc_lenovo
Implemented processor for Lenovo processing
- Loading branch information
Showing
6 changed files
with
46 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from dataclasses import dataclass | ||
|
||
|
||
from process_report.invoices import invoice | ||
from process_report.processors import processor | ||
|
||
|
||
@dataclass | ||
class LenovoProcessor(processor.Processor): | ||
SU_CHARGE_MULTIPLIER = 1 | ||
|
||
def _process(self): | ||
self.data[invoice.SU_CHARGE_FIELD] = self.SU_CHARGE_MULTIPLIER | ||
self.data[invoice.LENOVO_CHARGE_FIELD] = ( | ||
self.data[invoice.SU_HOURS_FIELD] * self.data[invoice.SU_CHARGE_FIELD] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters