src/Document/Collect/Invoice.php line 21

  1. <?php
  2. namespace App\Document\Collect;
  3. use App\Common\Document\Common;
  4. use ApiPlatform\Metadata\ApiResource;
  5. use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. use Symfony\Component\Serializer\Annotation\Groups;
  9. use App\Filter;
  10. use ApiPlatform\Metadata\ApiFilter;
  11. use App\Document\Embed as MainEmbed;
  12. /**
  13.  * @ODM\Document(collection="collect__invoice")
  14.  * @ODM\Index(keys={"loc"="2dsphere"})
  15.  */
  16. #[ApiResource(routePrefix'collect'shortName'collect__invoice'paginationType"cursor")]
  17. #[ApiFilter(Filter\AdvancedSearchFilter::class, properties: ["number","name","client.name"])]
  18. #[ApiFilter(Filter\RegexFilter::class, properties: ["number","name","client.name"])]
  19. #[ApiFilter(Filter\GeoFilter::class, properties: ["loc"])]
  20. class Invoice extends Common
  21. {
  22.     /**
  23.     * @ODM\Field(type="string", nullable=true)
  24.     * @Groups("main")
  25.     */
  26.     public $case;
  27.     /**
  28.     * @ODM\ReferenceOne(targetDocument=App\Document\Common\Category::class, storeAs="id", nullable=true)
  29.     * @Groups("main")
  30.     */
  31.     public $category;
  32.     /**
  33.     * @ODM\Field(type="raw", nullable=true)
  34.     * @Groups("main")
  35.     */
  36.     public $tabgh = [];
  37.     /**
  38.     * @ODM\Field(type="raw", nullable=true)
  39.     * @Groups("main")
  40.     */
  41.     public $efaa = [];
  42.     /**
  43.     * @ODM\Field(type="raw", nullable=true)
  44.     * @Groups("main")
  45.     */
  46.     public $eywa = [];
  47.     /**
  48.     * @ODM\Field(type="date", nullable=true)
  49.     * @Groups("main")
  50.     * @ODM\Index
  51.     */
  52.     public $payment_date;
  53.     /**
  54.     * @ODM\Field(type="string", nullable=true)
  55.     * @Groups("main")
  56.     */
  57.     public $action;
  58.     /**
  59.     * @ODM\Field(type="date", nullable=true)
  60.     * @Groups("main")
  61.     * @ODM\Index
  62.     */
  63.     public $sadad_date;
  64.     /**
  65.     * @ODM\Field(type="string", nullable=true)
  66.     * @Groups("main")
  67.     * @ODM\Index
  68.     */
  69.     public $status;
  70.     /**
  71.     * @ODM\Field(type="string", nullable=true)
  72.     * @Groups("main")
  73.     */
  74.     public $payment_status;
  75.     /**
  76.     * @ODM\Field(type="collection", nullable=true)
  77.     * @Groups("main")
  78.     */
  79.     public $vals;
  80.     /**
  81.     * @ODM\Field(type="raw", nullable=true)
  82.     * @Groups("main")
  83.     */
  84.     public $naba = [];
  85.     /**
  86.     * @ODM\Field(type="raw", nullable=true)
  87.     * @Groups("main")
  88.     */
  89.     public $classification = [];
  90.     /**
  91.     * @ODM\Field(type="raw", nullable=true)
  92.     * @Groups("main")
  93.     */
  94.     public $letter = [];
  95.     /**
  96.     * @ODM\Field(type="raw", nullable=true)
  97.     * @Groups("main")
  98.     */
  99.     public $payment_notice = [];
  100.     /**
  101.     * @ODM\Field(type="string", nullable=true)
  102.     * @Groups("main")
  103.     * @ODM\Index
  104.     */
  105.     public $current_status;
  106.     /**
  107.     * @ODM\Field(type="string", nullable=true)
  108.     * @Groups("main")
  109.     */
  110.     public $system_status;
  111.     /**
  112.     * @ODM\Field(type="string", nullable=true)
  113.     * @Groups("main")
  114.     */
  115.     public $required_action;
  116.     /**
  117.     * @ODM\Field(type="raw", nullable=true)
  118.     * @Groups("main")
  119.     */
  120.     public $warning = [];
  121.     /**
  122.     * @ODM\Field(type="raw", nullable=true)
  123.     * @Groups("main")
  124.     */
  125.     public $coord = [];
  126.     /**
  127.     * @ODM\Field(type="string", nullable=true)
  128.     * @Groups("main")
  129.     */
  130.     public $payment_period;
  131.     /**
  132.     * @ODM\Field(type="string", nullable=true)
  133.     * @Groups("main")
  134.     */
  135.     public $invoice_age;
  136.     /**
  137.     * @ODM\Field(type="string", nullable=true)
  138.     * @Groups("main")
  139.     */
  140.     public $contract_number;
  141.     /**
  142.     * @ODM\Field(type="string", nullable=true)
  143.     * @Groups("main")
  144.     */
  145.     public $ref;
  146.     /**
  147.     * @ODM\Field(type="string", nullable=true)
  148.     * @Groups("main")
  149.     * @ODM\Index
  150.     */
  151.     public $type;
  152.     /**
  153.     * @ODM\Field(type="string", nullable=true)
  154.     * @Groups("main")
  155.     */
  156.     public $revenue_type;
  157.     /**
  158.     * @ODM\Field(type="raw", nullable=true)
  159.     * @Groups("main")
  160.     */
  161.     public $extra = [];
  162.     /**
  163.     * @ODM\Field(type="string", nullable=true)
  164.     * @Groups("main")
  165.     */
  166.     public $force_reason;
  167.     /**
  168.     * @ODM\Field(type="string", nullable=true)
  169.     * @Groups("main")
  170.     * @ODM\Index
  171.     */
  172.     public $name;
  173.     /**
  174.     * @ODM\Field(type="string", nullable=true)
  175.     * @Groups("main")
  176.     * @ODM\Index
  177.     */
  178.     public $number;
  179.     /**
  180.     * @ODM\ReferenceOne(targetDocument=Client::class, storeAs="id", nullable=true)
  181.     * @Groups("main")
  182.     * @ODM\Index
  183.     */
  184.     public $client;
  185.     /**
  186.     * @ODM\Field(type="raw", nullable=true)
  187.     * @Groups("main")
  188.     */
  189.     public $tax_date = [];
  190.     /**
  191.     * @ODM\Field(type="float", nullable=true)
  192.     * @Groups("main")
  193.     */
  194.     public $tax;
  195.     /**
  196.     * @ODM\Field(type="float", nullable=true)
  197.     * @Groups("main")
  198.     */
  199.     public $elm;
  200.     /**
  201.     * @ODM\Field(type="float", nullable=true)
  202.     * @Groups("main")
  203.     */
  204.     public $diwan;
  205.     /**
  206.     * @ODM\Field(type="float", nullable=true)
  207.     * @Groups("main")
  208.     */
  209.     public $stamp;
  210.     /**
  211.     * @ODM\Field(type="float", nullable=true)
  212.     * @Groups("main")
  213.     */
  214.     public $rev_amount;
  215.     /**
  216.     * @ODM\Field(type="float", nullable=true)
  217.     * @Groups("main")
  218.     */
  219.     public $total;
  220.     /**
  221.     * @ODM\Field(type="float", nullable=true)
  222.     * @Groups("main")
  223.     */
  224.     public $extra_tax;
  225.     /**
  226.     * @ODM\Field(type="float", nullable=true)
  227.     * @Groups("main")
  228.     */
  229.     public $eskan;
  230.     /**
  231.     * @ODM\Field(type="raw", nullable=true)
  232.     * @Groups("main")
  233.     */
  234.     public $ewya = [];
  235.     /**
  236.     * @ODM\Field(type="raw", nullable=true)
  237.     * @Groups("main")
  238.     */
  239.     public $building = [];
  240.     /**
  241.     * @ODM\Field(type="raw", nullable=true)
  242.     * @Groups("main")
  243.     */
  244.     public $drilling = [];
  245.     /**
  246.     * @ODM\Field(type="raw", nullable=true)
  247.     * @Groups("main")
  248.     */
  249.     public $invest = [];
  250.     /**
  251.     * @ODM\Field(type="float", nullable=true)
  252.     * @Groups("main")
  253.     */
  254.     public $amount;
  255.     /**
  256.     * @ODM\Field(type="float", nullable=true)
  257.     * @Groups("main")
  258.     */
  259.     public $net_value;
  260.     /**
  261.     * @ODM\Field(type="date", nullable=true)
  262.     * @Groups("main")
  263.     * @ODM\Index
  264.     */
  265.     public $date;
  266.     /**
  267.     * @ODM\ReferenceOne(targetDocument=Contract::class, storeAs="id", nullable=true)
  268.     * @Groups("main")
  269.     */
  270.     public $contract;
  271.     /**
  272.     * @ODM\Field(type="string", nullable=true)
  273.     * @Groups("main")
  274.     */
  275.     public $sheet;
  276.     /**
  277.     * @ODM\ReferenceOne(targetDocument=License::class, storeAs="id", nullable=true)
  278.     * @Groups("main")
  279.     */
  280.     public $license;
  281.     /**
  282.     * @ODM\Field(type="raw", nullable=true)
  283.     * @Groups("main")
  284.     */
  285.     public $visit = [];
  286.     /**
  287.     * @ODM\Field(type="raw", nullable=true)
  288.     * @Groups("main")
  289.     */
  290.     public $call = [];
  291.     /**
  292.     * @ODM\Field(type="string", nullable=true)
  293.     * @Groups("main")
  294.     */
  295.     public $system_type;
  296.     /**
  297.     * @ODM\ReferenceOne(targetDocument=App\Document\Geo\Province::class, storeAs="id", nullable=true)
  298.     * @Groups("main")
  299.     * @ODM\Index
  300.     */
  301.     public $province;
  302.     /**
  303.     * @ODM\ReferenceOne(targetDocument=App\Document\Geo\Municipality::class, storeAs="id", nullable=true)
  304.     * @Groups("main")
  305.     * @ODM\Index
  306.     */
  307.     public $mun;
  308.     /**
  309.     * @ODM\EmbedOne(targetDocument=MainEmbed\Point::class, nullable=True)
  310.     * @Groups("main")
  311.     */
  312.    public ?MainEmbed\Point $loc;
  313. }